diff --git a/nflg-qms-admin/src/main/java/com/nflg/qms/admin/service/QmsSamplingPlanControllerService.java b/nflg-qms-admin/src/main/java/com/nflg/qms/admin/service/QmsSamplingPlanControllerService.java index 63052d58..7fd72be0 100644 --- a/nflg-qms-admin/src/main/java/com/nflg/qms/admin/service/QmsSamplingPlanControllerService.java +++ b/nflg-qms-admin/src/main/java/com/nflg/qms/admin/service/QmsSamplingPlanControllerService.java @@ -146,13 +146,8 @@ public class QmsSamplingPlanControllerService { .setSamplingPlanId(planId) .setRangeStart(qo.getRangeStart()) .setRangeEnd(qo.getRangeEnd()) - .setSpecialInspectionS1(qo.getSpecialInspectionS1()) - .setSpecialInspectionS2(qo.getSpecialInspectionS2()) - .setSpecialInspectionS3(qo.getSpecialInspectionS3()) - .setSpecialInspectionS4(qo.getSpecialInspectionS4()) - .setGeneralInspection1(qo.getGeneralInspection1()) - .setGeneralInspection2(qo.getGeneralInspection2()) - .setGeneralInspection3(qo.getGeneralInspection3()); + .setInspectionDictionaryItemId(qo.getInspectionDictionaryItemId()) + .setCodeLetterId(qo.getCodeLetterId()); inspections.add(entity); } samplingPlanInspectionService.saveBatch(inspections); @@ -265,13 +260,8 @@ public class QmsSamplingPlanControllerService { .setSamplingPlanId(planId) .setRangeStart(qo.getRangeStart()) .setRangeEnd(qo.getRangeEnd()) - .setSpecialInspectionS1(qo.getSpecialInspectionS1()) - .setSpecialInspectionS2(qo.getSpecialInspectionS2()) - .setSpecialInspectionS3(qo.getSpecialInspectionS3()) - .setSpecialInspectionS4(qo.getSpecialInspectionS4()) - .setGeneralInspection1(qo.getGeneralInspection1()) - .setGeneralInspection2(qo.getGeneralInspection2()) - .setGeneralInspection3(qo.getGeneralInspection3()); + .setInspectionDictionaryItemId(qo.getInspectionDictionaryItemId()) + .setCodeLetterId(qo.getCodeLetterId()); inspections.add(entity); } samplingPlanInspectionService.saveBatch(inspections); @@ -406,13 +396,7 @@ public class QmsSamplingPlanControllerService { detail.setSamplingPlanInspections(inspections.stream() .map(i -> { QmsSamplingPlanDetailVO.SamplingPlanInspectionVO vo = BeanUtil.copyProperties(i, QmsSamplingPlanDetailVO.SamplingPlanInspectionVO.class); - vo.setSpecialInspectionS1Code(codeLetterMap.get(i.getSpecialInspectionS1())); - vo.setSpecialInspectionS2Code(codeLetterMap.get(i.getSpecialInspectionS2())); - vo.setSpecialInspectionS3Code(codeLetterMap.get(i.getSpecialInspectionS3())); - vo.setSpecialInspectionS4Code(codeLetterMap.get(i.getSpecialInspectionS4())); - vo.setGeneralInspection1Code(codeLetterMap.get(i.getGeneralInspection1())); - vo.setGeneralInspection2Code(codeLetterMap.get(i.getGeneralInspection2())); - vo.setGeneralInspection3Code(codeLetterMap.get(i.getGeneralInspection3())); + vo.setCodeLetter(codeLetterMap.get(i.getCodeLetterId())); return vo; }) .collect(Collectors.toList())); diff --git a/nflg-qms-admin/src/test/java/com/nflg/qms/admin/QmsSamplingPlanApiTest.java b/nflg-qms-admin/src/test/java/com/nflg/qms/admin/QmsSamplingPlanApiTest.java index b18c0395..d443c607 100644 --- a/nflg-qms-admin/src/test/java/com/nflg/qms/admin/QmsSamplingPlanApiTest.java +++ b/nflg-qms-admin/src/test/java/com/nflg/qms/admin/QmsSamplingPlanApiTest.java @@ -254,13 +254,8 @@ public class QmsSamplingPlanApiTest { QmsSamplingPlanAddQO.SamplingPlanInspectionQO inspection = new QmsSamplingPlanAddQO.SamplingPlanInspectionQO(); inspection.setRangeStart(1201); inspection.setRangeEnd(3200); - inspection.setSpecialInspectionS1(1L); - inspection.setSpecialInspectionS2(1L); - inspection.setSpecialInspectionS3(1L); - inspection.setSpecialInspectionS4(1L); - inspection.setGeneralInspection1(1L); - inspection.setGeneralInspection2(1L); - inspection.setGeneralInspection3(1L); + inspection.setInspectionDictionaryItemId(1L); + inspection.setCodeLetterId(1L); inspections.add(inspection); request.setSamplingPlanInspections(inspections); diff --git a/nflg-wms-common/src/main/java/com/nflg/wms/common/pojo/qo/QmsSamplingPlanAddQO.java b/nflg-wms-common/src/main/java/com/nflg/wms/common/pojo/qo/QmsSamplingPlanAddQO.java index 11b9a41c..97c775bc 100644 --- a/nflg-wms-common/src/main/java/com/nflg/wms/common/pojo/qo/QmsSamplingPlanAddQO.java +++ b/nflg-wms-common/src/main/java/com/nflg/wms/common/pojo/qo/QmsSamplingPlanAddQO.java @@ -174,45 +174,15 @@ public class QmsSamplingPlanAddQO { private Integer rangeEnd; /** - * 特殊检验S1(字码ID) + * 检验类型id,关联字典项id */ - @NotNull(message = "特殊检验S1不能为空") - private Long specialInspectionS1; + @NotNull(message = "检验类型不能为空") + private Long inspectionDictionaryItemId; /** - * 特殊检验S2(字码ID) + * 字码ID */ - @NotNull(message = "特殊检验S2不能为空") - private Long specialInspectionS2; - - /** - * 特殊检验S3(字码ID) - */ - @NotNull(message = "特殊检验S3不能为空") - private Long specialInspectionS3; - - /** - * 特殊检验S4(字码ID) - */ - @NotNull(message = "特殊检验S4不能为空") - private Long specialInspectionS4; - - /** - * 一般检验I(字码ID) - */ - @NotNull(message = "一般检验I不能为空") - private Long generalInspection1; - - /** - * 一般检验II(字码ID) - */ - @NotNull(message = "一般检验II不能为空") - private Long generalInspection2; - - /** - * 一般检验III(字码ID) - */ - @NotNull(message = "一般检验III不能为空") - private Long generalInspection3; + @NotNull(message = "字码ID不能为空") + private Long codeLetterId; } } diff --git a/nflg-wms-common/src/main/java/com/nflg/wms/common/pojo/vo/QmsSamplingPlanDetailVO.java b/nflg-wms-common/src/main/java/com/nflg/wms/common/pojo/vo/QmsSamplingPlanDetailVO.java index f2ddfd9d..0bacf76b 100644 --- a/nflg-wms-common/src/main/java/com/nflg/wms/common/pojo/vo/QmsSamplingPlanDetailVO.java +++ b/nflg-wms-common/src/main/java/com/nflg/wms/common/pojo/vo/QmsSamplingPlanDetailVO.java @@ -141,60 +141,16 @@ public class QmsSamplingPlanDetailVO extends QmsSamplingPlanVO { */ private Integer rangeEnd; /** - * 特殊检验S1(字码ID) + * 检验类型id,关联字典项id */ - private Long specialInspectionS1; + private Long inspectionDictionaryItemId; /** - * 特殊检验S1字码 + * 字码ID */ - private String specialInspectionS1Code; + private Long codeLetterId; /** - * 特殊检验S2(字码ID) + * 字码 */ - private Long specialInspectionS2; - /** - * 特殊检验S2字码 - */ - private String specialInspectionS2Code; - /** - * 特殊检验S3(字码ID) - */ - private Long specialInspectionS3; - /** - * 特殊检验S3字码 - */ - private String specialInspectionS3Code; - /** - * 特殊检验S4(字码ID) - */ - private Long specialInspectionS4; - /** - * 特殊检验S4字码 - */ - private String specialInspectionS4Code; - /** - * 一般检验I(字码ID) - */ - private Long generalInspection1; - /** - * 一般检验I字码 - */ - private String generalInspection1Code; - /** - * 一般检验II(字码ID) - */ - private Long generalInspection2; - /** - * 一般检验II字码 - */ - private String generalInspection2Code; - /** - * 一般检验III(字码ID) - */ - private Long generalInspection3; - /** - * 一般检验III字码 - */ - private String generalInspection3Code; + private String codeLetter; } } diff --git a/nflg-wms-repository/src/main/java/com/nflg/wms/repository/entity/QmsSamplingPlanInspection.java b/nflg-wms-repository/src/main/java/com/nflg/wms/repository/entity/QmsSamplingPlanInspection.java index faddc080..5e01d21b 100644 --- a/nflg-wms-repository/src/main/java/com/nflg/wms/repository/entity/QmsSamplingPlanInspection.java +++ b/nflg-wms-repository/src/main/java/com/nflg/wms/repository/entity/QmsSamplingPlanInspection.java @@ -41,37 +41,12 @@ public class QmsSamplingPlanInspection implements Serializable { private Integer rangeEnd; /** - * 特殊检验S1(字码ID) + * 检验类型id,关联字典项id */ - private Long specialInspectionS1; + private Long inspectionDictionaryItemId; /** - * 特殊检验S2(字码ID) + * 字码ID */ - private Long specialInspectionS2; - - /** - * 特殊检验S3(字码ID) - */ - private Long specialInspectionS3; - - /** - * 特殊检验S4(字码ID) - */ - private Long specialInspectionS4; - - /** - * 一般检验I(字码ID) - */ - private Long generalInspection1; - - /** - * 一般检验II(字码ID) - */ - private Long generalInspection2; - - /** - * 一般检验III(字码ID) - */ - private Long generalInspection3; + private Long codeLetterId; }