From 762c419bb29a48557b7bf18cc3bf9c84309bc90e Mon Sep 17 00:00:00 2001
From: value <z1292839451@163.com>
Date: 星期四, 06 六月 2024 15:52:48 +0800
Subject: [PATCH] 增加检验项分类

---
 inspect-server/src/main/resources/mapper/InsSampleMapper.xml                           |   19 ++++++++++++-------
 inspect-server/src/main/java/com/yuanchu/mom/pojo/StandardProductList.java             |    6 ++++++
 inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java |    2 +-
 inspect-server/src/main/resources/mapper/StandardTreeMapper.xml                        |    6 ++++++
 cnas-server/src/main/java/com/yuanchu/mom/pojo/StructureItemParameter.java             |   10 +++++++++-
 cnas-server/src/main/resources/mapper/StructureItemParameterMapper.xml                 |    4 +++-
 inspect-server/src/main/java/com/yuanchu/mom/pojo/InsProduct.java                      |    6 +++++-
 inspect-server/src/main/resources/mapper/InsProductMapper.xml                          |    3 ++-
 inspect-server/src/main/java/com/yuanchu/mom/mapper/InsProductMapper.java              |    2 +-
 9 files changed, 45 insertions(+), 13 deletions(-)

diff --git a/cnas-server/src/main/java/com/yuanchu/mom/pojo/StructureItemParameter.java b/cnas-server/src/main/java/com/yuanchu/mom/pojo/StructureItemParameter.java
index 9dd4be0..9d59109 100644
--- a/cnas-server/src/main/java/com/yuanchu/mom/pojo/StructureItemParameter.java
+++ b/cnas-server/src/main/java/com/yuanchu/mom/pojo/StructureItemParameter.java
@@ -67,7 +67,7 @@
     @ApiModelProperty(value = "璁¢噺鍗曚綅")
     private String unit;
 
-    @ValueTableShow(15)
+    @ValueTableShow(18)
     @ApiModelProperty(value = "璇曢獙鏂规硶")
     private String method;
 
@@ -129,5 +129,13 @@
     @ApiModelProperty(value = "瀛楀吀绫诲瀷")
     private String dic;
 
+    @ValueTableShow(16)
+    @ApiModelProperty(value = "妫�楠岄」鍒嗙被")
+    private String inspectionItemClass;
+
+    @ValueTableShow(17)
+    @ApiModelProperty(value = "妫�楠岄」鍒嗙被EN")
+    private String inspectionItemClassEn;
+
 }
 
diff --git a/cnas-server/src/main/resources/mapper/StructureItemParameterMapper.xml b/cnas-server/src/main/resources/mapper/StructureItemParameterMapper.xml
index 143913e..def7e4c 100644
--- a/cnas-server/src/main/resources/mapper/StructureItemParameterMapper.xml
+++ b/cnas-server/src/main/resources/mapper/StructureItemParameterMapper.xml
@@ -33,7 +33,9 @@
         template_id,
         son_laboratory,
         ask,
-        ask_tell
+        ask_tell,
+        inspection_item_class,
+        inspection_item_class_en
         from structure_item_parameter
         <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
             ${ew.customSqlSegment}
diff --git a/inspect-server/src/main/java/com/yuanchu/mom/mapper/InsProductMapper.java b/inspect-server/src/main/java/com/yuanchu/mom/mapper/InsProductMapper.java
index 3728566..2fe546e 100644
--- a/inspect-server/src/main/java/com/yuanchu/mom/mapper/InsProductMapper.java
+++ b/inspect-server/src/main/java/com/yuanchu/mom/mapper/InsProductMapper.java
@@ -24,7 +24,7 @@
 
     int updateInspected(@Param("id") Integer id);
 
-    List<InsProduct> selectFiberInsProduct(List<Integer> ids);
+    List<InsProduct> selectFiberInsProduct(List<Integer> ids, String laboratory);
 }
 
 
diff --git a/inspect-server/src/main/java/com/yuanchu/mom/pojo/InsProduct.java b/inspect-server/src/main/java/com/yuanchu/mom/pojo/InsProduct.java
index f0e1292..4b628b7 100644
--- a/inspect-server/src/main/java/com/yuanchu/mom/pojo/InsProduct.java
+++ b/inspect-server/src/main/java/com/yuanchu/mom/pojo/InsProduct.java
@@ -35,7 +35,11 @@
     /**
      * 妫�楠岄」鍒嗙被
      */
-    private String inspectionItemClassify;
+    @ApiModelProperty(value = "妫�楠岄」鍒嗙被")
+    private String inspectionItemClass;
+
+    @ApiModelProperty(value = "妫�楠岄」鍒嗙被EN")
+    private String inspectionItemClassEn;
 
     /**
      * 妫�楠岄」瀛愮被
diff --git a/inspect-server/src/main/java/com/yuanchu/mom/pojo/StandardProductList.java b/inspect-server/src/main/java/com/yuanchu/mom/pojo/StandardProductList.java
index 09d5f51..79c2d57 100644
--- a/inspect-server/src/main/java/com/yuanchu/mom/pojo/StandardProductList.java
+++ b/inspect-server/src/main/java/com/yuanchu/mom/pojo/StandardProductList.java
@@ -182,4 +182,10 @@
     private String tree;
 
     private Integer structureItemParameterId;
+
+    @ApiModelProperty(value = "妫�楠岄」鍒嗙被")
+    private String inspectionItemClass;
+
+    @ApiModelProperty(value = "妫�楠岄」鍒嗙被EN")
+    private String inspectionItemClassEn;
 }
\ No newline at end of file
diff --git a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
index ed801ae..46c0711 100644
--- a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
+++ b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
@@ -931,7 +931,7 @@
         List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getInsOrderId, orderId).select(InsSample::getId));
         List<Integer> ids = insSamples.stream().map(a -> a.getId()).collect(Collectors.toList());
         List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery().in(InsProduct::getInsSampleId, ids).eq(InsProduct::getSonLaboratory, laboratory).eq(InsProduct::getState, 1).isNull(InsProduct::getInsResult).isNull(InsProduct::getInsFiberId).isNull(InsProduct::getInsFibersId));
-        insProducts.addAll(insProductMapper.selectFiberInsProduct(ids));
+        insProducts.addAll(insProductMapper.selectFiberInsProduct(ids, laboratory));
         if (insProducts.size() > 0) {
             String str = "";
             int count = 0;
diff --git a/inspect-server/src/main/resources/mapper/InsProductMapper.xml b/inspect-server/src/main/resources/mapper/InsProductMapper.xml
index 792a419..b877783 100644
--- a/inspect-server/src/main/resources/mapper/InsProductMapper.xml
+++ b/inspect-server/src/main/resources/mapper/InsProductMapper.xml
@@ -92,8 +92,9 @@
         where state = 1
         and (ins_fibers_id is not null or ins_fiber_id is not null)
         and ins_result is null
+        and son_laboratory = #{laboratory}
         and ins_sample_id in
-        <foreach collection="list" index="index" item="item" open="(" separator="," close=")">
+        <foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
             #{item}
         </foreach>
     </select>
diff --git a/inspect-server/src/main/resources/mapper/InsSampleMapper.xml b/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
index bfe50f1..3d0ac72 100644
--- a/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
+++ b/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
@@ -114,7 +114,8 @@
                ip.id ip_id,
                inspection_item,
                inspection_item_en,
-               inspection_item_classify,
+               inspection_item_class,
+               inspection_item_class_en,
                inspection_item_subclass,
                inspection_item_subclass_en,
                ip.factory ip_factory,
@@ -163,7 +164,8 @@
                ip.id ip_id,
                inspection_item,
                inspection_item_en,
-               inspection_item_classify,
+               inspection_item_class,
+               inspection_item_class_en,
                inspection_item_subclass,
                inspection_item_subclass_en,
                ip.factory ip_factory,
@@ -220,9 +222,10 @@
                ip.id ip_id,
                inspection_item,
                inspection_item_en,
-               inspection_item_classify,
                inspection_item_subclass,
                inspection_item_subclass_en,
+               inspection_item_class,
+               inspection_item_class_en,
                ip.factory ip_factory,
                ip.laboratory ip_laboratory,
                ip.sample_type ip_sample_type,
@@ -266,7 +269,6 @@
         select ip.id ip_id,
                inspection_item,
                inspection_item_en,
-               inspection_item_classify,
                inspection_item_subclass,
                inspection_item_subclass_en,
                ip.factory ip_factory,
@@ -317,7 +319,8 @@
         select ip.id ip_id,
                inspection_item,
                inspection_item_en,
-               inspection_item_classify,
+               inspection_item_class,
+               inspection_item_class_en,
                inspection_item_subclass,
                inspection_item_subclass_en,
                ip.factory ip_factory,
@@ -366,7 +369,8 @@
         select ip.id ip_id,
                inspection_item,
                inspection_item_en,
-               inspection_item_classify,
+               inspection_item_class,
+               inspection_item_class_en,
                inspection_item_subclass,
                inspection_item_subclass_en,
                ip.factory ip_factory,
@@ -440,9 +444,10 @@
         <id property="id" column="ip_id" jdbcType="INTEGER"/>
         <result property="inspectionItem" column="inspection_item" jdbcType="VARCHAR"/>
         <result property="inspectionItemEn" column="inspection_item_en" jdbcType="VARCHAR"/>
-        <result property="inspectionItemClassify" column="inspection_item_classify" jdbcType="VARCHAR"/>
         <result property="inspectionItemSubclass" column="inspection_item_subclass" jdbcType="VARCHAR"/>
         <result property="inspectionItemSubclassEn" column="inspection_item_subclass_en" jdbcType="VARCHAR"/>
+        <result property="inspectionItemClass" column="inspection_item_class" jdbcType="VARCHAR"/>
+        <result property="inspectionItemClassEn" column="inspection_item_class_en" jdbcType="VARCHAR"/>
         <result property="factory" column="ip_factory" jdbcType="VARCHAR"/>
         <result property="laboratory" column="ip_laboratory" jdbcType="VARCHAR"/>
         <result property="sampleType" column="ip_sample_type" jdbcType="VARCHAR"/>
diff --git a/inspect-server/src/main/resources/mapper/StandardTreeMapper.xml b/inspect-server/src/main/resources/mapper/StandardTreeMapper.xml
index ce4a5cc..982cc12 100644
--- a/inspect-server/src/main/resources/mapper/StandardTreeMapper.xml
+++ b/inspect-server/src/main/resources/mapper/StandardTreeMapper.xml
@@ -137,6 +137,8 @@
                inspection_item_en,
                inspection_item_subclass,
                inspection_item_subclass_en,
+               inspection_item_class,
+               inspection_item_class_en,
                method,
                son_laboratory,
                unit,
@@ -174,6 +176,8 @@
                inspection_item_en,
                inspection_item_subclass,
                inspection_item_subclass_en,
+               inspection_item_class,
+               inspection_item_class_en,
                method,
                son_laboratory,
                unit,
@@ -215,6 +219,8 @@
                inspection_item_en,
                inspection_item_subclass,
                inspection_item_subclass_en,
+               inspection_item_class,
+               inspection_item_class_en,
                method,
                son_laboratory,
                unit,

--
Gitblit v1.9.3