Commit 4c3f216b authored by xixinzhao's avatar xixinzhao

修改提交

parent b43628a3
...@@ -39,9 +39,9 @@ public interface IPointDao extends BaseDao<Point, Long> { ...@@ -39,9 +39,9 @@ public interface IPointDao extends BaseDao<Point, Long> {
@Modifying @Modifying
@Transactional @Transactional
@Query(value = "UPDATE p_point SET is_delete = 1 WHERE point_no = (?1)", nativeQuery = true) @Query(value = "UPDATE p_point SET is_delete = 1 WHERE original_id = (?1)", nativeQuery = true)
void delPointByPointNo(Long id); void delPointByOriginalId(Long id);
@Query(value = "SELECT id FROM p_point p WHERE is_delete = 0 AND p.point_no = (?1)", nativeQuery = true) @Query(value = "SELECT id FROM p_point p WHERE is_delete = 0 AND p.original_id = (?1)", nativeQuery = true)
List<Long> findPointByPointNo(String pointNo); List<Long> findPointByPointNo(String pointNo);
} }
...@@ -1187,11 +1187,11 @@ public class PointServiceImpl implements IPointService { ...@@ -1187,11 +1187,11 @@ public class PointServiceImpl implements IPointService {
} }
@Override @Override
public void delPointByPointNo(Long id) { public void delPointByOriginalId(Long id) {
List<Long> idLists = new ArrayList<>(); // List<Long> idLists = new ArrayList<>();
idLists = iPointDao.findPointByPointNo(String.valueOf(id)); // idLists = iPointDao.findPointByPointNo(String.valueOf(id));
iPointInputItemDao.deleteByPointId(idLists); // iPointInputItemDao.deleteByPointId(idLists);
iPointDao.delPointByPointNo(id); iPointDao.delPointByOriginalId(id);
} }
@Override @Override
......
...@@ -325,7 +325,7 @@ public interface IPointService { ...@@ -325,7 +325,7 @@ public interface IPointService {
* *
* @param * @param
*/ */
void delPointByPointNo(Long id); void delPointByOriginalId(Long id);
List<Map<String, Object>> queryItemDetailByPointId(Long id, Long routeId, Long planId); List<Map<String, Object>> queryItemDetailByPointId(Long id, Long routeId, Long planId);
......
...@@ -4,13 +4,12 @@ import com.alibaba.fastjson.JSON; ...@@ -4,13 +4,12 @@ import com.alibaba.fastjson.JSON;
import com.yeejoin.amos.supervision.business.dto.OrgUsrFormDto; import com.yeejoin.amos.supervision.business.dto.OrgUsrFormDto;
import com.yeejoin.amos.supervision.business.service.intfc.IPointService; import com.yeejoin.amos.supervision.business.service.intfc.IPointService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;
import org.eclipse.paho.client.mqttv3.MqttMessage; import org.eclipse.paho.client.mqttv3.MqttMessage;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.typroject.tyboot.component.emq.EmqxListener; import org.typroject.tyboot.component.emq.EmqxListener;
import java.nio.charset.Charset; import java.nio.charset.StandardCharsets;
/** /**
* @author keyong * @author keyong
...@@ -30,12 +29,12 @@ public class AmosMqttListener extends EmqxListener { ...@@ -30,12 +29,12 @@ public class AmosMqttListener extends EmqxListener {
@Override @Override
public void processMessage(String topic, MqttMessage message) { public void processMessage(String topic, MqttMessage message) {
byte[] payload = message.getPayload(); byte[] payload = message.getPayload();
String str = new String(payload, Charset.forName("GBK")); String str = new String(payload, StandardCharsets.UTF_8);
if ("jcs/company/topic/add".equals(topic)) { if ("jcs/company/topic/add".equals(topic)) {
OrgUsrFormDto usrFormDto = JSON.parseObject(str, OrgUsrFormDto.class); OrgUsrFormDto usrFormDto = JSON.parseObject(str, OrgUsrFormDto.class);
iPointService.syncSavePoint(usrFormDto); iPointService.syncSavePoint(usrFormDto);
} else { } else {
iPointService.delPointByPointNo(Long.valueOf(str)); iPointService.delPointByOriginalId(Long.valueOf(str));
} }
try { try {
} catch (Exception e) { } catch (Exception e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment