From 22899f74279a47f4ec79e1325f8489d948ced005 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期五, 15 九月 2023 17:24:44 +0800
Subject: [PATCH] 修改2.0   9.15

---
 base-server/src/main/resources/mapper/TechniqueModelMapper.xml |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/base-server/src/main/resources/mapper/TechniqueModelMapper.xml b/base-server/src/main/resources/mapper/TechniqueModelMapper.xml
index 0ec473a..01abf4f 100644
--- a/base-server/src/main/resources/mapper/TechniqueModelMapper.xml
+++ b/base-server/src/main/resources/mapper/TechniqueModelMapper.xml
@@ -3,7 +3,7 @@
 <mapper namespace="com.yuanchu.mom.mapper.TechniqueModelMapper">
     <!--鏌ヨ鐢熶骇宸ヨ壓缁存姢鍒楄〃 鍙宠竟灞曠ず璇ュ伐鑹轰笅鑳戒娇鐢ㄧ殑璁惧鎵�鑳藉仛鐨勯」鐩�-->
     <resultMap id="selectAllTequeMap" type="map">
-        <id property="name" column="dname"/>
+        <id property="dname" column="dname"/>
         <collection property="children" resultMap="selectAllTequeMaps" javaType="List"/>
     </resultMap>
     <resultMap id="selectAllTequeMaps" type="map">
@@ -12,6 +12,18 @@
         <result property="unit" column="unit"/>
         <result property="name" column="name"/>
     </resultMap>
+    <!--鏍规嵁鎶�鏈寚鏍噄d鎵归噺鍒犻櫎-->
+    <update id="delTechById">
+        update mom_ocean.technique_model
+        set state=0
+        where technical_model_id = #{id}
+    </update>
+    <!--鏍规嵁鎶�鏈寚鏍噄d鎵归噺鍒犻櫎-->
+    <update id="delAllTech">
+        update mom_ocean.technique_model
+        set state=0
+        where technical_model_id in (${id})
+    </update>
     <select id="selectAllTeque" resultMap="selectAllTequeMap">
         select d.name dname,
                qm.id,
@@ -23,6 +35,7 @@
              mom_ocean.device d,
              mom_ocean.technology_template tt
         where qm.state = 1
+          and d.state = 1
           and d.id = qm.device_id
           and cm.id = qm.technical_model_id
           and tt.id = qm.tech_tem_id
@@ -67,6 +80,8 @@
         select tt.type,
                tt.father techFather,
                tt.name   techName,
+               tt.id     tid,
+               d.id      did,
                d.name    dname,
                cm.father,
                cm.name,

--
Gitblit v1.9.3