From 89b986a8cc185ffb86534b902dad144e2a74cc3b Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Tue, 26 Mar 2024 17:39:42 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E9=80=81=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E3=80=81=E8=87=AA=E6=8F=90=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vo/DistributionStockListVO.java | 12 + .../logpm/distribution/bean/MyExcelUtil.java | 67 ++++- .../DistributionDeliveryListController.java | 25 ++ .../dto/DistributionDeliveryExcelDTO.java | 23 ++ .../DistributionDeliveryClientExcel.java | 212 +++++++++++++++ .../DistributionDeliveryInventoryExcel.java | 140 ++++++++++ .../excel/DistributionDeliveryOrderExcel.java | 163 ++++++++++++ .../DistributionDeliveryPackageExcel.java | 242 ++++++++++++++++++ .../DistributionDeliveryInfoMapper.java | 21 +- .../mapper/DistributionDeliveryInfoMapper.xml | 167 ++++++++++++ .../mapper/DistributionReservationMapper.java | 8 + .../mapper/DistributionReservationMapper.xml | 21 +- .../mapper/DistrilbutionBillLadingMapper.xml | 4 +- .../IDistributionDeliveryInfoService.java | 16 ++ .../IDistributionDeliveryListService.java | 10 + .../impl/DistributionAsyncServiceImpl.java | 26 +- .../DistributionDeliveryInfoServiceImpl.java | 67 ++++- .../DistributionDeliveryListServiceImpl.java | 195 ++++++++++++-- 18 files changed, 1373 insertions(+), 46 deletions(-) create mode 100644 blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionDeliveryExcelDTO.java create mode 100644 blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryClientExcel.java create mode 100644 blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryInventoryExcel.java create mode 100644 blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryOrderExcel.java create mode 100644 blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryPackageExcel.java diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockListVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockListVO.java index bcf16ff97..942eeda95 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockListVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockListVO.java @@ -44,6 +44,12 @@ public class DistributionStockListVO extends DistributionStockListEntity { */ @ApiModelProperty(value = "装车数量") private String loadingNumber; + + /** + * 装车数量 + */ + @ApiModelProperty(value = "签收数量") + private String signedingNumber; /** * 添加数量 */ @@ -96,6 +102,12 @@ public class DistributionStockListVO extends DistributionStockListEntity { @ApiModelProperty(value = "以备件数") private Integer stockupNum; + /** + * 以备件数 + */ + @ApiModelProperty(value = "以备件数") + private Integer readyStock; + /** * 托盘id diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/bean/MyExcelUtil.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/bean/MyExcelUtil.java index 4056da135..b041896c9 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/bean/MyExcelUtil.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/bean/MyExcelUtil.java @@ -5,12 +5,20 @@ import com.alibaba.excel.ExcelWriter; import com.alibaba.excel.write.builder.ExcelWriterBuilder; import com.alibaba.excel.write.handler.WriteHandler; import com.alibaba.excel.write.metadata.WriteSheet; -import com.logpm.distribution.excel.DistributionStockupPackageListDetailExcel; +import com.logpm.distribution.dto.DistributionDeliveryExcelDTO; +import com.logpm.distribution.excel.*; +import com.logpm.distribution.vo.DistributionDeliveryInfoVO; +import com.logpm.distribution.vo.DistributionParcelListVO; +import com.logpm.distribution.vo.DistributionStockArticleVO; +import com.logpm.distribution.vo.DistributionStockListVO; import org.apache.commons.codec.Charsets; import org.springblade.core.excel.util.ExcelUtil; +import org.springblade.core.tool.utils.Func; +import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; import java.net.URLEncoder; +import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -59,4 +67,61 @@ public class MyExcelUtil extends ExcelUtil { } + public static void exDeliveryDetailedList(HttpServletResponse response, DistributionDeliveryExcelDTO map, String fileName) { + + ServletOutputStream outputStream = null; + try { + response.setContentType("application/vnd.ms-excel"); + fileName = URLEncoder.encode(fileName, Charsets.UTF_8.name()); + response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); + response.setHeader("content-Type", "application/vnd.ms-excel"); + response.setCharacterEncoding("UTF-8"); + outputStream = response.getOutputStream(); + ExcelWriter build = EasyExcel.write(outputStream).build(); +// Object o = map.get("client"); + + WriteSheet clientList = EasyExcel.writerSheet(1,"客户列表").head(DistributionDeliveryClientExcel.class).build(); + WriteSheet orderList = EasyExcel.writerSheet("订单列表").head(DistributionDeliveryOrderExcel.class).build(); + WriteSheet inventoryList = EasyExcel.writerSheet("库存品列表").head(DistributionDeliveryInventoryExcel.class).build(); + WriteSheet packageList = EasyExcel.writerSheet("包件列表").head(DistributionDeliveryPackageExcel.class).build(); + if (Func.isNotEmpty(map.getDeliveryInfoVOS())){ + List deliveryClientExcels = new ArrayList<>(); + for (DistributionDeliveryInfoVO deliveryInfoVO : map.getDeliveryInfoVOS()) { + DistributionDeliveryClientExcel clientExcel = Func.copy(deliveryInfoVO, DistributionDeliveryClientExcel.class); + deliveryClientExcels.add(clientExcel); + } + build.write(deliveryClientExcels,clientList); + } + if (Func.isNotEmpty(map.getDistributionStockArticleVOS())){ + List distributionStockArticleVOS = new ArrayList<>(); + for (DistributionStockArticleVO distributionStockArticleVO : map.getDistributionStockArticleVOS()) { + DistributionDeliveryOrderExcel deliveryOrderExcel = Func.copy(distributionStockArticleVO, DistributionDeliveryOrderExcel.class); + distributionStockArticleVOS.add(deliveryOrderExcel); + } + build.write(distributionStockArticleVOS,orderList); + } + if (Func.isNotEmpty(map.getPackageListByDeliverylistId())){ + List distributionDeliveryPackageExcelList = new ArrayList<>(); + for (DistributionParcelListVO distributionParcelListVO : map.getPackageListByDeliverylistId()) { + DistributionDeliveryPackageExcel distributionDeliveryPackageExcel = Func.copy(distributionParcelListVO, DistributionDeliveryPackageExcel.class); + distributionDeliveryPackageExcelList.add(distributionDeliveryPackageExcel); + } + build.write(distributionDeliveryPackageExcelList,packageList); + } + if (Func.isNotEmpty(map.getDistributionStockListVOS())){ + List distributionDeliveryPackageExcelList = new ArrayList<>(); + + for (DistributionStockListVO distributionStockListVO : map.getDistributionStockListVOS()) { + DistributionDeliveryInventoryExcel distributionDeliveryInventoryExcel = Func.copy(distributionStockListVO, DistributionDeliveryInventoryExcel.class); + distributionDeliveryPackageExcelList.add(distributionDeliveryInventoryExcel); + } + build.write(distributionDeliveryPackageExcelList,inventoryList); + } + + build.finish(); + } catch (Exception e) { + + throw new RuntimeException("请稍后再试...."); + } + } } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java index a3a98a21a..0be60c311 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java @@ -22,6 +22,8 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.logpm.basicdata.entity.BasicdataWarehouseEntity; import com.logpm.basicdata.feign.IBasicdataWarehouseClient; +import com.logpm.distribution.bean.MyExcelUtil; +import com.logpm.distribution.dto.DistributionDeliveryExcelDTO; import com.logpm.distribution.dto.DistributionDeliveryInfoDTO; import com.logpm.distribution.dto.DistributionDeliveryListDTO; import com.logpm.distribution.dto.DistrilbutionAppsignforDTO; @@ -55,6 +57,7 @@ import springfox.documentation.annotations.ApiIgnore; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; import java.text.ParseException; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -532,6 +535,28 @@ public class DistributionDeliveryListController extends BladeController { } + /** + * 导出数据 + */ + @GetMapping("/export-distributionDeliveryListDetail") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "导出数据", notes = "传入distributionDeliveryList") + public void exportDistributionDeliveryListDetail(@ApiIgnore @RequestParam Long deliveryId, BladeUser bladeUser, HttpServletResponse response) { +// BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); +// if (Func.isEmpty(myCurrentWarehouse)){ +// return R.fail(403,"未授权仓库!!!"); +// } +// DistributionDeliveryListEntity deliveryListEntity = distributionDeliveryListService.getById(deliveryId); +// if (Func.isEmpty(deliveryListEntity)){ +// log.info("#####################"); +// return R.fail(403,"未授权仓库!!!"); +// } + + DistributionDeliveryExcelDTO map = distributionDeliveryListService.exportDistributionDeliveryListDetail(deliveryId); + MyExcelUtil.exDeliveryDetailedList(response,map,"配送清单"); + } + + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionDeliveryExcelDTO.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionDeliveryExcelDTO.java new file mode 100644 index 000000000..dab5a0215 --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionDeliveryExcelDTO.java @@ -0,0 +1,23 @@ +package com.logpm.distribution.dto; + + +import com.logpm.distribution.vo.DistributionDeliveryInfoVO; +import com.logpm.distribution.vo.DistributionParcelListVO; +import com.logpm.distribution.vo.DistributionStockArticleVO; +import com.logpm.distribution.vo.DistributionStockListVO; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.List; +@Data +public class DistributionDeliveryExcelDTO { + + + private List deliveryInfoVOS; + private List distributionStockArticleVOS; + private List distributionStockListVOS; + private List packageListByDeliverylistId; + + + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryClientExcel.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryClientExcel.java new file mode 100644 index 000000000..73d7898c1 --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryClientExcel.java @@ -0,0 +1,212 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.distribution.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.logpm.distribution.entity.DistributionDeliveryInfoEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * 配送装车中间表 视图实体类 + * + * @author TJJ + * @since 2023-06-16 + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(18) +public class DistributionDeliveryClientExcel implements Serializable { + private static final long serialVersionUID = 1L; + + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("车次号") + private String trainNumber; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("预约单号") + private String reservationCode; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("运单号") + private String waybillNo; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("商场名称") + private String mallName; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("收货人") + private String consignee; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("收货电话") + private String deliveryPhone; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("收货地址") + private String deliveryAddress; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("收货单位") + private String receivingUnit; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("计划包件数") + private Integer reservationNum; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("计划库存品数") + private Integer reservationStockListNum; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("装车包件数") + private Integer loadedNub; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("装车库存品数") + private Integer inventoryNub; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("签收数") + private Integer receivedQuantity; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("备注") + private String remarks; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("是否加急") + private String isUrgentName; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("备货状态") + private String stockupStatusName; + + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("备货人员") + private String forkliftName; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("出库时间") + private Date outboundDate; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("备货时间") + private Date stockupDate; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("装车状态") + private String loadingStatus; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("签收状态") + private String reservationSigningStatus; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("配送状态") + private String driverSigning; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("文员复核状态") + private String signingStatus; + + + + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryInventoryExcel.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryInventoryExcel.java new file mode 100644 index 000000000..7b4ddf6b7 --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryInventoryExcel.java @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.distribution.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import lombok.Data; + +import java.io.Serializable; + +/** + * 配送装车中间表 视图实体类 + * + * @author TJJ + * @since 2023-06-16 + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(18) +public class DistributionDeliveryInventoryExcel implements Serializable { + private static final long serialVersionUID = 1L; + + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("入库批次号") + private String incomingBatch; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("订单自编号") + private String orderCode; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("商场名称") + private String marketName; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("品牌") + private String brandName; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("物料编码") + private String cargoNumber; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("物料名称") + private String descriptionGoods; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("物料规格") + private String cargoNorms; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("物料单位") + private String cargoUnit; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("计划出库数") + private String plannedQuantity; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("实际出库数") + private String loadingNumber; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("签收数量") + private String signedingNumber; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("备货数量") + private Integer readyStock; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("签收状态") + private String signingStatusName; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("备货状态") + private String stockUpStatusName; + + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryOrderExcel.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryOrderExcel.java new file mode 100644 index 000000000..420df1a36 --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryOrderExcel.java @@ -0,0 +1,163 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.distribution.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 配送装车中间表 视图实体类 + * + * @author TJJ + * @since 2023-06-16 + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(18) +public class DistributionDeliveryOrderExcel implements Serializable { + private static final long serialVersionUID = 1L; + + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("运单号") + private String waybillNumber; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("服务号") + private String serviceNumber; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("订单自编号") + private String orderCode; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("物料名称") + private String materialName; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("包件总数") + private Integer totalNumber; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("在库数量") + private Integer handQuantity; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("计划数量") + private String readyStock; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("以备数量") + private Integer stockupNumber; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("装车数量") + private Integer loadingNumber; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("签收数量") + private String signingNumber; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("订单状态") + private String orderStatusName; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("收货单位") + private String consigneeUnit; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("运单收货人") + private String consigneePerson; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("运单收货地址") + private String consigneeAddress; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("终端收货人") + private String customerName; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("终端收货地址") + private String customerAddress; + + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("终端收货电话") + private String customerTelephone; + + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryPackageExcel.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryPackageExcel.java new file mode 100644 index 000000000..e28ddcc7e --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryPackageExcel.java @@ -0,0 +1,242 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.distribution.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 配送装车中间表 视图实体类 + * + * @author TJJ + * @since 2023-06-16 + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(18) +public class DistributionDeliveryPackageExcel implements Serializable { + private static final long serialVersionUID = 1L; + + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("运单号") + private String waybillNumber; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("服务号") + private String serviceNumber; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("订单自编号") + private String orderCode; + + + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("包条码") + private String orderPackageCode; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("仓库") + private String warehouse; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("发站仓") + private String sendWarehouseName; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("目的仓") + private String acceptWarehouseName; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("入库车次") + private String trainNumber; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("一级品") + private String firsts; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("二级品") + private String second; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("三级品") + private String thirdProduct; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("入库时间") + private Date warehouseEntryTimeEnd; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("当前状态") + private String orderPackageStatusName; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("冻结状态") + private String orderPackageFreezeStatusName; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("上架状态") + private String orderPackageGroundingStatusName; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("备货状态") + private String orderPackageStockupStatusName; + + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("预约状态") + private String orderPackageReservationStatusName; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("装车状态") + private String orderPackageLoadingStatusName; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("包件数量") + private Integer quantity; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("计划数量") + private Integer reservationNum; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("装车数量") + private Integer loadingNub; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("签收数量") + private Integer signingNub; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("装车方式") + private String scanStatus; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("计划装车人") + private String driverName; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("实际装车人") + private String scanUser; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("装车时间") + private String loadingTime; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("签收人") + private String signingUser; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("签收扫描时间") + private String signingTime; + + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.java index b5d07e4f7..934c169bc 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.java @@ -79,7 +79,11 @@ public interface DistributionDeliveryInfoMapper extends BaseMapper selectcustomList(@Param("id") Long id); + List selectClientList(@Param("id") Long id, @Param("param")Map param); + + + List selectClientListByDeliveryId(@Param("id") Long id); /** * 从预约客户查询包条自定义分页 * @param page @@ -111,18 +115,33 @@ public interface DistributionDeliveryInfoMapper extends BaseMapper selectDistributionDeliveryinventoryPage(IPage page,@Param("param") DistributionDeliveryInfoDTO distributionDeliveryInfoDTO); + + /** + * 通过配送Id查询库存 + * + * @return + */ + List selectDistributionDeliveryinventoryByDeliveryId(@Param("deliveryId") Long deliveryId); /** * 通过配送查询订单 * * @return */ List selectDistributionDeliveryOrderPage(IPage page,@Param("param") Map distributionStockArticle); + + + /** + * 通过配送Id查询订单 + * + * @return + */ + List selectDistributionDeliveryOrderPageByDeliveryId(@Param("deliveryId")Long deliveryId); /** * App-通过配送查询客户信息 * * @return */ - List selectAppcustomList( Long id); + List selectAppcustomList(Long id); /** * App-通过客户查询订单 * diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml index 2b5c82d2e..315ce0c24 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml @@ -282,6 +282,44 @@ lds.is_deleted =0 and lddl.id = #{param.deliveryId} + + + + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java index c5d400b04..f87ac952a 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java @@ -124,6 +124,14 @@ public interface DistributionReservationMapper extends BaseMapper getReservationPackage(IPage page,@Param("orderIds") List orderIds,@Param("param")Map param); + /** + * 查询预约单下指定订单包件列表 + * @param orderIds + * @param param + * @return + */ + List getReservationPackageByDeliveryId(@Param("orderIds") List orderIds,@Param("deliveryId")Long deliveryId); + /** * 删除预约单 * @param id diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml index a5843c2d9..3a6b92e9f 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml @@ -799,6 +799,26 @@ + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml index d5ee6af23..21a6b281f 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml @@ -492,9 +492,9 @@