瀏覽代碼

aps-定时任务调度重排之后预排

sucheng 4 月之前
父節點
當前提交
b87b39c3ba

+ 12 - 8
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ApsBlankOrderServiceImpl.java

@@ -4394,10 +4394,12 @@ public class ApsBlankOrderServiceImpl extends ServiceImpl<ApsBlankOrderDao, ApsB
             String res = "needWait";
             while (res.equals("needWait")) {
                 res = doRestartSchedule(bancaiTenantId);
-                try {
-                    Thread.sleep(640000);
-                } catch (InterruptedException e) {
-                    throw new RuntimeException(e);
+                if (res.equals("needWait")) {
+                    try {
+                        Thread.sleep(640000);
+                    } catch (InterruptedException e) {
+                        throw new RuntimeException(e);
+                    }
                 }
             }
             if (res.equals("success")) {//调度之后,预排程
@@ -4413,10 +4415,12 @@ public class ApsBlankOrderServiceImpl extends ServiceImpl<ApsBlankOrderDao, ApsB
             String res = "needWait";
             while (res.equals("needWait")) {
                 res = doRestartSchedule(bocaiTenantId);
-                try {
-                    Thread.sleep(640000);
-                } catch (InterruptedException e) {
-                    throw new RuntimeException(e);
+                if (res.equals("needWait")) {
+                    try {
+                        Thread.sleep(640000);
+                    } catch (InterruptedException e) {
+                        throw new RuntimeException(e);
+                    }
                 }
             }
             if (res.equals("success")) {//调度之后,预排程