feat: 相同编号的物料,如果项目类型不同,则判断为正常,否则提示数据重复

This commit is contained in:
曹鹏飞 2024-04-25 13:33:18 +08:00
parent 67160f8f1f
commit b34beca4f2
1 changed files with 7 additions and 3 deletions

View File

@ -158,11 +158,15 @@ public class CheckEBomException {
for (String key : childMaterialMap.keySet()) {
List<BomNewEbomParentVO> materialGroupList = childMaterialMap.get(key);
if (materialGroupList.size() > 1) {
materialGroupList.forEach(u -> {
u.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_6.getValue());
Map<String, List<BomNewEbomParentVO>> m2 = ListCommonUtil.listGroupMap(materialGroupList, BomNewEbomParentVO::getProjectType);
m2.forEach((mk, mv) -> {
if (mv.size() > 1) {
mv.forEach(u -> {
u.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_6.getValue());
});
}
});
}
}
if (ProjectTypeInputTypeEnum.ProjectTypeEnum.TYPE_Q.getValue().equals(parent.getProjectType())) {
List<BomNewEbomParentVO> qList = child.stream().filter(u -> ProjectTypeInputTypeEnum.ProjectTypeEnum.TYPE_Q.getValue().equals(u.getProjectType())).collect(Collectors.toList());