From c28d3bb363dde2afb44c168b93379b2bf6b1f67f Mon Sep 17 00:00:00 2001
From: XiaoRuby <3114200645@qq.com>
Date: 星期四, 07 九月 2023 15:26:22 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 standard-server/src/main/resources/mapper/TechnologyMapper.xml |   76 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 76 insertions(+), 0 deletions(-)

diff --git a/standard-server/src/main/resources/mapper/TechnologyMapper.xml b/standard-server/src/main/resources/mapper/TechnologyMapper.xml
index 1a5c4fe..c01980b 100644
--- a/standard-server/src/main/resources/mapper/TechnologyMapper.xml
+++ b/standard-server/src/main/resources/mapper/TechnologyMapper.xml
@@ -1,5 +1,81 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.yuanchu.mom.mapper.TechnologyMapper">
+    <!--鏍规嵁鍨嬪彿id鏌ヨ鐗堟湰-->
+    <select id="selectVerByTec" resultType="java.lang.Integer">
+        select distinct version
+        from mom_ocean.technology
+        where state = 1
+          and specifications_id = #{specificationsId}
+        order by version desc
+    </select>
 
+    <!--鍙充晶鏁版嵁灞曠ず 宸ヨ壓璺嚎-->
+    <resultMap id="selectAllTecMap" type="map">
+        <id property="name" column="father"/>
+        <collection property="children" resultMap="selectAllTecMaps" javaType="List"/>
+    </resultMap>
+    <resultMap id="selectAllTecMaps" type="map">
+        <id property="id" column="id"/>
+        <result property="name" column="name"/>
+        <result property="dg" column="dg"/>
+        <result property="pq" column="pq"/>
+    </resultMap>
+    <select id="selectAllTec" resultMap="selectAllTecMap">
+        select id,
+        name,
+        father,
+        device_group dg,
+        production_quota pq
+        from mom_ocean.technology
+        where state = 1
+        and specifications_id = #{specificationsId}
+        and version = #{version}
+        <if test="message!=null and message!=''">
+            and father like concat('%',#{message},'%')
+        </if>
+    </select>
+
+    <!--鍙充笂瑙掓柊澧�-宸ヨ壓璺嚎-閫夋嫨宸ュ簭-->
+    <select id="chooseFather" resultType="java.util.Map">
+        select distinct father
+        from mom_ocean.technology
+        where state = 1
+          and specifications_id = #{specificationsId}
+    </select>
+
+    <!--鍙充笂瑙掓柊澧�-鎶�鏈寚鏍�-閫夋嫨宸ュ簭,宸ヨ壓-->
+    <resultMap id="chooseTechMap" type="map">
+        <id property="name" column="father"/>
+        <collection property="children" resultMap="chooseTechMaps" javaType="List"/>
+    </resultMap>
+    <resultMap id="chooseTechMaps" type="map">
+        <id property="id" column="id"/>
+        <result property="name" column="name"/>
+    </resultMap>
+    <select id="chooseTech" resultMap="chooseTechMap">
+        select id,
+               name,
+               father
+        from mom_ocean.technology
+        where state = 1
+          and specifications_id = #{specificationsId}
+    </select>
+    <!--鏌ヨ璇ュ瀷鍙峰伐鑹轰笅鏈�鏂扮増鏈殑宸ヨ壓id-->
+    <select id="selTech" resultType="java.lang.Integer">
+        select id
+        from mom_ocean.technology
+        where state = 1
+          and father = #{techfather}
+          and name = #{techname}
+          and specifications_id = #{specificationId}
+          and version = #{version}
+    </select>
+
+    <!--鎵归噺鍒犻櫎-->
+    <update id="delAllTech">
+        update mom_ocean.technology
+        set state=0
+        where id in (${ids})
+    </update>
 </mapper>

--
Gitblit v1.9.3