Selaa lähdekoodia

注释不需要的定时任务

bihuisong 2 kuukautta sitten
vanhempi
commit
09c3295fa3

+ 1 - 1
src/main/java/com/sooka/sponest/middleground/remoteapi/service/center/gpsTank/RemoteGpsTankService.java

@@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.RequestBody;
         contextId = "remoteGpsTankService"
         , value = ModulesServiceNameContants.CENTER_MONITOR_GPSTANK
         , fallbackFactory = RemoteGpsTankBaseServiceFallbackFactory.class
-        ,url = "${sooka.service.monitor-gpsTank}"
+//        ,url = "${sooka.service.monitor-gpsTank}"
 )
 public interface RemoteGpsTankService {
 

+ 1 - 1
src/main/java/com/sooka/sponest/middleground/remoteapi/service/center/iot/RemoteIotService.java

@@ -18,7 +18,7 @@ import org.springframework.web.multipart.MultipartFile;
         contextId = "remoteIotService"
         , value = ModulesServiceNameContants.CENTER_MONITOR_IOT
         , fallbackFactory = RemoteIotBaseServiceFallbackFactory.class
-        ,url = "${sooka.service.monitor-iot}"
+//        ,url = "${sooka.service.monitor-iot}"
 )
 public interface RemoteIotService {
 

+ 32 - 32
src/main/java/com/sooka/sponest/middleground/scheduleTask/StaticScheduleTask.java

@@ -65,28 +65,28 @@ public class StaticScheduleTask {
     public RemotePollingPositionMsgService remotePollingPositionMsgService;
 
 
-    @Scheduled(cron = "0 0 0/2 * * ?")//添加定时任务 每2小时执行
-//    @Scheduled(cron = "0 */5 * * * ?")//添加定时任务 每1分钟执行
-    private void configureTasks() {
-        logger.info("执行物联网数据采集定时任务=>{}", DateUtils.dateTimeNow());
-        JSONArray jsonArray = sennorService.getDevideCodeMapByTypes(sennorDeviceTypes);
-        for (Object object : jsonArray) {
-            JSONObject jsonObject = JSONObject.parseObject(object.toString());
-            sennorService.getDeviceInfo(jsonObject.getString("device_code"));
-        }
-    }
-
-
-    @Scheduled(cron = "0 0 0/2 * * ?")//添加定时任务 每2小时执行
-//    @Scheduled(cron = "0 */5 * * * ?")//添加定时任务 每1分钟执行
-    private void configureTask() {
-        logger.info("执行虫情数据采集定时任务=>{}", DateUtils.dateTimeNow());
-        JSONArray jsonArray = sennorService.getDevideCodeMapByTypes(sennorInsectDeviceType);
-        for (Object object : jsonArray) {
-            JSONObject jsonObject = JSONObject.parseObject(object.toString());
-            plantDiseasesAndInsectPestsService.plantDiseasesAndInsectPestsMessageReceiver(jsonObject.getString("device_code"));
-        }
-    }
+//    @Scheduled(cron = "0 0 0/2 * * ?")//添加定时任务 每2小时执行
+////    @Scheduled(cron = "0 */5 * * * ?")//添加定时任务 每1分钟执行
+//    private void configureTasks() {
+//        logger.info("执行物联网数据采集定时任务=>{}", DateUtils.dateTimeNow());
+//        JSONArray jsonArray = sennorService.getDevideCodeMapByTypes(sennorDeviceTypes);
+//        for (Object object : jsonArray) {
+//            JSONObject jsonObject = JSONObject.parseObject(object.toString());
+//            sennorService.getDeviceInfo(jsonObject.getString("device_code"));
+//        }
+//    }
+//
+//
+//    @Scheduled(cron = "0 0 0/2 * * ?")//添加定时任务 每2小时执行
+////    @Scheduled(cron = "0 */5 * * * ?")//添加定时任务 每1分钟执行
+//    private void configureTask() {
+//        logger.info("执行虫情数据采集定时任务=>{}", DateUtils.dateTimeNow());
+//        JSONArray jsonArray = sennorService.getDevideCodeMapByTypes(sennorInsectDeviceType);
+//        for (Object object : jsonArray) {
+//            JSONObject jsonObject = JSONObject.parseObject(object.toString());
+//            plantDiseasesAndInsectPestsService.plantDiseasesAndInsectPestsMessageReceiver(jsonObject.getString("device_code"));
+//        }
+//    }
 
     @Scheduled(cron = "0 0/30 1 * * ?")//添加定时任务 每天1点半执行
     private void configureBlackTasks() {
@@ -102,11 +102,11 @@ public class StaticScheduleTask {
     }
 
 
-    @Scheduled(cron = "0 0/10 * * * ?")//添加定时任务 每天10分钟执行
-    private void configureGpsTank() throws Exception {
-        logger.info("执行每天10分钟一次对接北斗卫星定位设备车辆轨迹和行程定时任务=>{}", DateUtils.dateTimeNow());
-        monitorController.configureGpsTank();
-    }
+//    @Scheduled(cron = "0 0/10 * * * ?")//添加定时任务 每天10分钟执行
+//    private void configureGpsTank() throws Exception {
+//        logger.info("执行每天10分钟一次对接北斗卫星定位设备车辆轨迹和行程定时任务=>{}", DateUtils.dateTimeNow());
+//        monitorController.configureGpsTank();
+//    }
 
 
     @Scheduled(cron = "0 0/2 * * * ?")//添加定时任务 每2分钟执行一次
@@ -116,11 +116,11 @@ public class StaticScheduleTask {
     }
 
 
-    @Scheduled(cron = "0 0 0/1 * * ?")//添加定时任务 每1小时执行一次
-    private void updateDeviceStatusQuartz() {
-        logger.info("IOT传感器设备定时任务=>{}", DateUtils.dateTimeNow());
-        remoteIotService.updateDeviceStatusQuartz();
-    }
+//    @Scheduled(cron = "0 0 0/1 * * ?")//添加定时任务 每1小时执行一次
+//    private void updateDeviceStatusQuartz() {
+//        logger.info("IOT传感器设备定时任务=>{}", DateUtils.dateTimeNow());
+//        remoteIotService.updateDeviceStatusQuartz();
+//    }
 
     @Scheduled(cron = "0 0 0/2 * * ?")//添加定时任务 每两小时执行一次
     private void selectDayLineChartCountTask() {