Merge remote-tracking branch 'origin/feature/DM/nflg-bom-transition-sit' into feature/DM/nflg-bom-transition
This commit is contained in:
commit
fab3d4f66c
|
|
@ -326,11 +326,8 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
||||||
List<String> materialNos = parentChild.stream().map(BaseMaterialVO::getMaterialNo).collect(Collectors.toList());
|
List<String> materialNos = parentChild.stream().map(BaseMaterialVO::getMaterialNo).collect(Collectors.toList());
|
||||||
if (CollUtil.isNotEmpty(materialNos)) {
|
if (CollUtil.isNotEmpty(materialNos)) {
|
||||||
List<BomNewPbomParentEntity> list = this.lambdaQuery().in(BomNewPbomParentEntity::getMaterialNo, materialNos)
|
List<BomNewPbomParentEntity> list = this.lambdaQuery().in(BomNewPbomParentEntity::getMaterialNo, materialNos)
|
||||||
// .eq(PBomStatusEnum.PUBLISH.equalsValue(parent.getStatus()), BomNewPbomParentEntity::getLastVersionIs, 1)
|
.eq(type.equals(0), BomNewPbomParentEntity::getLastVersionIs, 1)
|
||||||
// .lt(!PBomStatusEnum.PUBLISH.equalsValue(parent.getStatus()),BomNewPbomParentEntity::getStatus,PBomStatusEnum.PUBLISH.getValue())
|
.ge(type.equals(1), BomNewPbomParentEntity::getStatus, PBomStatusEnum.PUBLISH.getValue())
|
||||||
// .eq(PBomStatusEnum.PUBLISH.equalsValue(parent.getStatus()),BomNewPbomParentEntity::getStatus, PBomStatusEnum.PUBLISH.getValue())
|
|
||||||
.eq(PBomStatusEnum.PUBLISH.getValue() > parent.getStatus(), BomNewPbomParentEntity::getLastVersionIs, 1)
|
|
||||||
.ge(PBomStatusEnum.PUBLISH.getValue() <= parent.getStatus(), BomNewPbomParentEntity::getStatus, PBomStatusEnum.PUBLISH.getValue())
|
|
||||||
.eq(BomNewPbomParentEntity::getFacCode,parent.getFacCode())
|
.eq(BomNewPbomParentEntity::getFacCode,parent.getFacCode())
|
||||||
.list();
|
.list();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ public class EBomToPBom extends EBomToPbomBase {
|
||||||
List<BomNewEbomParentVO> child = result.stream().filter(u -> u.getParentRowId().equals(vo.getBomRowId()) && !childDelMaterialNos.contains(u.getMaterialNo())).distinct().collect(Collectors.toList());
|
List<BomNewEbomParentVO> child = result.stream().filter(u -> u.getParentRowId().equals(vo.getBomRowId()) && !childDelMaterialNos.contains(u.getMaterialNo())).distinct().collect(Collectors.toList());
|
||||||
List<BomNewEbomParentVO> mergeChild = mergeChild(child);
|
List<BomNewEbomParentVO> mergeChild = mergeChild(child);
|
||||||
//判断pbom 是否一致
|
//判断pbom 是否一致
|
||||||
if( compareContentIsSame(vo, mergeChild, facCode)){
|
if( compareContentIsSame(vo, mergeChild, facCode) && !vo.getMaterialNo().equals(parent.getMaterialNo())){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
BomNewPbomParentEntity parentEnt = buildPBomParent(vo, facCode,parentList);
|
BomNewPbomParentEntity parentEnt = buildPBomParent(vo, facCode,parentList);
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,7 @@ public class EBomToPBomFor31 extends EBomToPbomBase {
|
||||||
//子级
|
//子级
|
||||||
List<BomNewEbomParentVO> child = facBomDataMp.get(facCode).stream().filter(u -> u.getParentRowId().equals(vo.getBomRowId()) && !childDelMaterialNos.contains(u.getMaterialNo())).distinct().collect(Collectors.toList());
|
List<BomNewEbomParentVO> child = facBomDataMp.get(facCode).stream().filter(u -> u.getParentRowId().equals(vo.getBomRowId()) && !childDelMaterialNos.contains(u.getMaterialNo())).distinct().collect(Collectors.toList());
|
||||||
List<BomNewEbomParentVO> mergeChild = mergeChild(child);
|
List<BomNewEbomParentVO> mergeChild = mergeChild(child);
|
||||||
if(compareContentIsSame(vo, mergeChild, facCode)){
|
if(compareContentIsSame(vo, mergeChild, facCode) && !vo.getMaterialNo().equals(parent.getMaterialNo())){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
BomNewPbomParentEntity parentEnt = buildPBomParent(vo, facCode, parentList);
|
BomNewPbomParentEntity parentEnt = buildPBomParent(vo, facCode, parentList);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue