From 73507854f0618fe7f96c93aa64b870ff9c44664a Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期五, 07 六月 2024 10:43:43 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 cnas-server/src/main/resources/mapper/StructureItemParameterMapper.xml |   45 +++++++++++++++++++++++++++++++++++++++------
 1 files changed, 39 insertions(+), 6 deletions(-)

diff --git a/cnas-server/src/main/resources/mapper/StructureItemParameterMapper.xml b/cnas-server/src/main/resources/mapper/StructureItemParameterMapper.xml
index 9da3cee..def7e4c 100644
--- a/cnas-server/src/main/resources/mapper/StructureItemParameterMapper.xml
+++ b/cnas-server/src/main/resources/mapper/StructureItemParameterMapper.xml
@@ -3,23 +3,23 @@
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.yuanchu.mom.mapper.StructureItemParameterMapper">
-
-
+    <delete id="removeNoSample">
+        delete from structure_item_parameter where sample like concat('%',#{sample},'%')
+    </delete>
     <select id="selectItemParameterList" resultType="com.yuanchu.mom.pojo.StructureItemParameter">
         select id,
         inspection_item,
-        inspection_item_classify,
+        inspection_item_en,
         inspection_item_subclass,
+        inspection_item_subclass_en,
         laboratory,
         unit,
         price,
         man_hour,
         man_hour_group,
         inspection_item_type,
-        device_group,
         checkout_number,
         section,
-        value_type,
         create_user,
         update_user,
         create_time,
@@ -31,10 +31,43 @@
         inspection_value_type,
         dic,
         template_id,
-        son_laboratory
+        son_laboratory,
+        ask,
+        ask_tell,
+        inspection_item_class,
+        inspection_item_class_en
         from structure_item_parameter
         <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
             ${ew.customSqlSegment}
         </if>
     </select>
+
+    <resultMap id="getInsProductions" type="map">
+        <result property="name" column="inspection_item"/>
+        <collection property="children" resultMap="seProInsListByIdmaps" javaType="List"/>
+    </resultMap>
+    <resultMap id="seProInsListByIdmaps" type="map">
+        <id property="id" column="id"/>
+        <result property="name" column="subclass"/>
+    </resultMap>
+    <select id="getInsProduction" resultMap="getInsProductions">
+        select id, inspection_item,
+               case when inspection_item_subclass='' then inspection_item
+            else inspection_item_subclass end  as subclass
+        from structure_item_parameter
+    </select>
+    <select id="getItemTree" resultMap="itemDto">
+        select sto.id sId,sto.specimen_name sName,p.id pId,p.name pName from structure_test_object sto
+        left join product p on p.object_id = sto.id
+    </select>
+
+    <resultMap id="itemDto" type="com.yuanchu.mom.dto.TestItemDto">
+        <result column="sId" property="id"/>
+        <result column="sName" property="name"/>
+        <collection property="children" resultMap="productDto"/>
+    </resultMap>
+    <resultMap id="productDto" type="com.yuanchu.mom.dto.ProductDto">
+        <result column="pId" property="id"/>
+        <result column="pName" property="name"/>
+    </resultMap>
 </mapper>

--
Gitblit v1.9.3