Ver código fonte

任务提交 mqtt发送去掉策略任务类型

qinguocai 1 ano atrás
pai
commit
f883f48021

+ 2 - 5
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BerthingServiceImpl.java

@@ -224,7 +224,7 @@ public class BerthingServiceImpl implements BerthingService {
         if (berthingPoint == null) {
             throw new BaseException("有效的断面数据未找到");
         }
-        boolean res = false;
+        boolean res;
         BerthingPointConfig berthingPointConfig = berthingPointConfigMapper.queryById(berthingPointConfigDTO.getStopId());
         try {
             ArrayList<PrintExcelDTO> positions = berthingPointConfigDTO.getPositions();
@@ -315,7 +315,6 @@ public class BerthingServiceImpl implements BerthingService {
             String topic = "down/" + siteInfo.getDeviceId() + "/removePlan";
             HashMap<String, Object> requestMap = new HashMap<>();
             requestMap.put("id", siteInfo.getId());
-            requestMap.put("type",0);
             requestMap.put("planid", berthingPointConfig.getPlanid());
             requestMap.put("plantype", 0); //策略类型,0: 垂线停泊点;1: 时间计划;2: 水位变幅
             String data = JSONUtil.toJsonStr(requestMap);
@@ -334,7 +333,7 @@ public class BerthingServiceImpl implements BerthingService {
         if (berthingTimeDTO.getTimeId() == null) {
             berthingTimeDTO.setTimeId(0L);
         }
-        boolean res = false;
+        boolean res;
         BerthingTimeConfig berthingTime = berthingTimeConfigMapper.queryById(berthingTimeDTO.getTimeId());
         try {
             ArrayList<String> times = berthingTimeDTO.getTimes();
@@ -420,7 +419,6 @@ public class BerthingServiceImpl implements BerthingService {
             String topic = "down/" + siteInfo.getDeviceId() + "/removePlan";
             HashMap<String, Object> requestMap = new HashMap<>();
             requestMap.put("id", siteInfo.getId());
-            requestMap.put("type", berthingTimeConfig.getType());
             requestMap.put("planid", berthingTimeConfig.getPlanid());
             requestMap.put("plantype", 1); //策略类型,0: 垂线停泊点;1: 时间计划;2: 水位变幅
             String data = JSONUtil.toJsonStr(requestMap);
@@ -526,7 +524,6 @@ public class BerthingServiceImpl implements BerthingService {
             String topic = "down/" + siteInfo.getDeviceId() + "/removePlan";
             HashMap<String, Object> requestMap = new HashMap<>();
             requestMap.put("id", siteInfo.getId());
-            requestMap.put("type", berthingFloat.getType());
             requestMap.put("planid", berthingFloat.getPlanid());
             requestMap.put("plantype", 2); //策略类型,0: 垂线停泊点;1: 时间计划;2: 水位变幅
             String data = JSONUtil.toJsonStr(requestMap);