1、一般零部件-下挂问题修复
This commit is contained in:
parent
bfdeca90f8
commit
71c4568661
|
|
@ -246,11 +246,19 @@ public class OriginalBomToEBomV2Convert extends BaseConvert {
|
|||
List<BomNewEbomChildEntity> oldParenChild = SpringUtil.getBean(BomNewEbomChildMapper.class).getChildByMaterialNo(parentEntity.getMaterialNo());
|
||||
//不存在EBom 时
|
||||
if (Objects.isNull(oldEBom)) {
|
||||
buildCommonMaterialChildBom(childVo, materialBaseInfo, VersionUtil.getNextVersion(""));
|
||||
|
||||
buildCommonMaterialChildBom(childVo, materialBaseInfo, VersionUtil.getNextVersion(""));
|
||||
} else {
|
||||
if (!EBomStatusEnum.PUBLISHED.equalsValue(oldEBom.getStatus())) {
|
||||
BomNewEbomChildEntity newChild = buildCommonEbomChildEntity(materialBaseInfo, parentEntity);
|
||||
List<BomNewEbomChildEntity> oldChild = ebomChildService.lambdaQuery().eq(BomNewEbomChildEntity::getParentRowId, oldEBom.getRowId()).list();
|
||||
if(CollUtil.isNotEmpty(oldChild)){
|
||||
List<BomNewEbomChildEntity> oldChildEntityList = oldChild.stream().filter(u->u.getMaterialNo().equals(materialBaseInfo.getMaterialNo())).collect(Collectors.toList());
|
||||
BomNewEbomChildEntity oldChildEntity=CollUtil.isNotEmpty(oldChildEntityList)?oldChildEntityList.get(0):null;
|
||||
if( Objects.nonNull(oldChildEntity) && Objects.nonNull(oldChildEntity.getNum()) && oldChildEntity.getNum().compareTo(childVo.getUnitWeight())>0){
|
||||
continue;
|
||||
}
|
||||
}
|
||||
BomNewEbomChildEntity newChild = buildCommonEbomChildEntity(materialBaseInfo, childVo);
|
||||
//结构是否相同 且为同一个人
|
||||
if ( oldEBom.getCreatedBy().equals(parentEntity.getCreatedBy())) {
|
||||
ebomParentService.getBaseMapper().deleteById(oldEBom.getRowId());
|
||||
|
|
|
|||
Loading…
Reference in New Issue