Merge branch 'feature/DM/nflg-bom' of http://112.74.186.154:3000/nflj/nflg_project into feature/DM/nflg-bom
This commit is contained in:
commit
63f125918a
|
|
@ -1496,16 +1496,10 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
eBomDel.classifyBom();
|
eBomDel.classifyBom();
|
||||||
|
|
||||||
if (CollectionUtil.isNotEmpty(eBomDel.getDelEBom())) {
|
if (CollectionUtil.isNotEmpty(eBomDel.getDelEBom())) {
|
||||||
|
//取bom信息删除
|
||||||
|
this.getBaseMapper().delBatch(eBomDel.getDelEBom().stream()
|
||||||
List<Long> bomRowIdList= eBomDel.getDelEBom().stream()
|
.map(BomNewEbomParentVO::getBomRowId)
|
||||||
.map(BomNewEbomParentVO::getBomRowId) .collect(Collectors.toList());
|
.collect(Collectors.toList()));
|
||||||
|
|
||||||
|
|
||||||
//取bom信息删除 parent child删除
|
|
||||||
this.getBaseMapper().delBatch(bomRowIdList);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1514,10 +1508,6 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
List<Long> rowIds = eBomDel.getRevertOBom().stream().map(BomNewEbomParentVO::getSourceRowId).collect(Collectors.toList());
|
List<Long> rowIds = eBomDel.getRevertOBom().stream().map(BomNewEbomParentVO::getSourceRowId).collect(Collectors.toList());
|
||||||
SpringUtil.getBean(BomNewOriginalParentService.class).revertBom(rowIds);
|
SpringUtil.getBean(BomNewOriginalParentService.class).revertBom(rowIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (CollectionUtil.isNotEmpty(eBomDel.getDelEBom())) {
|
if (CollectionUtil.isNotEmpty(eBomDel.getDelEBom())) {
|
||||||
|
|
||||||
ThreadUtil.execAsync(() -> computeLevelNumAndRootState());
|
ThreadUtil.execAsync(() -> computeLevelNumAndRootState());
|
||||||
|
|
@ -1604,15 +1594,8 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
queryWrapper.lambda().eq(BomNewEbomParentEntity::getMaterialNo, eBomEdit.getParentEntity().getMaterialNo());
|
queryWrapper.lambda().eq(BomNewEbomParentEntity::getMaterialNo, eBomEdit.getParentEntity().getMaterialNo());
|
||||||
queryWrapper.lambda().eq(BomNewEbomParentEntity::getLastVersionIs, 1);
|
queryWrapper.lambda().eq(BomNewEbomParentEntity::getLastVersionIs, 1);
|
||||||
queryWrapper.lambda().notIn(BomNewEbomParentEntity::getRowId, eBomEdit.getParentEntity().getRowId());
|
queryWrapper.lambda().notIn(BomNewEbomParentEntity::getRowId, eBomEdit.getParentEntity().getRowId());
|
||||||
BomNewEbomParentEntity oldParent= this.getOne(queryWrapper);
|
|
||||||
if(oldParent!=null){
|
|
||||||
eBomEdit.getParentEntity().setCurrentVersion(oldParent.getCurrentVersion());
|
|
||||||
BomNewEbomParentEntity updateOld=new BomNewEbomParentEntity();
|
|
||||||
updateOld.setLastVersionIs(0);
|
|
||||||
updateOld.setModifyTime(LocalDateTime.now());
|
|
||||||
updateOld.setRowId(oldParent.getRowId());
|
|
||||||
this.updateById(updateOld);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1669,25 +1652,6 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
|
|
||||||
|
|
||||||
if (eBomEdit.getParentEntity() != null) {
|
if (eBomEdit.getParentEntity() != null) {
|
||||||
|
|
||||||
if(ObjectUtil.isNotNull(eBomEdit.getParentEntity().getLastVersionIs()) && ObjectUtil.equal(eBomEdit.getParentEntity().getLastVersionIs(),1)) {
|
|
||||||
QueryWrapper<BomNewEbomParentEntity> queryWrapper = new QueryWrapper<>();
|
|
||||||
queryWrapper.lambda().eq(BomNewEbomParentEntity::getMaterialNo, eBomEdit.getParentEntity().getMaterialNo());
|
|
||||||
queryWrapper.lambda().eq(BomNewEbomParentEntity::getLastVersionIs, 1);
|
|
||||||
queryWrapper.lambda().notIn(BomNewEbomParentEntity::getRowId, eBomEdit.getParentEntity().getRowId());
|
|
||||||
BomNewEbomParentEntity oldParent= this.getOne(queryWrapper);
|
|
||||||
if(oldParent!=null){
|
|
||||||
eBomEdit.getParentEntity().setCurrentVersion(oldParent.getCurrentVersion());
|
|
||||||
BomNewEbomParentEntity updateOld=new BomNewEbomParentEntity();
|
|
||||||
updateOld.setLastVersionIs(0);
|
|
||||||
updateOld.setModifyTime(LocalDateTime.now());
|
|
||||||
updateOld.setRowId(oldParent.getRowId());
|
|
||||||
this.updateById(updateOld);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
this.saveOrUpdate(eBomEdit.getParentEntity());
|
this.saveOrUpdate(eBomEdit.getParentEntity());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1710,6 +1674,12 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
|
|
||||||
// checkAndSaveEBomException(dto.getParent().getBomRowId());
|
// checkAndSaveEBomException(dto.getParent().getBomRowId());
|
||||||
|
|
||||||
|
List<BomNewEbomParentVO> childList = dto.getDatas();
|
||||||
|
|
||||||
|
if (dto.getParent().getRootIs() == null || dto.getParent().getRootIs() == 0) {
|
||||||
|
childList.add(dto.getParent());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue