转EBOM时-bug修复-PBOM发布报错
This commit is contained in:
parent
460de25178
commit
3b7db353b0
|
|
@ -1197,6 +1197,10 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
||||||
.eq(BomNewPbomParentEntity::getMaterialNo, newPBom.getMaterialNo())
|
.eq(BomNewPbomParentEntity::getMaterialNo, newPBom.getMaterialNo())
|
||||||
.ge(BomNewPbomParentEntity::getStatus,PBomStatusEnum.PUBLISH.getValue())
|
.ge(BomNewPbomParentEntity::getStatus,PBomStatusEnum.PUBLISH.getValue())
|
||||||
.eq(BomNewPbomParentEntity::getFacCode, newPBom.getFacCode()).last(" order by current_version desc limit 1").one();
|
.eq(BomNewPbomParentEntity::getFacCode, newPBom.getFacCode()).last(" order by current_version desc limit 1").one();
|
||||||
|
if(Objects.isNull(oldParent)){
|
||||||
|
newPBom.setCurrentVersion(VersionUtil.getNextVersion(""));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
//旧bom除T项之外
|
//旧bom除T项之外
|
||||||
List<BomNewPbomParentVO> oldBomDetail = this.getBaseMapper().getParentChild(oldParent.getRowId());
|
List<BomNewPbomParentVO> oldBomDetail = this.getBaseMapper().getParentChild(oldParent.getRowId());
|
||||||
List<BomNewPbomParentVO> oldBomNoTChildren = oldBomDetail.stream().filter(u -> !EBomConstant.PROJECT_TYPE_T.equalsIgnoreCase(u.getProjectType())).collect(Collectors.toList());
|
List<BomNewPbomParentVO> oldBomNoTChildren = oldBomDetail.stream().filter(u -> !EBomConstant.PROJECT_TYPE_T.equalsIgnoreCase(u.getProjectType())).collect(Collectors.toList());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue