|
|
@ -276,20 +276,26 @@ public class WarehouseWaybillController extends BladeController { |
|
|
|
String method = "############exportWaybillList: "; |
|
|
|
String method = "############exportWaybillList: "; |
|
|
|
log.info(method + "请求参数{}", waybillDTO); |
|
|
|
log.info(method + "请求参数{}", waybillDTO); |
|
|
|
try{ |
|
|
|
try{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
StringBuffer fileNameStringBuffer =new StringBuffer("运单列表"); |
|
|
|
//当前登录人选择的仓库
|
|
|
|
//当前登录人选择的仓库
|
|
|
|
List<Long> warehouseIds = new ArrayList<>(); |
|
|
|
List<Long> warehouseIds = new ArrayList<>(); |
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); |
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); |
|
|
|
if(!Objects.isNull(myCurrentWarehouse)){ |
|
|
|
if(!Objects.isNull(myCurrentWarehouse)){ |
|
|
|
|
|
|
|
fileNameStringBuffer.append("(").append(myCurrentWarehouse.getName()).append(")"); |
|
|
|
warehouseIds.add(myCurrentWarehouse.getId()); |
|
|
|
warehouseIds.add(myCurrentWarehouse.getId()); |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
|
|
|
|
fileNameStringBuffer.append("(").append("全仓").append(")"); |
|
|
|
List<BasicdataWarehouseEntity> myWatchWarehouse = warehouseClient.getMyWatchWarehouse(); |
|
|
|
List<BasicdataWarehouseEntity> myWatchWarehouse = warehouseClient.getMyWatchWarehouse(); |
|
|
|
myWatchWarehouse.forEach(warehouseEntity -> warehouseIds.add(warehouseEntity.getId())); |
|
|
|
myWatchWarehouse.forEach(warehouseEntity -> warehouseIds.add(warehouseEntity.getId())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
waybillDTO.setWarehouseIds(warehouseIds); |
|
|
|
|
|
|
|
|
|
|
|
List<ExportWarehouseWaybillVO> list = warehouseWaybillService.exportWaybillList(waybillDTO); |
|
|
|
List<ExportWarehouseWaybillVO> list = warehouseWaybillService.exportWaybillList(waybillDTO); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fileNameStringBuffer.append(DateUtil.format(DateUtil.now(), DateUtil.PATTERN_DATE)); |
|
|
|
//导出ls
|
|
|
|
//导出ls
|
|
|
|
ExcelUtil.export(response, "运单列表"+myCurrentWarehouse.getName(), "运单列表", list, ExportWarehouseWaybillVO.class); |
|
|
|
ExcelUtil.export(response, fileNameStringBuffer.toString(), "运单列表", list, ExportWarehouseWaybillVO.class); |
|
|
|
}catch (CustomerException e){ |
|
|
|
}catch (CustomerException e){ |
|
|
|
log.error(e.message,e); |
|
|
|
log.error(e.message,e); |
|
|
|
throw new CustomerException(e.code,e.message); |
|
|
|
throw new CustomerException(e.code,e.message); |
|
|
|