From 816fdad6c45933eaa42ebffc2484339f9df42d9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E9=B9=8F=E9=A3=9E?= Date: Tue, 26 Mar 2024 13:45:21 +0800 Subject: [PATCH] =?UTF-8?q?fix(feature/DM/nflg-bom):=20=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E6=98=AF=E8=87=AA=E5=B7=B1=E5=88=9B=E5=BB=BA=E7=9A=84=E6=A0=B9?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E4=B8=94=E5=BC=82=E5=B8=B8=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E4=B8=BA=E2=80=9C=E9=A1=B9=E7=9B=AE=E7=B1=BB=E5=88=AB=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E2=80=9D=E6=97=B6=EF=BC=8C=E5=BC=82=E5=B8=B8=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=94=B9=E4=B8=BA=E6=AD=A3=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bomnew/service/BomNewEbomParentService.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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; } //动态判断异常