| | |
| | | // excludeTrash(param); |
| | | param.put("curr", curr); |
| | | param.put("limit", limit); |
| | | List<LocDetl> groupLocDetl = locDetlService.selectGroupPage(param, curr, limit); |
| | | for (LocDetl locDetl : groupLocDetl) { |
| | | Page<LocDetl> groupLocDetl = locDetlService.getStockStatis2(toPage(1, 10000, param, LocDetl.class)); |
| | | // List<LocDetl> groupLocDetl = locDetlService.selectGroupPage(param, curr, limit); |
| | | for (LocDetl locDetl : groupLocDetl.getRecords()) { |
| | | Mat mat = matService.selectOne(new EntityWrapper<Mat>() |
| | | .eq("matnr", locDetl.getMatnr())); |
| | | locDetl.setStoreMax(mat.getStoreMax()); |
| | |
| | | long time = maxDate.getTime(); |
| | | Date now = new Date(); |
| | | long time1 = now.getTime(); |
| | | locDetl.setNowTime((int)((time1 - time)/(1000*60*60*24))); |
| | | locDetl.setNowTime((int) ((time1 - time) / (1000 * 60 * 60 * 24))); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | |
| | | List<LocDetl> getStockStatis(Map<String, Object> map); |
| | | |
| | | List<LocDetl> getStockStatis2(Map<String, Object> map); |
| | | |
| | | Integer getStockStatisCount(Map<String, Object> map); |
| | | |
| | | List<LocDetl> getStockStatisExcel(); |
| | |
| | | List<String> getSameDetlToday(String matnr, Integer start, Integer end); |
| | | |
| | | Page<LocDetl> getStockStatis(Page<LocDetl> page); |
| | | Page<LocDetl> getStockStatis2(Page<LocDetl> page); |
| | | |
| | | Double getSumAnfme(String matnr); |
| | | |
| | |
| | | page.setTotal(baseMapper.getStockStatisCount(page.getCondition())); |
| | | return page; |
| | | } |
| | | @Override |
| | | public Page<LocDetl> getStockStatis2(Page<LocDetl> page) { |
| | | page.setRecords(baseMapper.getStockStatis2(page.getCondition())); |
| | | page.setTotal(baseMapper.getStockStatisCount(page.getCondition())); |
| | | return page; |
| | | } |
| | | |
| | | @Override |
| | | public Double getSumAnfme(String matnr) { |
| | |
| | | ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize}) |
| | | </select> |
| | | |
| | | <select id="getStockStatis2" resultType="com.zy.asrs.entity.LocDetl"> |
| | | select * from |
| | | ( |
| | | select |
| | | ROW_NUMBER() over (order by sum(a.anfme),a.batch desc) as row |
| | | , a.matnr |
| | | , a.batch |
| | | , sum(a.anfme) as anfme |
| | | from asr_loc_detl a |
| | | where 1=1 |
| | | <include refid="stockOutCondition"></include> |
| | | group by a.matnr,a.batch |
| | | ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize}) |
| | | </select> |
| | | |
| | | <select id="getStockStatisCount" parameterType="java.util.Map" resultType="java.lang.Integer"> |
| | | select count(1) as count from |
| | | ( |