diff --git a/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/MpsFormalBatchMain.java b/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/MpsFormalBatchMain.java index ded139f..9bfac80 100644 --- a/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/MpsFormalBatchMain.java +++ b/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/MpsFormalBatchMain.java @@ -197,8 +197,8 @@ public class MpsFormalBatchMain { } // 等待60分钟后重新检查 - batchLogger.info("等待60分钟后重新检查状态"); - TimeUnit.MINUTES.sleep(60); + batchLogger.info("等待10分钟后重新检查状态"); + TimeUnit.MINUTES.sleep(10); return executeBatch(context); // 递归调用 } @@ -299,6 +299,7 @@ public class MpsFormalBatchMain { private boolean executeNormalBatch(String batchMonth) { try { // 检查是否可以执行预处理批量 + // importStatus=0 and (preBatchStatus=0 or preBatchStatus=3) if (batchStatusService.canExecutePreBatch(batchMonth)) { // 更新状态为进行中 batchStatusService.updateBatchStatus( @@ -316,6 +317,7 @@ public class MpsFormalBatchMain { } // 检查是否可以执行正式批量 + // preBatchStatus=1 and checkStatus=1 and (afterBatchStatus=0 or afterBatchStatus=3) if (batchStatusService.canExecuteMainBatch(batchMonth)) { // 更新状态为进行中 batchStatusService.updateBatchStatus( @@ -330,14 +332,14 @@ public class MpsFormalBatchMain { // 如果导入状态未完成,等待60分钟 if (!batchStatusService.isImportCompleted(batchMonth)) { - batchLogger.info("导入状态未完成,等待60分钟"); + batchLogger.info("导入状态未完成,等待状态修改"); batchStatusService.waitForImportCompletion(batchMonth, MAX_WAIT_HOURS); return executeNormalBatch(batchMonth); // 递归调用 } // 如果预处理和核对状态未完成,等待60分钟 if (!batchStatusService.isPreBatchCompletedAndChecked(batchMonth)) { - batchLogger.info("预处理和核对状态未完成,等待60分钟"); + batchLogger.info("预处理和核对状态未完成,等待状态修改"); batchStatusService.waitForPreBatchCompletion(batchMonth, MAX_WAIT_HOURS); return executeNormalBatch(batchMonth); // 递归调用 } diff --git a/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/processor/biz/BIZ017Processor.java b/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/processor/biz/BIZ017Processor.java index 1304938..9c01dae 100644 --- a/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/processor/biz/BIZ017Processor.java +++ b/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/processor/biz/BIZ017Processor.java @@ -76,7 +76,7 @@ public class BIZ017Processor extends AbstractBusinessProcessor { " SELECT 1 FROM mps_import_zhiefu_indv s " + " WHERE import_time=? and s.crt_no = m.cust_id ) " + " THEN '1' ELSE '9' END " + - ", check_flag = CASE " + + ", check_msg = CASE " + " WHEN EXISTS ( " + " SELECT 1 FROM mps_import_zhiefu_indv s " + " WHERE import_time=? and s.crt_no = m.cust_id ) " + diff --git a/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/service/BatchStatusService.java b/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/service/BatchStatusService.java index 3b0f3d1..875a41e 100644 --- a/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/service/BatchStatusService.java +++ b/MpsFormalBatch/src/main/java/com/gtsoft/mps/batch/service/BatchStatusService.java @@ -275,8 +275,8 @@ public class BatchStatusService { long maxWaitMillis = TimeUnit.HOURS.toMillis(maxWaitHours); while (System.currentTimeMillis() - startTime < maxWaitMillis) { - batchLogger.info("等待导入状态完成,60分钟后重新检查..."); - TimeUnit.MINUTES.sleep(60); + batchLogger.info("等待导入状态完成,10分钟后重新检查..."); + TimeUnit.MINUTES.sleep(10); // 检查导入状态是否完成 if (isImportCompleted(batchMonth)) { @@ -302,8 +302,8 @@ public class BatchStatusService { long maxWaitMillis = TimeUnit.HOURS.toMillis(maxWaitHours); while (System.currentTimeMillis() - startTime < maxWaitMillis) { - batchLogger.info("等待预处理和核对状态完成,60分钟后重新检查..."); - TimeUnit.MINUTES.sleep(60); + batchLogger.info("等待预处理和核对状态完成,10分钟后重新检查..."); + TimeUnit.MINUTES.sleep(10); // 检查预处理和核对状态是否完成 if (isPreBatchCompletedAndChecked(batchMonth)) {