1.初始化项目类别

This commit is contained in:
大米 2023-12-25 11:12:58 +08:00
parent 7b3f7318ba
commit 2ce1562c33
1 changed files with 2 additions and 2 deletions

View File

@ -107,12 +107,12 @@ public class EbomInitProjectType {
BomNewEbomParentVO parent = getParent(child.getParentRowId()); BomNewEbomParentVO parent = getParent(child.getParentRowId());
if (Objects.nonNull(parent) && Objects.nonNull(parent.getProjectType()) && parent.getProjectType().equals("Q")) { if (Objects.nonNull(parent) && Objects.nonNull(parent.getProjectType()) && parent.getProjectType().equals("Q")) {
List<BomNewEbomParentVO> subChild = getChilds(child.getBomRowId()); List<BomNewEbomParentVO> subChild = getChilds(child.getBomRowId());
List<BomNewEbomParentVO> collect = subChild.stream().filter(u -> u.getMaterialCategoryCode().startsWith("1004")).collect(Collectors.toList()); List<BomNewEbomParentVO> collect = subChild.stream().filter(u -> StrUtil.isNotBlank(u.getMaterialCategoryCode()) && u.getMaterialCategoryCode().startsWith("1004")).collect(Collectors.toList());
collect.forEach(u -> u.setProjectType("L")); collect.forEach(u -> u.setProjectType("L"));
} }
//11 //11
if ((child.getMaterialCategoryCode().startsWith("10") || child.getMaterialCategoryCode().startsWith("40")) && !child.getMaterialCategoryCode().startsWith("1013") && !child.getMaterialCategoryCode().startsWith("100601")); if (StrUtil.isNotBlank(child.getMaterialCategoryCode()) && (child.getMaterialCategoryCode().startsWith("10") || child.getMaterialCategoryCode().startsWith("40")) && !child.getMaterialCategoryCode().startsWith("1013") && !child.getMaterialCategoryCode().startsWith("100601"));
{ {
MaterialHistoryProjectTypeVO materialHistoryProjectType = SpringUtil.getBean(BomNewEbomParentMapper.class).getMaterialHistoryProjectType(child.getMaterialNo()); MaterialHistoryProjectTypeVO materialHistoryProjectType = SpringUtil.getBean(BomNewEbomParentMapper.class).getMaterialHistoryProjectType(child.getMaterialNo());
if (Objects.nonNull(materialHistoryProjectType)) { if (Objects.nonNull(materialHistoryProjectType)) {