From 09b04dd475fffad1d38cecf946cd09b6698b0938 Mon Sep 17 00:00:00 2001 From: zc <zc> Date: 星期四, 25 七月 2024 14:40:18 +0800 Subject: [PATCH] 需求 --- src/main/resources/mapper/LocDetlMapper.xml | 46 ++++++++++++++++++++++++++++++++++------------ 1 files changed, 34 insertions(+), 12 deletions(-) diff --git a/src/main/resources/mapper/LocDetlMapper.xml b/src/main/resources/mapper/LocDetlMapper.xml index e7bd9f2..9feb053 100644 --- a/src/main/resources/mapper/LocDetlMapper.xml +++ b/src/main/resources/mapper/LocDetlMapper.xml @@ -413,12 +413,42 @@ <id column="asrsQty" property="lkQty" /> <id column="erpQty" property="erpQty" /> + <id column="pgNo" property="pgNo" /> + <id column="outOrderNo" property="outOrderNo" /> + <id column="batch" property="batch" /> + </resultMap> <select id="asrsAndErpList" resultMap="stockStatisDTO"> SELECT * FROM( SELECT ROW_NUMBER ( ) OVER ( ORDER BY d.matnr ) AS row, * FROM ( SELECT * FROM asr_show_diff WHERE 1 = 1 + <if test="different != null and different == 1 "> + and asrsQty != erpQty + </if> + <if test="different != null and different == 0 "> + and asrsQty = erpQty + </if> + <if test="matnr != null and matnr != ''"> + AND matnr like #{matnr} + </if> + <if test="maktx != null and maktx != ''"> + AND maktx like #{maktx} + </if> + <if test="specs != null and specs != ''"> + AND specs like #{specs} + </if> + <if test="sPgNO != null"> + AND pgNO like #{sPgNO} + </if> + <if test="outOrderNo != null"> + AND outOrderNo like #{outOrderNo} + </if> + ) d ) e WHERE 1=1 and e.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize}) + </select> + + <select id="asrsAndErpCount" resultType="java.lang.Long"> + SELECT count(*) FROM asr_show_diff WHERE 1 = 1 <if test="different != null and different == 1 "> and asrsQty != erpQty </if> @@ -434,19 +464,11 @@ <if test="specs != null"> AND specs like #{specs} </if> - ) d ) e WHERE 1=1 and e.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize}) - </select> - - <select id="asrsAndErpCount" resultType="java.lang.Long"> - SELECT count(*) FROM asr_show_diff WHERE 1 = 1 and asrsQty != erpQty - <if test="matnr != null"> - AND matnr like #{matnr} + <if test="sPgNO != null"> + AND pgNO like #{sPgNO} </if> - <if test="maktx != null"> - AND maktx like #{maktx} - </if> - <if test="specs != null"> - AND specs like #{specs} + <if test="outOrderNo != null"> + AND outOrderNo like #{outOrderNo} </if> </select> </mapper> -- Gitblit v1.9.1