| | |
| | | @PreAuthorize("hasAuthority('asrs:waitPakin:list')") |
| | | @PostMapping("/waitPakin/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(waitPakinService.list(), WaitPakin.class), response); |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<WaitPakin, BaseParam> pageParam = new PageParam<>(baseParam, WaitPakin.class); |
| | | List<WaitPakin> data = waitPakinService.list(pageParam.buildWrapper(true)); |
| | | |
| | | ExcelUtil.build(ExcelUtil.create(data, WaitPakin.class), response); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:waitPakin:list')") |
| | |
| | | throw new CoolException("订单明细不存在"); |
| | | } |
| | | |
| | | Long detlId = null; |
| | | for (OrderDetl orderDetl : orderDetls) { |
| | | Mat mat = orderDetl.getMat$(); |
| | | OrderDetl orderDetl = null; |
| | | for (OrderDetl detl : orderDetls) { |
| | | Mat mat = detl.getMat$(); |
| | | if (mat.getMatnr().equals(waitPakinTemplate.getMatnr())) { |
| | | detlId = orderDetl.getId(); |
| | | orderDetl = detl; |
| | | } |
| | | } |
| | | |
| | | if (detlId == null) { |
| | | if (orderDetl == null) { |
| | | throw new CoolException("订单明细不存在"); |
| | | } |
| | | |
| | |
| | | waitPakin.setOrderNo(order.getOrderNo()); |
| | | waitPakin.setAnfme(waitPakinTemplate.getAnfme()); |
| | | waitPakin.setBarcode(waitPakinTemplate.getBarcode()); |
| | | waitPakin.setDetlId(detlId); |
| | | waitPakin.setDetlId(orderDetl.getId()); |
| | | waitPakin.setMatnr(orderDetl.getMat$().getMatnr()); |
| | | waitPakin.setBatch(orderDetl.getBatch()); |
| | | waitPakinService.comb(waitPakin); |
| | | } |
| | | return R.ok(); |