同步BUG修复
This commit is contained in:
parent
9bf5504fbf
commit
bdf6232e15
|
@ -1312,6 +1312,12 @@ public class ExportInHandler implements BaseHandler {
|
|||
@ApiOperation("整船审核")
|
||||
@PostMapping("/check/voyage")
|
||||
public Result<String> checkVoyage(@RequestBody @Validated(ValidationGroup.insert.class) VoyageAuditVo check) throws Exception {
|
||||
// 待审核的数据
|
||||
List<CustomerExportIn> 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<CustomerExportIn> 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");
|
||||
}
|
||||
|
||||
|
|
|
@ -789,6 +789,8 @@ public class CustomerServiceImpl implements CustomerService {
|
|||
@Async
|
||||
public void syncAddExportInToOld(List<CustomerExportIn> list) {
|
||||
log.info("进入同步方法");
|
||||
log.info("同步配置: " + JSONObject.toJSONString(syncConfig));
|
||||
log.info("同步原始数据:" + JSONObject.toJSONString(list));
|
||||
if (!syncConfig.getSync() || CollectionUtils.isEmpty(list)) { // 没有打开同步或,列表为空真直接返回
|
||||
return;
|
||||
}
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue