liding
4 天以前 c16a5f590db461391a4441e520f3264526c11905
src/main/java/com/ruoyi/sales/controller/ShippingInfoController.java
@@ -129,7 +129,7 @@
        //  为订单下的每一个产品生成发货台账记录 (显示单个产品)
        List<SalesLedgerProduct> products = salesLedgerProductMapper.selectList(new LambdaQueryWrapper<SalesLedgerProduct>()
                .eq(SalesLedgerProduct::getSalesLedgerId, salesLedger.getId()));
        if (CollectionUtils.isNotEmpty(products)) {
            for (SalesLedgerProduct product : products) {
                ShippingInfo si = new ShippingInfo();
@@ -137,7 +137,7 @@
                si.setSalesLedgerProductId(product.getId());
                si.setShippingNo(shNo);
                si.setStatus("待审核");
                si.setType(req.getType()); // 来源/类型
                si.setType(req.getType());
                shippingInfoService.save(si);
            }
        }
@@ -183,9 +183,9 @@
     */
    @PostMapping("/export")
    @ApiOperation("导出发货信息")
    public void export(HttpServletResponse response) {
        List<ShippingInfo> list = shippingInfoMapper.listAll();
        ExcelUtil<ShippingInfo> util = new ExcelUtil<ShippingInfo>(ShippingInfo.class);
    public void export(ShippingInfo req, HttpServletResponse response) {
        List<ShippingInfoDto> list = shippingInfoMapper.exportList(req);
        ExcelUtil<ShippingInfoDto> util = new ExcelUtil<ShippingInfoDto>(ShippingInfoDto.class);
        util.exportExcel(response, list, "发货信息");
    }