fix: 修复一个bug

This commit is contained in:
曹鹏飞 2024-04-16 15:30:24 +08:00
parent e7f7b4c15c
commit 50fd8f6e9a
1 changed files with 10 additions and 3 deletions

View File

@ -692,6 +692,13 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
.throwMessage("仙桃工厂(1020)下的子级必须也是仙桃"); .throwMessage("仙桃工厂(1020)下的子级必须也是仙桃");
if (params.getSetSubNode().equals(0)) { 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()); return saveAllocationFactory(params.getData());
} else { } else {
params.getData().forEach(k -> { params.getData().forEach(k -> {