From 35ce7aaef10e30006bcef381d19302c0928c1194 Mon Sep 17 00:00:00 2001
From: 18516761980 <4761516tqsxp>
Date: 星期二, 14 九月 2021 08:24:00 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/ints/task/WaitMatoutLogScheduler.java |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/zy/ints/task/WaitMatoutLogScheduler.java b/src/main/java/com/zy/ints/task/WaitMatoutLogScheduler.java
index 89ccbbb..ff778c9 100644
--- a/src/main/java/com/zy/ints/task/WaitMatoutLogScheduler.java
+++ b/src/main/java/com/zy/ints/task/WaitMatoutLogScheduler.java
@@ -7,6 +7,7 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
@@ -22,12 +23,18 @@
 
     @Autowired
     private WaitMatoutService waitMatoutService;
-
     @Autowired
     private WaitMatoutLogHandler waitMatOutLogHandler;
 
+    /**
+     * ERP鎺ュ彛鏄惁鍚敤
+     */
+    @Value("${erp.enabled}")
+    private Boolean erpEnabled;
+
     @Scheduled(cron = "0/4 * * * * ? ")
     private void execute(){
+        if(!erpEnabled) return;
         List<WaitMatout> waitMatouts = waitMatoutService.selectWaitMatOutBySts();
         for (WaitMatout waitMatout : waitMatouts) {
             ReturnT<String> result = waitMatOutLogHandler.start(waitMatout);

--
Gitblit v1.9.1