Merge branch 'refs/heads/feature/DM/nflg-bom' into feature/DM/nflg-bom-transition
This commit is contained in:
commit
5643eab9ec
|
|
@ -1,3 +1,5 @@
|
|||
target
|
||||
.idea
|
||||
logs
|
||||
/ABAP_AS_WITH_POOL.jcoDestination
|
||||
/dev_jco_rfc.trc
|
||||
|
|
|
|||
|
|
@ -974,24 +974,28 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
|||
} else if (sapDto.getT1().size() != liErrMsg.size()) {
|
||||
state = SapStatusEnum.PUB_ERROR;
|
||||
}
|
||||
if (CollUtil.isNotEmpty(liErrMsg)) {
|
||||
bomNewSapErrorMsgService.getBaseMapper().delete(Wrappers.lambdaQuery(BomNewSapErrorMsgEntity.class)
|
||||
.eq(BomNewSapErrorMsgEntity::getTargetRowId, rootBomRowId));
|
||||
} else {
|
||||
BomNewSapErrorMsgEntity sapErrorMsgEntity = new BomNewSapErrorMsgEntity();
|
||||
sapErrorMsgEntity.setTargetRowId(rootBomRowId);
|
||||
sapErrorMsgEntity.setType(0);
|
||||
sapErrorMsgEntity.setData(JSON.toJSONString(liErrMsg));
|
||||
sapErrorMsgEntity.setCreatedName(SessionUtil.getRealName());
|
||||
sapErrorMsgEntity.setCreatedTime(LocalDateTime.now());
|
||||
bomNewSapErrorMsgService.saveOrUpdate(sapErrorMsgEntity);
|
||||
}
|
||||
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));
|
||||
|
||||
if (CollUtil.isNotEmpty(liErrMsg)) {
|
||||
BomNewSapErrorMsgEntity sapErrorMsgEntity = new BomNewSapErrorMsgEntity();
|
||||
sapErrorMsgEntity.setTargetRowId(rootBomRowId);
|
||||
sapErrorMsgEntity.setType(0);
|
||||
sapErrorMsgEntity.setData(JSON.toJSONString(liErrMsg));
|
||||
sapErrorMsgEntity.setCreatedName(SessionUtil.getRealName());
|
||||
sapErrorMsgEntity.setCreatedTime(LocalDateTime.now());
|
||||
bomNewSapErrorMsgService.saveOrUpdate(sapErrorMsgEntity);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateSapState(Long rootBomRowId, SapStatusEnum sapState) {
|
||||
lambdaUpdate().eq(BomNewEbomParentEntity::getRowId, rootBomRowId)
|
||||
.set(BomNewEbomParentEntity::getSapTime, LocalDateTime.now())
|
||||
|
|
|
|||
Loading…
Reference in New Issue