fix: 修复一个bug
This commit is contained in:
parent
e7f7b4c15c
commit
50fd8f6e9a
|
|
@ -691,9 +691,16 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
|||
&& params.getData().stream().anyMatch(u -> u.getProductionFactoryCode().equals(EBomConstant.XIAN_TAO_FACTORY_CODE_1020)))
|
||||
.throwMessage("仙桃工厂(1020)下的子级必须也是仙桃");
|
||||
|
||||
if( params.getSetSubNode().equals(0) ){
|
||||
return saveAllocationFactory(params.getData());
|
||||
}else {
|
||||
if (params.getSetSubNode().equals(0)) {
|
||||
params.getData().forEach(k -> {
|
||||
if (k.getProductionFactoryCode().equals(EBomConstant.MAIN_FACTORY_CODE_1010)
|
||||
&& CollUtil.isNotEmpty(k.getAllParentRowIds())) {
|
||||
//设置所有父级节点为1010
|
||||
pbomChildService.setParentFactoryCode1010(k.getAllParentRowIds());
|
||||
}
|
||||
});
|
||||
return saveAllocationFactory(params.getData());
|
||||
} else {
|
||||
params.getData().forEach(k -> {
|
||||
AllocationFactoryBomQuery query = new AllocationFactoryBomQuery();
|
||||
query.setBomRowId(k.getBomRowId());
|
||||
|
|
|
|||
Loading…
Reference in New Issue