|
@@ -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();
|
|
|
}
|