fix(ebom): 修复导入到sap的错误信息保存问题
This commit is contained in:
parent
cacbdc0fc8
commit
1cb3869052
|
|
@ -1,3 +1,5 @@
|
|||
target
|
||||
.idea
|
||||
logs
|
||||
/ABAP_AS_WITH_POOL.jcoDestination
|
||||
/dev_jco_rfc.trc
|
||||
|
|
|
|||
|
|
@ -976,10 +976,18 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
|||
} else if (sapDto.getT1().size() != liErrMsg.size()) {
|
||||
state = SapStatusEnum.PUB_ERROR;
|
||||
}
|
||||
if (CollUtil.isNotEmpty(liErrMsg)) {
|
||||
saveSapErrorMsg(rootBomRowId, liErrMsg);
|
||||
} finally {
|
||||
updateSapState(rootBomRowId, state);
|
||||
}
|
||||
return liErrMsg;
|
||||
}
|
||||
|
||||
private void saveSapErrorMsg(Long rootBomRowId, List<OperationErrorMsgVO> liErrMsg) {
|
||||
bomNewSapErrorMsgService.getBaseMapper().delete(Wrappers.lambdaQuery(BomNewSapErrorMsgEntity.class)
|
||||
.eq(BomNewSapErrorMsgEntity::getTargetRowId, rootBomRowId));
|
||||
} else {
|
||||
|
||||
if (CollUtil.isNotEmpty(liErrMsg)) {
|
||||
BomNewSapErrorMsgEntity sapErrorMsgEntity = new BomNewSapErrorMsgEntity();
|
||||
sapErrorMsgEntity.setTargetRowId(rootBomRowId);
|
||||
sapErrorMsgEntity.setType(0);
|
||||
|
|
@ -988,10 +996,6 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
|||
sapErrorMsgEntity.setCreatedTime(LocalDateTime.now());
|
||||
bomNewSapErrorMsgService.saveOrUpdate(sapErrorMsgEntity);
|
||||
}
|
||||
} finally {
|
||||
updateSapState(rootBomRowId, state);
|
||||
}
|
||||
return liErrMsg;
|
||||
}
|
||||
|
||||
private void updateSapState(Long rootBomRowId, SapStatusEnum sapState) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue