暂存/提交验证调整
This commit is contained in:
parent
d055077b3f
commit
83aaed97f6
|
|
@ -377,6 +377,7 @@ public class EbomApi extends BaseApi {
|
||||||
@ApiOperation("提交")
|
@ApiOperation("提交")
|
||||||
@LogRecord(success = "Ebom-提交,物料编码:{{#dto.parent.materialNo}}-版本:{{#dto.parent.currentVersion}},操作结果:{{#_ret}}", bizNo = "{{#dto.parent.rowId}}",type = "Ebom-提交")
|
@LogRecord(success = "Ebom-提交,物料编码:{{#dto.parent.materialNo}}-版本:{{#dto.parent.currentVersion}},操作结果:{{#_ret}}", bizNo = "{{#dto.parent.rowId}}",type = "Ebom-提交")
|
||||||
public ResultVO<Boolean> submit(@RequestBody BomNewEBomParentEditDTO dto) throws ExecutionException, InterruptedException {
|
public ResultVO<Boolean> submit(@RequestBody BomNewEBomParentEditDTO dto) throws ExecutionException, InterruptedException {
|
||||||
|
|
||||||
return ResultVO.success(bomNewEbomParentService.submit(dto));
|
return ResultVO.success(bomNewEbomParentService.submit(dto));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1520,6 +1520,17 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public BomNewEbomParentVO temporary(BomNewEBomParentEditDTO dto) throws ExecutionException, InterruptedException {
|
public BomNewEbomParentVO temporary(BomNewEBomParentEditDTO dto) throws ExecutionException, InterruptedException {
|
||||||
|
|
||||||
|
|
||||||
|
if (CollectionUtil.isNotEmpty(dto.getDelDatas())) {
|
||||||
|
deleteBomChild(dto.getDelDatas());
|
||||||
|
}
|
||||||
|
|
||||||
|
//暂存数据为空后面不处理
|
||||||
|
if (CollUtil.isEmpty(dto.getDatas())) {
|
||||||
|
return dto.getParent();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
EBomEdit eBomEdit = new EBomEdit(EBomSourceEnum.FROM_MDM.getValue());
|
EBomEdit eBomEdit = new EBomEdit(EBomSourceEnum.FROM_MDM.getValue());
|
||||||
dto.setOpType(EbomEditStatusEnum.HANDLER_CREATED.getValue());
|
dto.setOpType(EbomEditStatusEnum.HANDLER_CREATED.getValue());
|
||||||
eBomEdit.handleBom(dto);
|
eBomEdit.handleBom(dto);
|
||||||
|
|
@ -1561,6 +1572,15 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean submit(BomNewEBomParentEditDTO dto) throws ExecutionException, InterruptedException {
|
public Boolean submit(BomNewEBomParentEditDTO dto) throws ExecutionException, InterruptedException {
|
||||||
|
|
||||||
|
|
||||||
|
if (CollectionUtil.isNotEmpty(dto.getDelDatas())) {
|
||||||
|
deleteBomChild(dto.getDelDatas());
|
||||||
|
}
|
||||||
|
|
||||||
|
//无提交数据后面不处理
|
||||||
|
if (CollUtil.isEmpty(dto.getDatas())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
EBomEdit eBomEdit = new EBomEdit(EBomSourceEnum.FROM_MDM.getValue());
|
EBomEdit eBomEdit = new EBomEdit(EBomSourceEnum.FROM_MDM.getValue());
|
||||||
dto.setOpType(EbomEditStatusEnum.HANDLER_FINISHED.getValue());
|
dto.setOpType(EbomEditStatusEnum.HANDLER_FINISHED.getValue());
|
||||||
eBomEdit.handleBom(dto);
|
eBomEdit.handleBom(dto);
|
||||||
|
|
@ -1576,12 +1596,6 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
EBomExceptionStatusEnum.EXCEPT_NO_10.getValue()
|
EBomExceptionStatusEnum.EXCEPT_NO_10.getValue()
|
||||||
});
|
});
|
||||||
|
|
||||||
if (dto.getParent() != null) {
|
|
||||||
if (CollectionUtil.isNotEmpty(dto.getDelDatas())) {
|
|
||||||
deleteBomChild(dto.getDelDatas());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (eBomEdit.getParentEntity() != null) {
|
if (eBomEdit.getParentEntity() != null) {
|
||||||
this.saveOrUpdate(eBomEdit.getParentEntity());
|
this.saveOrUpdate(eBomEdit.getParentEntity());
|
||||||
|
|
@ -1598,7 +1612,6 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (CollectionUtil.isNotEmpty(eBomEdit.childEntities)) {
|
if (CollectionUtil.isNotEmpty(eBomEdit.childEntities)) {
|
||||||
ebomChildService.saveOrUpdateBatch(eBomEdit.childEntities);
|
ebomChildService.saveOrUpdateBatch(eBomEdit.childEntities);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue