From a080d67b9964cd632f52c481c0f20ef2e3e7073a Mon Sep 17 00:00:00 2001
From: sfd <sun.sunshine@163.com>
Date: 星期五, 09 五月 2025 10:19:07 +0800
Subject: [PATCH] 放开权限

---
 aps-modules/aps-core/src/main/resources/mapper/core/ApsBomHeaderMapper.xml |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/aps-modules/aps-core/src/main/resources/mapper/core/ApsBomHeaderMapper.xml b/aps-modules/aps-core/src/main/resources/mapper/core/ApsBomHeaderMapper.xml
index cc473bc..31c225b 100644
--- a/aps-modules/aps-core/src/main/resources/mapper/core/ApsBomHeaderMapper.xml
+++ b/aps-modules/aps-core/src/main/resources/mapper/core/ApsBomHeaderMapper.xml
@@ -29,7 +29,7 @@
         <include refid="selectApsBomHeaderVo"/>
         <where>  
             <if test="bomHeaderId != null  and bomHeaderId != ''"> and bom_header_id = #{bomHeaderId}</if>
-            <if test="itemCode != null  and itemCode != ''"> and item_code = #{itemCode}</if>
+            <if test="itemCode != null  and itemCode != ''"> and item_code like '%' || #{itemCode} || '%'</if>
             <if test="itemName != null  and itemName != ''"> and item_name = #{itemName}</if>
             <if test="startDate != null "> and start_date = #{startDate}</if>
             <if test="endDate != null "> and end_date = #{endDate}</if>
@@ -102,4 +102,16 @@
             #{id}
         </foreach>
     </delete>
+
+    <select id="selectBomRedisData" parameterType="String" resultType="com.alibaba.fastjson2.JSONObject">
+        SELECT a.item_code as mainItemCode,f.num as mainStock,b.item_code as subItemCode,b.num as usageNum,c.num as subStock,d.self_made as selfMade FROM aps_bom_header a
+        LEFT JOIN aps_bom_line b on a.bom_header_id=b.bom_header_id
+        LEFT JOIN aps_material_storage_management c on b.item_code=c.item_number
+        LEFT JOIN aps_material_management d on b.item_code=d.item_number
+        LEFT JOIN aps_material_storage_management as f on a.item_code=f.item_number
+        <if test="orgCode != null and orgCode != ''">
+            WHERE a.org_code=#{orgCode} and d.applicable_factories=#{orgCode} and c.applicable_factories=#{orgCode}
+        </if>
+        ORDER BY mainItemCode
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3