Selaa lähdekoodia

NC增量更新定时任务代码更新

fyz 8 kuukautta sitten
vanhempi
commit
f85083adbd

+ 6 - 6
mjava-lanyun/src/main/java/com/malk/lanyun/schedule/NCTask.java

@@ -11,7 +11,7 @@ import org.springframework.scheduling.annotation.Scheduled;
 @Slf4j
 @Configuration
 @EnableScheduling
-@ConditionalOnProperty(name = {"spel.scheduling"})
+@ConditionalOnProperty(name = {"nc.scheduling"})
 public class NCTask {
     @Autowired
     NCService ncService;
@@ -19,7 +19,7 @@ public class NCTask {
     /**
      * 每月1日凌晨4点跑批NC生产成本
      */
-    @Scheduled(cron = "0 0 4 1 * ?")
+    @Scheduled(cron = "0 0 4 * * ?")
     void productCosts() {
         ncService.getNcInfo();
     }
@@ -27,28 +27,28 @@ public class NCTask {
     /**
      * 每月1日凌晨4点30跑批NC物耗成本
      */
-    @Scheduled(cron = "0 30 4 1 * ?")
+    @Scheduled(cron = "0 30 4 * * ?")
     void materialCost() {
         ncService.getNcCgInfo();
     }
     /**
      * 每月1日凌晨5点跑批NC大业主生产成本
      */
-    @Scheduled(cron = "0 0 5 1 * ?")
+    @Scheduled(cron = "0 0 5 * * ?")
     void bigProductCosts() {
         ncService.getNcCost();
     }
     /**
      * 每月1日凌晨5点30跑批NC-部门费用达成明细
      */
-    @Scheduled(cron = "0 30 5 1 * ?")
+    @Scheduled(cron = "0 30 5 * * ?")
     void departmentCost() {
         ncService.getNcCollection();
     }
     /**
      * 每月1日凌晨6点跑批NC供应商付款
      */
-    @Scheduled(cron = "0 0 6 1 * ?")
+    @Scheduled(cron = "0 0 6 * * ?")
     void supplierPay() {
         ncService.getSupplierPay();
     }

+ 4 - 0
mjava-lanyun/src/main/resources/application-dev.yml

@@ -9,6 +9,10 @@ spel:
   scheduling: true        # 定时任务是否执行
   multiSource: false       # 是否多数据源配置
 
+nc:
+  scheduling: true        # 定时任务是否执行
+  multiSource: false       # 是否多数据源配置
+
 spring:
   # database
   datasource:

+ 4 - 0
mjava-lanyun/src/main/resources/application-prod.yml

@@ -9,6 +9,10 @@ spel:
   scheduling: true        # 定时任务是否执行
   multiSource: false      # 是否多数据源配置
 
+nc:
+  scheduling: true        # 定时任务是否执行
+  multiSource: false      # 是否多数据源配置
+
 spring:
   # database
   datasource: