| | |
| | | <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> |
| | |
| | | <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> |