1.初始化项目类别

This commit is contained in:
大米 2023-12-24 12:06:24 +08:00
parent eb19755b41
commit 4d706bf7bb
1 changed files with 1 additions and 1 deletions

View File

@ -133,7 +133,7 @@ public class EbomInitProjectType {
sameLevelChild = getChilds(child.getParentRowId()); sameLevelChild = getChilds(child.getParentRowId());
sResult = sameLevelChild.stream().filter(u -> u.getMaterialCategoryCode().startsWith("2005") || u.getMaterialCategoryCode().startsWith("2006")).collect(Collectors.toList()); sResult = sameLevelChild.stream().filter(u -> u.getMaterialCategoryCode().startsWith("2005") || u.getMaterialCategoryCode().startsWith("2006")).collect(Collectors.toList());
if (CollUtil.isNotEmpty(sResult)) { if (CollUtil.isNotEmpty(sResult)) {
List<String> projectType = sResult.stream().map(u -> u.getProjectType()).distinct().collect(Collectors.toList()); List<String> projectType = sResult.stream().filter(u->StrUtil.isNotBlank(u.getProjectType())).map(u -> u.getProjectType()).distinct().collect(Collectors.toList());
if (projectType.size() == 1 && projectType.get(0).equals("Q")) { if (projectType.size() == 1 && projectType.get(0).equals("Q")) {
child.setProjectType("Q"); child.setProjectType("Q");
} }