diff --git a/nuzar-customer-controller/src/main/java/com/haitonggauto/rtosc/handler/ExportInHandler.java b/nuzar-customer-controller/src/main/java/com/haitonggauto/rtosc/handler/ExportInHandler.java index 9a31909..ebe98e5 100644 --- a/nuzar-customer-controller/src/main/java/com/haitonggauto/rtosc/handler/ExportInHandler.java +++ b/nuzar-customer-controller/src/main/java/com/haitonggauto/rtosc/handler/ExportInHandler.java @@ -1312,6 +1312,12 @@ public class ExportInHandler implements BaseHandler { @ApiOperation("整船审核") @PostMapping("/check/voyage") public Result checkVoyage(@RequestBody @Validated(ValidationGroup.insert.class) VoyageAuditVo check) throws Exception { + // 待审核的数据 + List list = customerExportInService.lambdaQuery() + .eq(CustomerExportIn::getCheckStatus, AuditEnum.AUDIT) + .eq(CustomerExportIn::getShipId, check.getShipId()) + .eq(CustomerExportIn::getVoyageId, check.getVoyageId()).list(); + boolean row = customerExportInService.lambdaUpdate() .set(CustomerExportIn::getCheckManId, UserContext.getUser().getUserId()) .set(CustomerExportIn::getCheckTime, new Date()) @@ -1323,15 +1329,6 @@ public class ExportInHandler implements BaseHandler { .update(); if (row) { - List list = customerExportInService.lambdaQuery() - .eq(CustomerExportIn::getCheckStatus, AuditEnum.AUDIT) - .eq(CustomerExportIn::getShipId, check.getShipId()) - .eq(CustomerExportIn::getVoyageId, check.getVoyageId()).list(); - - if (check.getCheckStatus() == AuditEnum.AUDIT_PASS) { - customerService.syncAddExportInToOld(list); - } - // 记录日志 for (CustomerExportIn exportIn : list) { LogRecordDTO log = new LogRecordDTO(); @@ -1343,6 +1340,10 @@ public class ExportInHandler implements BaseHandler { EsLogApprovalUtil.writeLog(log); } + if (check.getCheckStatus() == AuditEnum.AUDIT_PASS) { + customerService.syncAddExportInToOld(list); + } + return ResultUtil.success("success"); } diff --git a/nuzar-customer-controller/src/main/java/com/haitonggauto/rtosc/service/impl/CustomerServiceImpl.java b/nuzar-customer-controller/src/main/java/com/haitonggauto/rtosc/service/impl/CustomerServiceImpl.java index e8a691e..4a51376 100644 --- a/nuzar-customer-controller/src/main/java/com/haitonggauto/rtosc/service/impl/CustomerServiceImpl.java +++ b/nuzar-customer-controller/src/main/java/com/haitonggauto/rtosc/service/impl/CustomerServiceImpl.java @@ -789,6 +789,8 @@ public class CustomerServiceImpl implements CustomerService { @Async public void syncAddExportInToOld(List list) { log.info("进入同步方法"); + log.info("同步配置: " + JSONObject.toJSONString(syncConfig)); + log.info("同步原始数据:" + JSONObject.toJSONString(list)); if (!syncConfig.getSync() || CollectionUtils.isEmpty(list)) { // 没有打开同步或,列表为空真直接返回 return; } diff --git a/nuzar-customer-controller/src/main/resources/templates/in_temp.xlsx b/nuzar-customer-controller/src/main/resources/templates/in_temp.xlsx index 5eb4381..02a3a7f 100644 Binary files a/nuzar-customer-controller/src/main/resources/templates/in_temp.xlsx and b/nuzar-customer-controller/src/main/resources/templates/in_temp.xlsx differ