From 996d5365c9fd873b82bc3f24a939c4c2333dc608 Mon Sep 17 00:00:00 2001 From: jing's Date: Fri, 29 Dec 2023 17:25:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E7=B1=BB=E5=9E=8B=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../constant/ProjectTypeInputTypeEnum.java | 21 +++++++++++++---- .../bomnew/service/domain/EBom/EBomEdit.java | 23 ++++++++++--------- 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/constant/ProjectTypeInputTypeEnum.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/constant/ProjectTypeInputTypeEnum.java index aeee5e2f..37d7c7a7 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/constant/ProjectTypeInputTypeEnum.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/constant/ProjectTypeInputTypeEnum.java @@ -3,6 +3,9 @@ package com.nflg.product.bomnew.constant; import lombok.AllArgsConstructor; import lombok.Getter; +import java.util.ArrayList; +import java.util.List; + /** * ebom 项目类别录入方式 */ @@ -31,14 +34,24 @@ public enum ProjectTypeInputTypeEnum implements ValueEnum { @Getter @AllArgsConstructor public enum ProjectTypeEnum implements ValueEnum { - TYPE_Q("Q", "Q"), - TYPE_F("F", "F"), - TYPE_Z("Z", "Z"), - TYPE_L("L", "L"); + TYPE_Q("Q", "清点项"), + TYPE_F("F", "直发包"), + TYPE_Z("Z", "发货前装配包"), + TYPE_L("L", "普通物料"); private final String value; private final String description; + + public static List getAllValue() { + List resultList = new ArrayList<>(); + ProjectTypeEnum[] values = ProjectTypeEnum.values(); + for (ProjectTypeEnum valueEnum : values) { + resultList.add(valueEnum.getValue()); + } + return resultList; + } + } } diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/EBomEdit.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/EBomEdit.java index 171ccb64..e1f0a904 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/EBomEdit.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/EBomEdit.java @@ -72,9 +72,9 @@ public class EBomEdit { parent.setLastVersionIs(1); parent.setEditStatus(EbomEditStatusEnum.HANDLER_CREATED.getValue()); parent.setExceptionStatus(EBomExceptionStatusEnum.OK.getValue()); - if(StrUtil.isEmpty(parent.getProjectType())){ - parent.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_8.getValue()); - } +// if(StrUtil.isEmpty(parent.getProjectType())){ +// parent.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_8.getValue()); +// } parent.setStatus(SpringUtil.getBean(UserRoleService.class).technician()? EBomStatusEnum.CHECKED.getValue():EBomStatusEnum.WAIT_CHECK.getValue()); parent.setCreatedJob(SpringUtil.getBean(UserRoleService.class).technician()?UserJobEnum.ENGINEER.getValue():UserJobEnum.DESIGNER.getValue()); @@ -245,14 +245,15 @@ public class EBomEdit { child.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_8.getValue()); } - if(StrUtil.isNotEmpty(parent.getProjectType()) && StrUtil.containsAny(parent.getProjectType(),ProjectTypeInputTypeEnum.ProjectTypeEnum.TYPE_Q.getValue(),ProjectTypeInputTypeEnum.ProjectTypeEnum.TYPE_F.getValue())){ - if(StrUtil.equals(ProjectTypeInputTypeEnum.ProjectTypeEnum.TYPE_Q.getValue(),child.getProjectType())){ - child.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_9.getValue()); - } - if(StrUtil.equals(ProjectTypeInputTypeEnum.ProjectTypeEnum.TYPE_F.getValue(),child.getProjectType())){ - child.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_10.getValue()); - } - } +// if(StrUtil.isNotEmpty(parent.getProjectType()) && StrUtil.containsAny(parent.getProjectType(),ProjectTypeInputTypeEnum.ProjectTypeEnum.TYPE_Q.getValue(),ProjectTypeInputTypeEnum.ProjectTypeEnum.TYPE_F.getValue())){ +// if(StrUtil.equals(ProjectTypeInputTypeEnum.ProjectTypeEnum.TYPE_Q.getValue(),child.getProjectType())){ +// child.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_9.getValue()); +// } +// +// if(StrUtil.equals(ProjectTypeInputTypeEnum.ProjectTypeEnum.TYPE_F.getValue(),child.getProjectType())){ +// child.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_10.getValue()); +// } +// } // VUtils.isTure(parent.getProjectType().equals(child.getProjectType())).throwMessage("父、子级项目类型不能相同");