diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewEbomParentService.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewEbomParentService.java index 48b41607..cb8e1297 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewEbomParentService.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewEbomParentService.java @@ -144,8 +144,14 @@ public class BomNewEbomParentService extends ServiceImpl result = this.getBaseMapper().getEBomListPage(new Page<>(query.getPage(), query.getPageSize()), query, userRoleService.getUserJob(), SessionUtil.getUserCode()); - - materialMainService.intiMaterialInfo(result.getRecords(), EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT); + if (!result.getRecords().isEmpty()) { + //如果是自己创建的根节点且异常状态为“项目类别为空”时,异常状态改为正常 + 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; } //动态判断异常