From 5a1484dde28cbeb6718b8db03a45dee452cd838a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E7=B1=B3?= <470431449@qq.com> Date: Tue, 16 Apr 2024 17:44:37 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=BC=82=E5=B8=B8=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/nflg/product/bomnew/api/user/EbomApi.java | 6 +++++- .../bomnew/service/domain/EBom/CheckEBomException.java | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/api/user/EbomApi.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/api/user/EbomApi.java index 20c79012..d89fa39b 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/api/user/EbomApi.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/api/user/EbomApi.java @@ -34,6 +34,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.List; import java.util.Objects; +import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; import java.util.stream.Collectors; @@ -150,7 +151,10 @@ public class EbomApi extends BaseApi { bomNewEbomParentService.convertToPBom(paramDto); //更新PBomUse 数据 - bomNewPbomParentService.getBaseMapper().updatePBomMaterialUse(); + CompletableFuture.runAsync(()->{ + bomNewPbomParentService.getBaseMapper().updatePBomMaterialUse(); + }); + return ResultVO.success(true); diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/CheckEBomException.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/CheckEBomException.java index 10e348c9..a51ac5a8 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/CheckEBomException.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/CheckEBomException.java @@ -7,6 +7,7 @@ import cn.hutool.core.util.StrUtil; import cn.hutool.extra.spring.SpringUtil; import com.google.common.collect.ImmutableList; import com.google.common.collect.Sets; +import com.nflg.product.base.core.conmon.util.SessionUtil; import com.nflg.product.base.core.exception.NflgBusinessException; import com.nflg.product.bomnew.constant.*; import com.nflg.product.bomnew.pojo.entity.BomNewEbomParentEntity; @@ -59,6 +60,8 @@ public class CheckEBomException { public CheckEBomException(Long bomRowId) throws ExecutionException, InterruptedException { allBomDetail = SpringUtil.getBean(BomNewEbomParentService.class).getBomTree(bomRowId, true); + //只检查待复核和自己的 + allBomDetail=allBomDetail.stream().filter(u-> SessionUtil.getUserCode().equals(u.getCreatedBy()) && u.getStatus().equals(1) ).collect(Collectors.toList()); BomNewEbomParentEntity parent = SpringUtil.getBean(BomNewEbomParentService.class).getById(bomRowId); if (Objects.isNull(parent)){ return;