From 10d7b3239e4baec952b9ee8a3e948399916d336c Mon Sep 17 00:00:00 2001 From: zhang <zc857179121@qq.com> Date: 星期一, 20 十月 2025 08:23:58 +0800 Subject: [PATCH] 13 --- src/main/resources/mapper/MatMapper.xml | 18 ++---------------- 1 files changed, 2 insertions(+), 16 deletions(-) diff --git a/src/main/resources/mapper/MatMapper.xml b/src/main/resources/mapper/MatMapper.xml index b7157a6..ffd3de7 100644 --- a/src/main/resources/mapper/MatMapper.xml +++ b/src/main/resources/mapper/MatMapper.xml @@ -48,17 +48,10 @@ <select id="listByPage" resultMap="BaseResultMap"> SELECT - isnull(mld.amount,0) as stock, mm.* FROM man_mat mm LEFT JOIN man_tag mt ON mm.tag_id = mt.id - LEFT JOIN ( - select - matnr, - sum(anfme) as amount - from man_loc_detl - group by matnr - ) as mld on mld.matnr = mm.matnr + WHERE 1=1 and (mm.memo is null or mm.memo != '鎵撳寘涓婄嚎') AND (CHARINDEX(','+#{tagId}+',', ','+mt.path+',') > 0 OR mt.id = #{tagId}) @@ -73,17 +66,10 @@ <select id="listByPage2" resultMap="BaseResultMap"> SELECT - isnull(mld.amount,0) as stock, mm.* FROM man_mat mm LEFT JOIN man_tag mt ON mm.tag_id = mt.id - LEFT JOIN ( - select - matnr, - sum(anfme) as amount - from man_loc_detl - group by matnr - ) as mld on mld.matnr = mm.matnr + WHERE 1=1 and (mm.memo is null or mm.memo != '鎵撳寘涓婄嚎') AND (CHARINDEX(','+#{tagId}+',', ','+mt.path+',') > 0 OR mt.id = #{tagId}) -- Gitblit v1.9.1