#
Junjie
2025-02-14 ac4341ea6b66ae02427d39d35f41d42d78b2eb2e
zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/WaitPakinController.java
@@ -125,7 +125,11 @@
    @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')")
@@ -153,15 +157,15 @@
                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("订单明细不存在");
            }
@@ -170,7 +174,9 @@
            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();