pbom-物料显示在别人BOM下及其他问题处理
This commit is contained in:
parent
a356e4d242
commit
f3ba4c8248
|
|
@ -992,6 +992,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
|||
parent.setBomRowId(parent.getRowId());
|
||||
parent.setChildBomRowId(parent.getRowId());
|
||||
parent.setParentRowId(0L);
|
||||
parent.setUserRootIs(1);
|
||||
bomTree.add(parent);
|
||||
|
||||
EBomToPbomBase eBomToPBom =parent.getMaterialNo().startsWith("31")? new EBomToPBomFor31(parent, bomTree, paramDto.getFacCodes(), 0L,EnumUtils.getValueEnum(ConvertToPBomModelEnum.class,paramDto.getConvertMode())):new EBomToPBom(parent, bomTree, paramDto.getFacCodes(), 0L,EnumUtils.getValueEnum(ConvertToPBomModelEnum.class,paramDto.getConvertMode()));
|
||||
|
|
@ -1177,6 +1178,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
|||
parent.setBomRowId(parent.getRowId());
|
||||
parent.setChildBomRowId(parent.getRowId());
|
||||
parent.setParentRowId(0L);
|
||||
parent.setUserRootIs(1);
|
||||
bomTree.add(parent);
|
||||
FormalEBomToPbomBase eBomToPBom =parent.getMaterialNo().startsWith("31")? new EBomToPBomForFormal31New(parent, bomTree, paramDto.getFacCodes(), 0L,EnumUtils.getValueEnum(ConvertToPBomModelEnum.class,paramDto.getConvertMode())):new EBomToPBomForFormalNew(parent, bomTree, paramDto.getFacCodes(), 0L,EnumUtils.getValueEnum(ConvertToPBomModelEnum.class,paramDto.getConvertMode()));
|
||||
eBomToPBom.convert();
|
||||
|
|
|
|||
|
|
@ -1156,9 +1156,9 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
|||
this.delPBom(delNoReleaseBom);
|
||||
}
|
||||
|
||||
List<Long> bomRowIds = allBom.stream().filter(u -> PBomStatusEnum.WAIT_PUBLISH.equalsValue(u.getStatus()) && u.getBomRowId() > 0 && !u.getDelIs().equals(1)).map(u -> u.getBomRowId()).collect(Collectors.toList());
|
||||
List<Long> bomRowIds = allBom.stream().filter(u -> SessionUtil.getUserCode().equals(u.getCreatedBy()) && PBomStatusEnum.WAIT_PUBLISH.equalsValue(u.getStatus()) && u.getBomRowId() > 0 && !u.getDelIs().equals(1)).map(u -> u.getBomRowId()).collect(Collectors.toList());
|
||||
|
||||
List<String> parentMaterialNos = allBom.stream().filter(u -> PBomStatusEnum.WAIT_PUBLISH.equalsValue(u.getStatus()) && u.getBomRowId() > 0 && !u.getDelIs().equals(1)).map(u->u.getMaterialNo()).collect(Collectors.toList());
|
||||
List<String> parentMaterialNos = allBom.stream().filter(u -> SessionUtil.getUserCode().equals(u.getCreatedBy()) && PBomStatusEnum.WAIT_PUBLISH.equalsValue(u.getStatus()) && u.getBomRowId() > 0 && !u.getDelIs().equals(1)).map(u->u.getMaterialNo()).collect(Collectors.toList());
|
||||
|
||||
//Integer state = (parent.getMaterialNo().startsWith("31") && parent.getFacCode().equals(EBomConstant.MAIN_FACTORY_CODE_1010)) ? PBomStatusEnum.WAIT_FACTORY.getValue() : PBomStatusEnum.PUBLISH.getValue();
|
||||
Integer state = parent.getMaterialNo().startsWith("31") ? PBomStatusEnum.FACTORY_CONFIRM.getValue() : PBomStatusEnum.PUBLISH.getValue();
|
||||
|
|
@ -1241,7 +1241,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
|||
|
||||
Set<String> oldChildSet0 = oldBomNoTChildren.stream().map(u -> u.getMaterialNoAndNumAndProjectType()).collect(Collectors.toSet());
|
||||
Set<String> newChildSet0 = newBomNoTChildren.stream().map(u -> u.getMaterialNoAndNumAndProjectType()).collect(Collectors.toSet());
|
||||
if(oldChildSet0.equals(newChildSet0)){
|
||||
if(oldChildSet0.equals(newChildSet0) && SessionUtil.getUserCode().equals(newPBom.getCreatedBy()) ){
|
||||
newPBom.setStatus(PBomStatusEnum.PUBLISH.getValue());
|
||||
newPBom.setDelIs(1);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue