Bläddra i källkod

检测指令修改

ZeroLiYi 3 år sedan
förälder
incheckning
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
     private Logger logger = LoggerFactory.getLogger(AbstractTask.class);
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
     protected String cronExpression;
19
     protected String cronExpression;
20
 
20
 
@@ -23,7 +23,7 @@ public abstract class AbstractTask implements Job {
23
     @Override
23
     @Override
24
     public void execute(JobExecutionContext context) {
24
     public void execute(JobExecutionContext context) {
25
         try {
25
         try {
26
-            executeInternal(context);
26
+            //executeInternal(context);
27
         } catch (Exception e) {
27
         } catch (Exception e) {
28
             logger.error(e.getMessage(), e);
28
             logger.error(e.getMessage(), e);
29
             logger.error("工作执行失败!");
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
         this.cronExpression = "0/2 * * * * ? ";
67
         this.cronExpression = "0/2 * * * * ? ";
68
     }
68
     }
69
 
69
 
70
-    @Override
70
+   /* @Override
71
     protected void executeInternal(JobExecutionContext context) {
71
     protected void executeInternal(JobExecutionContext context) {
72
         logger.info("检测任务开始执行");
72
         logger.info("检测任务开始执行");
73
         try {
73
         try {
@@ -226,7 +226,7 @@ public class TestTask extends AbstractTask {
226
         }
226
         }
227
         logger.info("检测任务执行结束");
227
         logger.info("检测任务执行结束");
228
     }
228
     }
229
-
229
+*/
230
     private TTimingTaskHistory saveTaskHistory(TTimingTask tTimingTask, String kdname, String s, String type, String cfName) {
230
     private TTimingTaskHistory saveTaskHistory(TTimingTask tTimingTask, String kdname, String s, String type, String cfName) {
231
         TTimingTaskHistory taskHistory = new TTimingTaskHistory();
231
         TTimingTaskHistory taskHistory = new TTimingTaskHistory();
232
         taskHistory.setId(UuidUtils.getCode());
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
         MultiValueMap<String, String> requestEntity = new LinkedMultiValueMap<>();
119
         MultiValueMap<String, String> requestEntity = new LinkedMultiValueMap<>();
120
         requestEntity.add("storeCode", storeCode);
120
         requestEntity.add("storeCode", storeCode);
121
         return remoteControlUtil.remoteScan(
121
         return remoteControlUtil.remoteScan(
122
-                String.format("%s%s", url, remoteControlUtil.chooseCFCode),
122
+                String.format("%s%s", url, remoteControlUtil.nowGasDetection),
123
                 requestEntity, "POST", null
123
                 requestEntity, "POST", null
124
         );
124
         );
125
     }
125
     }
@@ -146,7 +146,7 @@ public class GasDetectionController {
146
         MultiValueMap<String, String> requestEntity = new LinkedMultiValueMap<>();
146
         MultiValueMap<String, String> requestEntity = new LinkedMultiValueMap<>();
147
         requestEntity.add("vCfCode", vCfCode);
147
         requestEntity.add("vCfCode", vCfCode);
148
         return remoteControlUtil.remoteScan(
148
         return remoteControlUtil.remoteScan(
149
-                String.format("%s%s", url, remoteControlUtil.foodOnly),
149
+                String.format("%s%s", url, remoteControlUtil.gasOnly),
150
                 requestEntity, "POST", null);
150
                 requestEntity, "POST", null);
151
 
151
 
152
     }
152
     }
@@ -168,7 +168,7 @@ public class GasDetectionController {
168
         Map<String, String> requestEntity = new HashMap<>();
168
         Map<String, String> requestEntity = new HashMap<>();
169
         requestEntity.put("orgId", orgId);
169
         requestEntity.put("orgId", orgId);
170
         return remoteControlUtil.remoteScan(
170
         return remoteControlUtil.remoteScan(
171
-                String.format("%s%s", url, remoteControlUtil.foodAll),
171
+                String.format("%s%s", url, remoteControlUtil.gasAll),
172
                 null, "GET", requestEntity
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
         MultiValueMap<String, String> requestEntity = new LinkedMultiValueMap<>();
126
         MultiValueMap<String, String> requestEntity = new LinkedMultiValueMap<>();
127
         requestEntity.add("storeCode", storeCode);
127
         requestEntity.add("storeCode", storeCode);
128
         return remoteControlUtil.remoteScan(
128
         return remoteControlUtil.remoteScan(
129
-                String.format("%s%s", url, remoteControlUtil.chooseCFCode),
129
+                String.format("%s%s", url, remoteControlUtil.nowInsectPest),
130
                 requestEntity, "POST", null
130
                 requestEntity, "POST", null
131
         );
131
         );
132
     }
132
     }
@@ -152,7 +152,7 @@ public class InsectPestDetectionController {
152
         MultiValueMap<String, String> requestEntity = new LinkedMultiValueMap<>();
152
         MultiValueMap<String, String> requestEntity = new LinkedMultiValueMap<>();
153
         requestEntity.add("vCfCode", vCfCode);
153
         requestEntity.add("vCfCode", vCfCode);
154
         return remoteControlUtil.remoteScan(
154
         return remoteControlUtil.remoteScan(
155
-                String.format("%s%s", url, remoteControlUtil.chooseCFCode),
155
+                String.format("%s%s", url, remoteControlUtil.onlyPest),
156
                 requestEntity, "POST", null
156
                 requestEntity, "POST", null
157
         );
157
         );
158
     }
158
     }
@@ -173,7 +173,7 @@ public class InsectPestDetectionController {
173
         Map<String, String> requestEntity = new HashMap<>();
173
         Map<String, String> requestEntity = new HashMap<>();
174
 
174
 
175
         return remoteControlUtil.remoteScan(
175
         return remoteControlUtil.remoteScan(
176
-                String.format("%s%s", url, remoteControlUtil.foodAll),
176
+                String.format("%s%s", url, remoteControlUtil.pestAll),
177
                 null, "GET", requestEntity
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
         requestEntity.add("uperson", uperson);
85
         requestEntity.add("uperson", uperson);
86
         requestEntity.add("orgId", orgId+"");
86
         requestEntity.add("orgId", orgId+"");
87
         return remoteControlUtil.remoteScan(
87
         return remoteControlUtil.remoteScan(
88
-                String.format("%s%s", url, remoteControlUtil.foodOnly),
88
+                String.format("%s%s", url, remoteControlUtil.airConditionDir),
89
                 requestEntity, "POST", null
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
      * url常量
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
     public static final String scanProgress = "/intelligents/monitorWarning/getScanResult";
38
     public static final String scanProgress = "/intelligents/monitorWarning/getScanResult";
33
     // 数量检测,获取扫描结果
39
     // 数量检测,获取扫描结果