From fca9d7f35e6a51da71037c4c9c6cb3ba56a17feb Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Wed, 23 Oct 2024 18:14:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=BF=90=E5=8D=95?= =?UTF-8?q?=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../warehouse/controller/WarehouseWaybillController.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java index a7858ef1a..bc2667475 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java @@ -276,20 +276,26 @@ public class WarehouseWaybillController extends BladeController { String method = "############exportWaybillList: "; log.info(method + "请求参数{}", waybillDTO); try{ + + StringBuffer fileNameStringBuffer =new StringBuffer("运单列表"); //当前登录人选择的仓库 List warehouseIds = new ArrayList<>(); BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); if(!Objects.isNull(myCurrentWarehouse)){ + fileNameStringBuffer.append("(").append(myCurrentWarehouse.getName()).append(")"); warehouseIds.add(myCurrentWarehouse.getId()); }else{ + fileNameStringBuffer.append("(").append("全仓").append(")"); List myWatchWarehouse = warehouseClient.getMyWatchWarehouse(); myWatchWarehouse.forEach(warehouseEntity -> warehouseIds.add(warehouseEntity.getId())); } + waybillDTO.setWarehouseIds(warehouseIds); List list = warehouseWaybillService.exportWaybillList(waybillDTO); + fileNameStringBuffer.append(DateUtil.format(DateUtil.now(), DateUtil.PATTERN_DATE)); //导出ls - ExcelUtil.export(response, "运单列表"+myCurrentWarehouse.getName(), "运单列表", list, ExportWarehouseWaybillVO.class); + ExcelUtil.export(response, fileNameStringBuffer.toString(), "运单列表", list, ExportWarehouseWaybillVO.class); }catch (CustomerException e){ log.error(e.message,e); throw new CustomerException(e.code,e.message);