瀏覽代碼

feature 代码提交

xiahan 1 年之前
父節點
當前提交
3f438f5692

+ 1 - 1
cx-safe-check/cx-save-check-common/src/main/java/com/rongwei/sfcommon/sys/service/SafeCheckSendNotifyService.java

@@ -32,5 +32,5 @@ public interface SafeCheckSendNotifyService {
     R submitSystem(Map<String, String> map);
 
 
-    R hiddenDangerTask(Map<String, String> map);
+    R hiddenDangerTask();
 }

+ 1 - 1
cx-safe-check/cx-save-check-common/src/main/java/com/rongwei/sfcommon/sys/service/impl/SafeCheckSendNotifyServiceImpl.java

@@ -336,7 +336,7 @@ public class SafeCheckSendNotifyServiceImpl implements SafeCheckSendNotifyServic
      * @return
      */
     @Override
-    public R hiddenDangerTask(Map<String, String> map) {
+    public R hiddenDangerTask() {
         List<HiddenDangerTrackDo> hiddenDangerTrackDos = hiddenDangerTrackService.list(new LambdaQueryWrapper<HiddenDangerTrackDo>()
                 .eq(BaseDo::getDeleted, "0")
                 .eq(HiddenDangerTrackDo::getSource, "1")

+ 12 - 2
cx-safe-check/cx-save-check-server/src/main/java/com/rongwei/savecheck/controller/CheckTemplateController.java

@@ -130,14 +130,24 @@ public class CheckTemplateController {
             return R.deleteError();
         }
     }
+    /**
+     * 点检任务生成
+     * 定时
+     * @return
+     */
+    @Scheduled(cron = "0 5 0 * * ?")
+    @PostMapping("/point/check/task")
+    public R pointCheckCreate() {
+    checkTemplateService.pointCheckCreate(null);
+    return R.ok();
+    }
 
     /**
      * 点检任务生成
-     * 定时非定时
+     * 非定时
      * @param map
      * @return
      */
-    @Scheduled(cron = "0 5 0 * * ?")
     @PostMapping("/pointCheckCreate")
     public R pointCheckCreate(@RequestBody(required = false) Map<String,Object> map) {
         log.info("生成点检任务参数为:{}", map);

+ 3 - 3
cx-safe-check/cx-save-check-server/src/main/java/com/rongwei/savecheck/controller/SafeSendNotifyController.java

@@ -144,9 +144,9 @@ public class SafeSendNotifyController {
 
     @Scheduled(cron = "0 0 7 ? * WED,FRI")
     @PostMapping("/hidden/danger")
-    public R hiddenDangerTak(@RequestBody Map<String, String> map){
-        log.info("点巡检隐患任务提醒",map);
-        sendNotifyService.hiddenDangerTask(map);
+    public R hiddenDangerTak(){
+        log.info("点巡检隐患任务提醒");
+        sendNotifyService.hiddenDangerTask();
         return R.ok();
     }
 

+ 3 - 1
rw-training/training-server/src/main/java/com/rongwei/RwTrainingApplication.java

@@ -9,14 +9,16 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
 import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.FilterType;
+import org.springframework.scheduling.annotation.EnableScheduling;
 
 @SpringBootApplication
 @EnableDiscoveryClient
 @EnableFeignClients
 @MapperScan("com.rongwei.*.*.dao")
-//@EnableDistributedTransaction
+
 @ComponentScan(basePackages = {"com.rongwei"},excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE,
         classes = {BaseMetaObjectHandler.class}))
+@EnableScheduling
 public class RwTrainingApplication {
 
     public static void main(String[] args) {