From 6a19365f5dea396622b32afe28b3e4b9b067e0e1 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期五, 01 九月 2023 16:33:08 +0800
Subject: [PATCH] 标准BOM(完结)
---
standard-server/src/main/resources/mapper/MbomMapper.xml | 51 ++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 42 insertions(+), 9 deletions(-)
diff --git a/standard-server/src/main/resources/mapper/MbomMapper.xml b/standard-server/src/main/resources/mapper/MbomMapper.xml
index 4a312a6..e4bb434 100644
--- a/standard-server/src/main/resources/mapper/MbomMapper.xml
+++ b/standard-server/src/main/resources/mapper/MbomMapper.xml
@@ -31,19 +31,52 @@
</resultMap>
<select id="selectAllMbom" resultMap="oneMap">
select m.id mid,
- m.name mname,
- unit,
- num,
- specifications,
- t.name tname,
- father
+ m.name mname,
+ unit,
+ num,
+ specifications,
+ t.name tname,
+ father
from mom_ocean.mbom m
- left join mom_ocean.technology t on m.technology_id = t.id
+ left join mom_ocean.technology t on m.technology_id = t.id
where m.state = 1
- and m.version = #{version}
- and specifications_id = #{specificationsId}
+ and m.version = #{version}
+ and specifications_id = #{specificationsId}
<if test="message!=null and message!=''">
and m.name like concat('%',#{message},'%')
</if>
</select>
+
+ <!--鏍规嵁鍨嬪彿id鏌ヨ璇ュ瀷鍙蜂笅鎵�鏈夊伐鑹洪渶瑕佺殑鐗╂枡娓呭崟-->
+ <select id="selAllBySpeId" resultType="com.yuanchu.mom.pojo.Mbom">
+ select *
+ from mom_ocean.mbom
+ 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>
+
+ <!--鏍规嵁宸ヨ壓璺嚎id鍒犻櫎鐗╂枡娓呭崟-->
+ <update id="delMbomByTecId">
+ update mom_ocean.mbom
+ set state=0
+ where technology_id = #{id}
+ </update>
+
+ <!--鏍规嵁宸ヨ壓璺嚎id鎵归噺鍒犻櫎-->
+ <update id="delAllByTecId">
+ update mom_ocean.mbom
+ set state=0
+ where technology_id in (${ids})
+ </update>
+
+ <!--鏍规嵁鐗╂枡娓呭崟id鎵归噺鍒犻櫎-->
+ <update id="delAllMbom">
+ update mom_ocean.mbom
+ set state=0
+ where id in (${ids})
+ </update>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3