|
@@ -4,7 +4,6 @@ import com.fjhx.stock.service.StockBackPlanService;
|
|
|
import com.fjhx.stock.service.StockCheckrecordService;
|
|
|
import com.fjhx.task.service.ScheduleTaskService;
|
|
|
import org.springblade.core.launch.BladeApplication;
|
|
|
-import org.springblade.core.tool.utils.ThreadUtil;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
|
@@ -72,20 +71,26 @@ public class ScheduleTaskController {
|
|
|
/**
|
|
|
* 盘点
|
|
|
*/
|
|
|
-// @Scheduled(cron = "0 10 1 * * ?")
|
|
|
+// @Scheduled(cron = "0 0 1 * * ?")
|
|
|
// @PostConstruct
|
|
|
-// private void check() {
|
|
|
-// if (BladeApplication.isLocalDev()) {
|
|
|
-// return;
|
|
|
-// }
|
|
|
-//
|
|
|
-// stockCheckrecordService.startCheck("check1", "c185883dba22478cb593d33f6b66cc53");
|
|
|
-// stockCheckrecordService.startCheck("check4", "0b8f584250bb4b40b72d641ce4849d15");
|
|
|
-//
|
|
|
-// ThreadUtil.sleep(1000 * 60 * 10);
|
|
|
-//
|
|
|
-// stockCheckrecordService.closeCheck("check1", "c185883dba22478cb593d33f6b66cc53");
|
|
|
-// stockCheckrecordService.closeCheck("check4", "0b8f584250bb4b40b72d641ce4849d15");
|
|
|
-// }
|
|
|
+ private void checkStart() {
|
|
|
+ if (BladeApplication.isLocalDev()) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ stockCheckrecordService.checkStart("check1", "c185883dba22478cb593d33f6b66cc53");
|
|
|
+ stockCheckrecordService.checkStart("check4", "0b8f584250bb4b40b72d641ce4849d15");
|
|
|
+ }
|
|
|
+
|
|
|
+ // @Scheduled(cron = "0 10 1 * * ?")
|
|
|
+ // @PostConstruct
|
|
|
+ private void checkEnd() {
|
|
|
+ if (BladeApplication.isLocalDev()) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ stockCheckrecordService.checkEnd("check1", "c185883dba22478cb593d33f6b66cc53");
|
|
|
+ stockCheckrecordService.checkEnd("check4", "0b8f584250bb4b40b72d641ce4849d15");
|
|
|
+ }
|
|
|
|
|
|
}
|