| | |
| | | </if> |
| | | </sql> |
| | | |
| | | <sql id="stockOutCondition1"> |
| | | <if test="mat_no!=null and mat_no!='' "> |
| | | and mat_no like '%' + #{mat_no} + '%' |
| | | </if> |
| | | <if test="mat_name!=null and mat_name!='' "> |
| | | and mat_name like '%' + #{mat_name} + '%' |
| | | </if> |
| | | <if test="str3!=null and str3!=''" > |
| | | and str3 like '%'+#{str3}+'%' |
| | | </if> |
| | | </sql> |
| | | |
| | | <select id="getStockOutPage" resultMap="BaseResultMap"> |
| | | select * from |
| | | ( |
| | |
| | | where loc_no=#{locNo} |
| | | </select> |
| | | <select id="getStockStatis" resultMap="BaseResultMap"> |
| | | select a.mat_name,a.mat_no,a.supplier,a.str3,sum(a.qty) qty from |
| | | <!-- select a.mat_name,a.mat_no,a.supplier,a.str3,sum(a.qty) qty from--> |
| | | <!-- (--> |
| | | <!-- select--> |
| | | <!-- ROW_NUMBER() over (order by c.appe_time,c.mat_no,c.loc_no) as row,--> |
| | | <!-- c.*--> |
| | | <!-- from asr_loc_detl c--> |
| | | <!-- ) a where a.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})--> |
| | | <!-- <include refid="stockOutCondition"></include>--> |
| | | <!-- group by a.mat_no,a.mat_name,a.supplier,a.str3--> |
| | | |
| | | select * from |
| | | ( |
| | | select ROW_NUMBER() over (order by a.mat_no) as row, |
| | | a.mat_name,a.mat_no,a.supplier,a.str3,sum(a.qty) qty from |
| | | ( |
| | | select |
| | | ROW_NUMBER() over (order by c.appe_time,c.mat_no,c.loc_no) as row, |
| | | c.* |
| | | mat_name,mat_no,supplier,str3,qty |
| | | from asr_loc_detl c |
| | | ) a where a.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize}) |
| | | <include refid="stockOutCondition"></include> |
| | | where 1=1 |
| | | <include refid="stockOutCondition1"></include> |
| | | ) a |
| | | group by a.mat_no,a.mat_name,a.supplier,a.str3 |
| | | ) d |
| | | where 1=1 |
| | | and row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize}) |
| | | </select> |
| | | <select id="getStockStatisCount" resultType="integer"> |
| | | select |