fix(feature/DM/nflg-bom): 如果是自己创建的根节点且异常状态为“项目类别为空”时,异常状态改为正常

This commit is contained in:
曹鹏飞 2024-03-26 13:45:21 +08:00
parent 686b65b0ba
commit 816fdad6c4
1 changed files with 8 additions and 2 deletions

View File

@ -144,8 +144,14 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
} }
} else { } else {
Page<BomNewEbomParentVO> result = this.getBaseMapper().getEBomListPage(new Page<>(query.getPage(), query.getPageSize()), query, userRoleService.getUserJob(), SessionUtil.getUserCode()); Page<BomNewEbomParentVO> result = this.getBaseMapper().getEBomListPage(new Page<>(query.getPage(), query.getPageSize()), query, userRoleService.getUserJob(), SessionUtil.getUserCode());
if (!result.getRecords().isEmpty()) {
materialMainService.intiMaterialInfo(result.getRecords(), EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT); //如果是自己创建的根节点且异常状态为项目类别为空异常状态改为正常
result.getRecords().stream()
.filter(f -> f.getCreatedBy().equals(SessionUtil.getUserCode())
&& Objects.equals(f.getExceptionStatus(), EBomExceptionStatusEnum.EXCEPT_NO_8.getValue()))
.forEach(f -> f.setExceptionStatus(EBomExceptionStatusEnum.OK.getValue()));
materialMainService.intiMaterialInfo(result.getRecords(), EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
}
returnResult = result; returnResult = result;
} }
//动态判断异常 //动态判断异常