原材料规则

This commit is contained in:
luoliming 2024-02-13 16:31:18 +08:00
parent 435589379a
commit 05ba87c822
2 changed files with 13 additions and 0 deletions

View File

@ -130,6 +130,12 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
data.addAll(parents);
data.addAll(childs);
materialMainService.intiMaterialInfo(data, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
for (BomNewEbomParentVO vi : childs) {
if (StrUtil.isBlank(vi.getCurrentVersion()) && MaterialshouldBomExistUtil.checkShouldBomExist(vi)) {
vi.setCurrentVersion(OriginalConstant.NO_BOM_VERSION);
}
}
returnResult = handSeachToTree(parents, childs);
}
}

View File

@ -125,6 +125,13 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
List<BomNewPbomParentVO> data = new ArrayList<>();
data.addAll(parents);
data.addAll(childs);
for (BomNewPbomParentVO vi : childs) {
if (StrUtil.isBlank(vi.getCurrentVersion()) && MaterialshouldBomExistUtil.checkShouldBomExist(vi)) {
vi.setCurrentVersion(OriginalConstant.NO_BOM_VERSION);
}
}
materialMainService.intiMaterialInfo(data, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
return handSeachToTree(parents, childs);
}