瀏覽代碼

检测指令修改

ZeroLiYi 3 年之前
父節點
當前提交
e16dde49db

+ 2 - 2
src/main/java/com/chinaitop/depot/intelligent/IntelligentDetection/service/AbstractTask.java

@@ -14,7 +14,7 @@ public abstract class AbstractTask implements Job {
14 14
 
15 15
     private Logger logger = LoggerFactory.getLogger(AbstractTask.class);
16 16
 
17
-    protected abstract void executeInternal(JobExecutionContext context);
17
+   /* protected abstract void executeInternal(JobExecutionContext context);*/
18 18
 
19 19
     protected String cronExpression;
20 20
 
@@ -23,7 +23,7 @@ public abstract class AbstractTask implements Job {
23 23
     @Override
24 24
     public void execute(JobExecutionContext context) {
25 25
         try {
26
-            executeInternal(context);
26
+            //executeInternal(context);
27 27
         } catch (Exception e) {
28 28
             logger.error(e.getMessage(), e);
29 29
             logger.error("工作执行失败!");

+ 2 - 2
src/main/java/com/chinaitop/depot/intelligent/IntelligentDetection/service/TestTask.java

@@ -67,7 +67,7 @@ public class TestTask extends AbstractTask {
67 67
         this.cronExpression = "0/2 * * * * ? ";
68 68
     }
69 69
 
70
-    @Override
70
+   /* @Override
71 71
     protected void executeInternal(JobExecutionContext context) {
72 72
         logger.info("检测任务开始执行");
73 73
         try {
@@ -226,7 +226,7 @@ public class TestTask extends AbstractTask {
226 226
         }
227 227
         logger.info("检测任务执行结束");
228 228
     }
229
-
229
+*/
230 230
     private TTimingTaskHistory saveTaskHistory(TTimingTask tTimingTask, String kdname, String s, String type, String cfName) {
231 231
         TTimingTaskHistory taskHistory = new TTimingTaskHistory();
232 232
         taskHistory.setId(UuidUtils.getCode());

+ 3 - 3
src/main/java/com/chinaitop/depot/intelligent/grainsituation/controller/GasDetectionController.java

@@ -119,7 +119,7 @@ public class GasDetectionController {
119 119
         MultiValueMap<String, String> requestEntity = new LinkedMultiValueMap<>();
120 120
         requestEntity.add("storeCode", storeCode);
121 121
         return remoteControlUtil.remoteScan(
122
-                String.format("%s%s", url, remoteControlUtil.chooseCFCode),
122
+                String.format("%s%s", url, remoteControlUtil.nowGasDetection),
123 123
                 requestEntity, "POST", null
124 124
         );
125 125
     }
@@ -146,7 +146,7 @@ public class GasDetectionController {
146 146
         MultiValueMap<String, String> requestEntity = new LinkedMultiValueMap<>();
147 147
         requestEntity.add("vCfCode", vCfCode);
148 148
         return remoteControlUtil.remoteScan(
149
-                String.format("%s%s", url, remoteControlUtil.foodOnly),
149
+                String.format("%s%s", url, remoteControlUtil.gasOnly),
150 150
                 requestEntity, "POST", null);
151 151
 
152 152
     }
@@ -168,7 +168,7 @@ public class GasDetectionController {
168 168
         Map<String, String> requestEntity = new HashMap<>();
169 169
         requestEntity.put("orgId", orgId);
170 170
         return remoteControlUtil.remoteScan(
171
-                String.format("%s%s", url, remoteControlUtil.foodAll),
171
+                String.format("%s%s", url, remoteControlUtil.gasAll),
172 172
                 null, "GET", requestEntity
173 173
         );
174 174
 

+ 3 - 3
src/main/java/com/chinaitop/depot/intelligent/grainsituation/controller/InsectPestDetectionController.java

@@ -126,7 +126,7 @@ public class InsectPestDetectionController {
126 126
         MultiValueMap<String, String> requestEntity = new LinkedMultiValueMap<>();
127 127
         requestEntity.add("storeCode", storeCode);
128 128
         return remoteControlUtil.remoteScan(
129
-                String.format("%s%s", url, remoteControlUtil.chooseCFCode),
129
+                String.format("%s%s", url, remoteControlUtil.nowInsectPest),
130 130
                 requestEntity, "POST", null
131 131
         );
132 132
     }
@@ -152,7 +152,7 @@ public class InsectPestDetectionController {
152 152
         MultiValueMap<String, String> requestEntity = new LinkedMultiValueMap<>();
153 153
         requestEntity.add("vCfCode", vCfCode);
154 154
         return remoteControlUtil.remoteScan(
155
-                String.format("%s%s", url, remoteControlUtil.chooseCFCode),
155
+                String.format("%s%s", url, remoteControlUtil.onlyPest),
156 156
                 requestEntity, "POST", null
157 157
         );
158 158
     }
@@ -173,7 +173,7 @@ public class InsectPestDetectionController {
173 173
         Map<String, String> requestEntity = new HashMap<>();
174 174
 
175 175
         return remoteControlUtil.remoteScan(
176
-                String.format("%s%s", url, remoteControlUtil.foodAll),
176
+                String.format("%s%s", url, remoteControlUtil.pestAll),
177 177
                 null, "GET", requestEntity
178 178
         );
179 179
 

+ 1 - 1
src/main/java/com/chinaitop/depot/intelligent/insideCirculation/controller/InsideCirculationController.java

@@ -85,7 +85,7 @@ public class InsideCirculationController {
85 85
         requestEntity.add("uperson", uperson);
86 86
         requestEntity.add("orgId", orgId+"");
87 87
         return remoteControlUtil.remoteScan(
88
-                String.format("%s%s", url, remoteControlUtil.foodOnly),
88
+                String.format("%s%s", url, remoteControlUtil.airConditionDir),
89 89
                 requestEntity, "POST", null
90 90
         );
91 91
     }

+ 6 - 0
src/main/java/com/chinaitop/depot/intelligent/utils/RemoteControlUtil.java

@@ -28,6 +28,12 @@ public class RemoteControlUtil {
28 28
     /**
29 29
      * url常量
30 30
      */
31
+    // 虫害实时检测
32
+    public static final String airConditionDir = "/intelligents/monitorWarning/sendAirConditionDir";
33
+    // 虫害实时检测
34
+    public static final String nowInsectPest = "/intelligents/monitorWarning/sendNowInsectPest";
35
+    // 气体实时检测
36
+    public static final String nowGasDetection = "/intelligents/monitorWarning/sendNowGasDetection";
31 37
     // 数量检测,获取测量进度
32 38
     public static final String scanProgress = "/intelligents/monitorWarning/getScanResult";
33 39
     // 数量检测,获取扫描结果