From 6b3610be9f0c73925ab5aadcfac2f9071802f396 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E9=B9=8F=E9=A3=9E?= Date: Sun, 26 May 2024 19:49:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?optimize:=20=E8=B0=83=E6=95=B4=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E6=9F=A5=E8=AF=A2=E7=89=A9=E6=96=99=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../product/bomnew/pojo/vo/QueryMaterialsVO.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/pojo/vo/QueryMaterialsVO.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/pojo/vo/QueryMaterialsVO.java index 16a738c9..c0d60d23 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/pojo/vo/QueryMaterialsVO.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/pojo/vo/QueryMaterialsVO.java @@ -7,6 +7,7 @@ import lombok.Data; import lombok.experimental.Accessors; import java.io.Serializable; +import java.math.BigDecimal; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; @@ -53,4 +54,17 @@ public class QueryMaterialsVO extends BaseMaterialVO implements Serializable { */ @ApiModelProperty(value = "1=待复核、2=已复核、3=已退回、4=定版(已发布PBOM)99=借用件 100=引用件") private Integer status = EBomStatusEnum.CHECKED.getValue(); + + /** + * 是否有BOM: 0-否 1-是 + */ + @ApiModelProperty(value = "是否有BOM: 0-否 1-是") + private Integer bomExist = 0; + + @ApiModelProperty("单重1") + private BigDecimal unitWeight; + + public BigDecimal getUnitWeight() { + return getMaterialWeight(); + } } From ebe8c35165244d4545a3405c330224f9f13f3936 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E9=B9=8F=E9=A3=9E?= Date: Sun, 26 May 2024 20:08:53 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(ebom):=20=E4=BF=AE=E5=A4=8D=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E8=A1=A8=E6=90=9C=E7=B4=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nflg/product/bomnew/service/BomNewEbomParentService.java | 2 +- .../main/resources/mapper/master/BomNewEbomParentMapper.xml | 5 +---- 2 files changed, 2 insertions(+), 5 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 be32b7e9..1c1bebc2 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 @@ -2221,7 +2221,7 @@ public class BomNewEbomParentService extends ServiceImpl boms = this.getBaseMapper().getBom(query.getMaterialNo(), query.getDrawingNo()); - boms.removeIf(c -> Objects.equals(c.getLastVersionIs(), 0)); + boms.removeIf(c -> Objects.equals(c.getLastVersionIs(), 0) || Objects.equals(c.getStatus(), EBomStatusEnum.PUBLISHED.getValue())); boms.forEach(this::buildChildren); roots.addAll(boms.stream().filter(b -> b.getRootIs() == 0 && b.getUserRootIs() == 0 && b.getRootIsForWaitReview() == 0).map(this::buildParent).flatMap(List::stream).collect(Collectors.toList())); diff --git a/nflg_project_dev/nflg-bom-new/src/main/resources/mapper/master/BomNewEbomParentMapper.xml b/nflg_project_dev/nflg-bom-new/src/main/resources/mapper/master/BomNewEbomParentMapper.xml index e1b8df8c..bf17b0bf 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/resources/mapper/master/BomNewEbomParentMapper.xml +++ b/nflg_project_dev/nflg-bom-new/src/main/resources/mapper/master/BomNewEbomParentMapper.xml @@ -402,13 +402,10 @@ AND status IN (1,3) AND (root_is=1 OR user_root_is=1 OR root_is_for_wait_review=1) AND created_by=#{userCode} - + AND ((root_is=1 OR user_root_is=1) AND status=2) OR (status IN (1,3) AND (root_is=1 OR user_root_is=1 OR root_is_for_wait_review=1) AND created_by=#{userCode}) - - AND (root_is=1 OR user_root_is=1) AND status=4 - AND devise_name=#{query.deviseName}