| | |
| | | from asr_loc_detl |
| | | where loc_no=#{locNo} |
| | | </select> |
| | | <select id="getStockStatis" resultMap="BaseResultMap"> |
| | | select a.mat_name,a.mat_no,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 |
| | | </select> |
| | | <select id="getStockStatisCount" resultType="integer"> |
| | | select |
| | | count(1) |
| | | from asr_loc_detl a |
| | | </select> |
| | | <select id="getStockStatisExcel" resultMap="BaseResultMap"> |
| | | select |
| | | ROW_NUMBER() over (order by a.mat_no, sum(a.qty) desc) as row |
| | | , a.mat_no, a.mat_name |
| | | , sum(a.qty) as qty |
| | | from asr_loc_detl a |
| | | where 1=1 |
| | | group by a.mat_no,a.mat_name |
| | | </select> |
| | | </mapper> |