| | |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | StopWatch stopWatch = new StopWatch(); |
| | | stopWatch.start(); |
| | | //StopWatch stopWatch = new StopWatch(); |
| | | //stopWatch.start(); |
| | | EntityWrapper<OrderDetl> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convertLike(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } else { |
| | | wrapper.orderBy("create_time", false); |
| | | } |
| | | // List<DocType> pakins = docTypeService.selectList(new EntityWrapper<DocType>().eq("pakout", 1)); |
| | | // List<Long> docIds = new ArrayList<>(); |
| | | // for (DocType pakin : pakins) { |
| | | // if (pakin.getDocId() != 17 && pakin.getDocId() != 33 && pakin.getDocId() != 34 && pakin.getDocId() != 35) { |
| | | // docIds.add(pakin.getDocId()); |
| | | // } |
| | | // } |
| | | Object o = param.get("orderType"); |
| | | if (o != null) { |
| | | wrapper.in("source", o); |
| | | } |
| | | Page<OrderDetl> page = orderDetlService.selectPage(new Page<>(curr, limit), wrapper); |
| | | for (OrderDetl record : page.getRecords()) { |
| | | Double sumAnfme = agvLocDetlService.getSumAnfme(record.getMatnr(), record.getThreeCode()); |
| | | record.setStock(sumAnfme == null ? 0 : sumAnfme); |
| | | } |
| | | //stopWatch.stop(); |
| | | //System.out.println(stopWatch.getTotalTimeSeconds()); |
| | | return R.ok(page); |
| | | } |
| | | |
| | | @RequestMapping(value = "/orderDetl/pakout/list/authV7") |
| | | @ManagerAuth |
| | | public R pakoutList7(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | //StopWatch stopWatch = new StopWatch(); |
| | | //stopWatch.start(); |
| | | EntityWrapper<OrderDetl> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convertLike(param, wrapper); |
| | |
| | | Double sumAnfme = agvLocDetlService.getSumAnfme(record.getMatnr(), record.getThreeCode()); |
| | | record.setStock(sumAnfme == null ? 0 : sumAnfme); |
| | | } |
| | | stopWatch.stop(); |
| | | System.out.println(stopWatch.getTotalTimeSeconds()); |
| | | //stopWatch.stop(); |
| | | //System.out.println(stopWatch.getTotalTimeSeconds()); |
| | | return R.ok(page); |
| | | } |
| | | |
| | |
| | | List<DocType> pakins = docTypeService.selectList(new EntityWrapper<DocType>().eq("pakout", 1)); |
| | | List<Long> docIds = new ArrayList<>(); |
| | | for (DocType pakin : pakins) { |
| | | if (pakin.getDocId() == 37) { |
| | | if (pakin.getDocId() == 37 || pakin.getDocId() == 43) { |
| | | docIds.add(pakin.getDocId()); |
| | | } |
| | | } |
| | |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | if (entry.getKey().equals("order_id")) { |
| | | wrapper.eq(entry.getKey(), val); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |