From 19b596d3c05b1ca7ff80d8b802e7f6e03ad77dad Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期一, 11 九月 2023 18:02:17 +0800
Subject: [PATCH] 修改 9.11
---
standard-server/src/main/resources/mapper/ProductMapper.xml | 70 +++++++++++++++++++++++++++++-----
1 files changed, 59 insertions(+), 11 deletions(-)
diff --git a/standard-server/src/main/resources/mapper/ProductMapper.xml b/standard-server/src/main/resources/mapper/ProductMapper.xml
index 4fcd5c3..ffb32b8 100644
--- a/standard-server/src/main/resources/mapper/ProductMapper.xml
+++ b/standard-server/src/main/resources/mapper/ProductMapper.xml
@@ -51,21 +51,69 @@
<result property="internal" column="internal"/>
</resultMap>
<select id="selectAllPro" resultMap="oneMap">
- select p.id pid,
- p.name pname,
- p.father pfather,
- unit,
- required,
- internal,
- t.father tfather,
- t.name tname
+ select p.id pid,
+ p.name pname,
+ p.father pfather,
+ unit,
+ required,
+ internal,
+ t.father tfather,
+ t.name tname
from mom_ocean.product p
- left join mom_ocean.technology t on p.technology_id = t.id
+ left join mom_ocean.technology t on p.technology_id = t.id
where p.state = 1
- and p.version = #{version}
- and specifications_id = #{specificationsId}
+ and p.version = #{version}
+ and specifications_id = #{specificationsId}
<if test="message!=null and message!=''">
and p.name like concat('%',#{message},'%')
</if>
</select>
+
+ <!--鍙充笂瑙掓柊澧�-鎶�鏈寚鏍�-閫夋嫨椤圭洰鐖剁被-->
+ <select id="chooseFather" resultType="java.util.Map">
+ select distinct father
+ from mom_ocean.product
+ where state = 1
+ and technology_id = #{technologyId}
+ </select>
+
+ <!--鏍规嵁鍨嬪彿id鏌ヨ璇ュ瀷鍙蜂笅鐨勬墍鏈夊伐鑹虹殑鎶�鏈寚鏍�-->
+ <select id="selAllBySpeId" resultType="com.yuanchu.mom.pojo.Product">
+ select *
+ from mom_ocean.product
+ where state = 1
+ and version = #{version}
+ and technology_id in (select id
+ from mom_ocean.technology
+ where technology.state = 1
+ and specifications_id = #{specificationsId})
+ </select>
+ <!--鏌ヨ鏍囧噯BOM鎶�鏈寚鏍囦腑璇ュ瀷鍙峰伐鑹轰笅鏈�鏂扮増鏈殑妫�楠岄」鐩�-->
+ <select id="selProByVerSpe" resultType="com.yuanchu.mom.pojo.Product">
+ select *
+ from mom_ocean.product
+ where state = 1
+ and technology_id = #{technologyId}
+ </select>
+
+ <!--鏍规嵁宸ヨ壓璺嚎id鍒犻櫎-->
+ <update id="delProByTecId">
+ update mom_ocean.product
+ set state=0
+ where technology_id = #{id}
+ </update>
+
+ <!--鏍规嵁宸ヨ壓璺嚎id鎵归噺鍒犻櫎-->
+ <update id="delAllByTechId">
+ update mom_ocean.product
+ set state=0
+ where technology_id in (${ids})
+ </update>
+
+ <!--鏍规嵁鎶�鏈寚鏍噄d鎵归噺鍒犻櫎-->
+ <update id="delAllPro">
+ update mom_ocean.product
+ set state=0
+ where id in (${ids})
+ </update>
</mapper>
--
Gitblit v1.9.3