From 4ad61e4c257621124625a89853eaa8334a11b0be Mon Sep 17 00:00:00 2001
From: XiaoRuby <3114200645@qq.com>
Date: 星期六, 09 九月 2023 11:26:28 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 standard-server/src/main/resources/mapper/MaterialMapper.xml |   48 ++++++++++++++++++++++++------------------------
 1 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/standard-server/src/main/resources/mapper/MaterialMapper.xml b/standard-server/src/main/resources/mapper/MaterialMapper.xml
index 6c02f99..e7fc290 100644
--- a/standard-server/src/main/resources/mapper/MaterialMapper.xml
+++ b/standard-server/src/main/resources/mapper/MaterialMapper.xml
@@ -26,38 +26,38 @@
         <id property="id" column="spid"/>
         <result property="name" column="spname"/>
     </resultMap>
-    <select id="selectTreeByMaterial" resultMap="selectTreeByMaterialMap" >
-        select m.type, #涓�绾х被鍨�
-               father, #浜岀骇浜у搧澶х被(4澶х被)
-               m.id    mid, #涓夌骇鐗╂枡id
+    <select id="selectTreeByMaterial" resultMap="selectTreeByMaterialMap">
+        select m.type,        #涓�绾х被鍨�
+               father,        #浜岀骇浜у搧澶х被(4澶х被)
+               m.id    mid,   #涓夌骇鐗╂枡id
                m.name  mname, #涓夌骇鏍峰搧鍚嶇О
-               s.id    sid, #鍥涚骇鏍囧噯id
+               s.id    sid,   #鍥涚骇鏍囧噯id
                s.name  sname, #鍥涚骇鏍囧噯鍚�
-               sp.id   spid, #浜旂骇鍨嬪彿id
+               sp.id   spid,  #浜旂骇鍨嬪彿id
                sp.name spname #浜旂骇鍨嬪彿鍚�
-        from (select type, id, name,father from mom_ocean.material where state = 1) m
-                 left join (select id, name, material_id from mom_ocean.standard where state = 1) s on m.id = s.material_id
+        from (select type, id, name, father from mom_ocean.material where state = 1) m
+                 left join (select id, name, material_id from mom_ocean.standard where state = 1) s
+                           on m.id = s.material_id
                  left join (select id, name, standard_id from mom_ocean.specifications where state = 1) sp
                            on sp.standard_id = s.id
     </select>
 
-    <select id="selectMcodeId" resultType="com.yuanchu.mom.pojo.Material">
-        select id, code
+    <!--鏍规嵁鏍囧噯id鏌ヨ鐗╂枡-->
+    <select id="selFath" resultType="com.yuanchu.mom.pojo.Material">
+        select *
         from mom_ocean.material
-        where name = #{name}
+        where state = 1
+          and id = (select material_id
+                    from mom_ocean.standard
+                    where standard.state = 1
+                      and standard.id = #{id})
     </select>
-
-    <select id="selectIdByCoNa" resultType="java.util.Map">
-        select m.id     '鐗╂枡id',
-               st.id    '瑙勬牸id',
-               st.name  '瑙勬牸鍚嶇О',
-               sp.name  '鍨嬪彿鍚嶇О'
-        from mom_ocean.material m,
-             mom_ocean.standard st,
-             mom_ocean.specifications sp
-        where m.id = material_id
-          and material_id = standard_id
-          and m.name = #{name}
-          and code = #{code}
+    <!--鏍规嵁鐗╂枡鍚嶇О鏌ヨ鎴愬搧浜у搧缂栧彿-->
+    <select id="selMcode" resultType="java.lang.String">
+        select code
+        from mom_ocean.material
+        where state = 1
+          and type = 1
+          and name = #{name}
     </select>
 </mapper>

--
Gitblit v1.9.3