diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSigndetailVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSigndetailVO.java index 4e12484f6..42adbdc00 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSigndetailVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSigndetailVO.java @@ -38,6 +38,11 @@ public class DistributionSigndetailVO extends DistributionSigndetailEntity { */ @ApiModelProperty(value = "客户名称") private String consignee; + /** + * 配送类型 + */ + @ApiModelProperty(value = "配送类型") + private String serveType; /** * 客户Id */ @@ -58,6 +63,11 @@ public class DistributionSigndetailVO extends DistributionSigndetailEntity { */ @ApiModelProperty(value = "服务号") private String serviceNumber; + /** + * 门店名称 + */ + @ApiModelProperty(value = "门店名称") + private String storeName; /** * 配送类型 */ diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java index aaedc946d..c453c7da6 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java @@ -16,7 +16,6 @@ */ package com.logpm.distribution.vo; -import com.logpm.distribution.entity.DistributionSignPrintEntity; import com.logpm.distribution.entity.DistributionSignforEntity; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -34,12 +33,26 @@ import java.util.List; @EqualsAndHashCode(callSuper = true) public class DistributionSignforVO extends DistributionSignforEntity { private static final long serialVersionUID = 1L; + /** * 门店名称 */ @ApiModelProperty(value = "门店名称") private String storeName; + private List ids; + /** + * 仓库名称 + */ + @ApiModelProperty(value = "仓库名称") + private String warehouseName; + + /** + * 门店名称 + */ + @ApiModelProperty(value = "服务类型") + private String serveType; + /** * 配送单号 */ @@ -95,6 +108,11 @@ public class DistributionSignforVO extends DistributionSignforEntity { */ @ApiModelProperty(value = "备注") private String remarks; +/** + * 备注 + */ + @ApiModelProperty(value = "订单自编号") + private String orderCode; /** * 是否加急 diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSigndetailController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSigndetailController.java index dee0aed5c..b29b19fc5 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSigndetailController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSigndetailController.java @@ -16,7 +16,6 @@ */ package com.logpm.distribution.controller; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.logpm.distribution.dto.DistributionDeliveryInfoDTO; @@ -41,7 +40,6 @@ import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.secure.BladeUser; import org.springblade.core.tool.api.R; -import org.springblade.core.tool.constant.BladeConstant; import org.springblade.core.tool.utils.BeanUtil; import org.springblade.core.tool.utils.DateUtil; import org.springblade.core.tool.utils.Func; @@ -186,12 +184,13 @@ public class DistributionSigndetailController extends BladeController { @ApiOperationSupport(order = 9) @ApiOperation(value = "导出数据", notes = "传入distributionSigndetail") public void exportDistributionSigndetail(@ApiIgnore @RequestParam Map distributionSigndetail, BladeUser bladeUser, HttpServletResponse response) { - QueryWrapper queryWrapper = Condition.getQueryWrapper(distributionSigndetail, DistributionSigndetailEntity.class); - //if (!AuthUtil.isAdministrator()) { - // queryWrapper.lambda().eq(DistributionSigndetail::getTenantId, bladeUser.getTenantId()); - //} - queryWrapper.lambda().eq(DistributionSigndetailEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); - List list = distributionSigndetailService.exportDistributionSigndetail(queryWrapper); +// QueryWrapper queryWrapper = Condition.getQueryWrapper(distributionSigndetail, DistributionSigndetailEntity.class); +// //if (!AuthUtil.isAdministrator()) { +// // queryWrapper.lambda().eq(DistributionSigndetail::getTenantId, bladeUser.getTenantId()); +// //} +// queryWrapper.lambda().eq(DistributionSigndetailEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); + + List list = distributionSigndetailService.exportDistributionSigndetail(distributionSigndetail); ExcelUtil.export(response, "签收明细数据" + DateUtil.time(), "签收明细数据表", list, DistributionSigndetailExcel.class); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java index bffd7e65b..7c47ba584 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java @@ -25,6 +25,7 @@ import com.logpm.distribution.dto.DistributionSignforDTO; import com.logpm.distribution.entity.DistributionSignPrintEntity; import com.logpm.distribution.entity.DistributionSignforEntity; import com.logpm.distribution.excel.DistributionSignforExcel; +import com.logpm.distribution.excel.DistributionSignforOwnExcel; import com.logpm.distribution.service.IDistributionReservationService; import com.logpm.distribution.service.IDistributionSignforService; import com.logpm.distribution.vo.*; @@ -33,6 +34,7 @@ import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.apache.poi.ss.formula.functions.T; import org.springblade.common.utils.GaoDeApiUtil; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.excel.util.ExcelUtil; @@ -281,7 +283,7 @@ public class DistributionSignforController extends BladeController { /** - * 导出数据 + * 待 导出数据 */ @GetMapping("/export-distributionSignfor") @ApiOperationSupport(order = 9) @@ -289,7 +291,17 @@ public class DistributionSignforController extends BladeController { public void exportDistributionSignfor(@ApiIgnore @RequestParam Map distributionSignfor, BladeUser bladeUser, HttpServletResponse response) { List list = distributionSignforService.exportDistributionSignfor(distributionSignfor); - ExcelUtil.export(response, "签收管理数据" + DateUtil.time(), "签收管理数据表", list, DistributionSignforExcel.class); + ExcelUtil.export(response, "签收管理数据" + DateUtil.time(), "待签收管理数据表", list, DistributionSignforExcel.class); + } + /** + * 已 导出数据 + */ + @GetMapping("/export-distributionSignforOwn") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "导出数据", notes = "传入distributionSignfor") + public void exportDistributionSignforOwn(@ApiIgnore @RequestParam Map distributionSignfor, BladeUser bladeUser, HttpServletResponse response) { + List list = distributionSignforService.exportDistributionSignforOwn(distributionSignfor); + ExcelUtil.export(response, "签收管理数据" + DateUtil.time(), "已签收管理数据表", list, DistributionSignforOwnExcel.class); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionSigndetailDTO.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionSigndetailDTO.java index 557ed25ad..8b56384a7 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionSigndetailDTO.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionSigndetailDTO.java @@ -21,6 +21,8 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; +import java.util.List; + /** * 签收明细 数据传输对象实体类 * @@ -36,6 +38,12 @@ public class DistributionSigndetailDTO extends DistributionSigndetailEntity { */ @ApiModelProperty(value = "客户名称") private String consignee; + + /** + * 客户名称 + */ + @ApiModelProperty(value = "客户名称") + private List ids; /** * 客户Id */ diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionSigndetailExcel.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionSigndetailExcel.java index 260ef023f..8ffd90351 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionSigndetailExcel.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionSigndetailExcel.java @@ -21,6 +21,7 @@ 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 io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @@ -41,132 +42,90 @@ public class DistributionSigndetailExcel implements Serializable { private static final long serialVersionUID = 1L; - /** - * 租户号 - */ - @ColumnWidth(20) - @ExcelProperty("租户号") - private String tenantId; - /** - * 是否已删除 - */ - @ColumnWidth(20) - @ExcelProperty("是否已删除") - private Integer isDeleted; - /** - * 预留1 - */ - @ColumnWidth(20) - @ExcelProperty("预留1") - private String reserve1; - /** - * 预留2 - */ - @ColumnWidth(20) - @ExcelProperty("预留2") - private String reserve2; - /** - * 预留3 - */ - @ColumnWidth(20) - @ExcelProperty("预留3") - private String reserve3; - /** - * 预留4 - */ - @ColumnWidth(20) - @ExcelProperty("预留4") - private String reserve4; - /** - * 预留5 - */ - @ColumnWidth(20) - @ExcelProperty("预留5") - private String reserve5; - /** - * 签收表id - */ - @ColumnWidth(20) - @ExcelProperty("签收表id") - private Integer masterId; /** * 服务号 */ @ColumnWidth(20) @ExcelProperty("服务号") private String serviceNumber; - /** - * 配送/自提单号 - */ - @ColumnWidth(20) - @ExcelProperty("配送/自提单号") - private String deliveryNumber; + /** * 配送车次号 */ @ColumnWidth(20) @ExcelProperty("配送车次号") private String trainNumber; + /** - * 服务类型 + * 配送/自提单号 */ @ColumnWidth(20) - @ExcelProperty("服务类型") - private String serveType; + @ExcelProperty("配送类型") + private String deliveryNumber; + /** - * 订单自编号 + * 订单自提单号 */ @ColumnWidth(20) @ExcelProperty("订单自编号") - private String orderId; + private String orderCode; /** * 商城名称 */ @ColumnWidth(20) @ExcelProperty("商城名称") private String mallName; - /** - * 货物名称 - */ - @ColumnWidth(20) - @ExcelProperty("货物名称") - private String goodsName; /** * 仓库 */ @ColumnWidth(20) @ExcelProperty("仓库") - private String warehouse; + private String warehouseName; + /** * 入库时间 */ @ColumnWidth(20) @ExcelProperty("入库时间") - private Date warehousingTime; + private String warehouseEntryTime; + /** - * 备货时间 + * 司机签收时间 */ @ColumnWidth(20) - @ExcelProperty("备货时间") - private Date leadTime; + @ExcelProperty("司机签收时间") + private String sjsigningTime; + /** + * 文员签收时间 + */ + @ColumnWidth(20) + @ExcelProperty("文员签收时间") + private String signingTime; + + /** * 在库时长;(天) */ @ColumnWidth(20) - @ExcelProperty("在库时长;(天)") - private Integer durationInStock; + @ExcelProperty("在库时长(天)") + private String storeTime; + + /** - * 签收件数 + * 订单总件数 */ + @ApiModelProperty(value = "订单总件数") @ColumnWidth(20) - @ExcelProperty("签收件数") - private Integer signedNumber; + @ExcelProperty("订单总件数") + private Integer totalNumber; + + /** - * 是否齐套 + * 签收件数 */ @ColumnWidth(20) - @ExcelProperty("是否齐套") - private String isKitting; + @ExcelProperty("签收件数") + private Integer signfornum; /** * 品牌 */ @@ -174,4 +133,71 @@ public class DistributionSigndetailExcel implements Serializable { @ExcelProperty("品牌") private String brand; + /** + * 服务类型 + */ + @ColumnWidth(20) + @ExcelProperty("顾客名称") + private String consignee; + /** + * 服务类型 + */ + @ColumnWidth(20) + @ExcelProperty("客户电话") + private String deliveryPhone; + + /** + * 服务类型 + */ + @ColumnWidth(20) + @ExcelProperty("客户地址") + private String deliveryAddress; + + + + +// /** +// * 配送/自提单号 +// */ +// @ColumnWidth(20) +// @ExcelProperty("配送/自提单号") +// private String deliveryNumber; +// +// /** +// * 服务类型 +// */ +// @ColumnWidth(20) +// @ExcelProperty("服务类型") +// private String serveType; +// +// +// /** +// * 货物名称 +// */ +// @ColumnWidth(20) +// @ExcelProperty("货物名称") +// private String goodsName; +// /** +// * 仓库 +// */ +// @ColumnWidth(20) +// @ExcelProperty("仓库") +// private String warehouse; +// +// /** +// * 备货时间 +// */ +// @ColumnWidth(20) +// @ExcelProperty("备货时间") +// private Date leadTime; +// +// +// /** +// * 是否齐套 +// */ +// @ColumnWidth(20) +// @ExcelProperty("是否齐套") +// private String isKitting; + + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionSignforExcel.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionSignforExcel.java index 3601d99ce..0e7d331af 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionSignforExcel.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionSignforExcel.java @@ -42,24 +42,36 @@ public class DistributionSignforExcel implements Serializable { private static final long serialVersionUID = 1L; + /** + * 配送车次 + */ + @ColumnWidth(20) + @ExcelProperty("配送车次") + private String trainNumber; /** * 订单自编号;订单关联id */ @ColumnWidth(20) - @ExcelProperty("订单自编号;订单关联id") - private String orderId; + @ExcelProperty("订单自编号") + private String orderCode; /** * 预约关联Id;预约关联id */ @ColumnWidth(20) - @ExcelProperty("预约关联Id;预约关联id") - private Long reservationId; + @ExcelProperty("服务类型") + private String deliveryTypeName; /** * 收货人 */ @ColumnWidth(20) - @ExcelProperty("收货人") + @ExcelProperty("客户名称") private String consignee; + /** + * 收货人 + */ + @ColumnWidth(20) + @ExcelProperty("客户电话") + private String deliveryPhone; /** * 收货地址 */ @@ -67,35 +79,49 @@ public class DistributionSignforExcel implements Serializable { @ExcelProperty("收货地址") private String deliveryAddress; /** - * 服务类型 + * 配送仓库 */ @ColumnWidth(20) - @ExcelProperty("服务类型") - private String serveType; + @ExcelProperty("配送仓库") + private String warehouseName; /** * 配送仓库 */ @ColumnWidth(20) - @ExcelProperty("配送仓库") - private String distributingWarehouse; + @ExcelProperty("商城名称") + private String mallName; /** - * 配送车次 + * 配送仓库 */ @ColumnWidth(20) - @ExcelProperty("配送车次") - private String trainNumber; + @ExcelProperty("门店名称") + private String storeName; /** - * 订单总数 + * 服务类型 + */ + @ColumnWidth(20) + @ExcelProperty("配送服务类型") + private String deliveryWayName; + /** + * 服务类型 */ @ColumnWidth(20) - @ExcelProperty("订单总数") - private Integer orderTotal; + @ExcelProperty("装车时间") + private String deliveryTime; + + /** - * 总件数 + * 订单总数 */ @ColumnWidth(20) - @ExcelProperty("总件数") - private Integer total; + @ExcelProperty("配送件数") + private Integer reservationNum; +// /** +// * 总件数 +// */ +// @ColumnWidth(20) +// @ExcelProperty("总件数") +// private Integer orderTotal; /** * 装车件数 */ @@ -108,65 +134,65 @@ public class DistributionSignforExcel implements Serializable { @ColumnWidth(20) @ExcelProperty("签收数") private Integer receivedQuantity; - /** - * 送货司机 - */ - @ColumnWidth(20) - @ExcelProperty("送货司机") - private String deliveryDriver; - /** - * 送货司机手机号 - */ - @ColumnWidth(20) - @ExcelProperty("送货司机手机号") - private String deliveryDriverPhone; +// /** +// * 送货司机 +// */ +// @ColumnWidth(20) +// @ExcelProperty("送货司机") +// private String deliveryDriver; +// /** +// * 送货司机手机号 +// */ +// @ColumnWidth(20) +// @ExcelProperty("送货司机手机号") +// private String deliveryDriverPhone; /** * 签收时间 */ @ColumnWidth(20) @ExcelProperty("签收时间") - private Date signingTime; - /** - * 签收人 - */ - @ColumnWidth(20) - @ExcelProperty("签收人") - private String signee; + private Date sjsigningTime; +// /** +// * 签收人 +// */ +// @ColumnWidth(20) +// @ExcelProperty("签收人") +// private String signee; /** * 签收状态;1-未签收,2-司机签收,3-文员签收 */ @ColumnWidth(20) - @ExcelProperty("签收状态;1-未签收,2-司机签收,3-文员签收") - private String signingStatus; + @ExcelProperty("司机签收状态") + private String driverSigningName; /** * 签收类型;1-签收,2-代签收 */ @ColumnWidth(20) - @ExcelProperty("签收类型;1-签收,2-代签收") - private String signingType; - /** - * 文员复核图片 - */ - @ColumnWidth(20) - @ExcelProperty("文员复核图片") - private String clerkSignPictures; - /** - * 司机签收图片 - */ - @ColumnWidth(20) - @ExcelProperty("司机签收图片") - private String deliverySignPictures; - /** - * 服务号 - */ - @ColumnWidth(20) - @ExcelProperty("服务号") - private String serviceNumber; - /** - * 备注 - */ - @ColumnWidth(20) - @ExcelProperty("备注") - private String notes; + @ExcelProperty("文员审核状态") + private String signingStatusName; +// /** +// * 文员复核图片 +// */ +// @ColumnWidth(20) +// @ExcelProperty("文员复核图片") +// private String clerkSignPictures; +// /** +// * 司机签收图片 +// */ +// @ColumnWidth(20) +// @ExcelProperty("司机签收图片") +// private String deliverySignPictures; +// /** +// * 服务号 +// */ +// @ColumnWidth(20) +// @ExcelProperty("服务号") +// private String serviceNumber; +// /** +// * 备注 +// */ +// @ColumnWidth(20) +// @ExcelProperty("备注") +// private String notes; } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionSignforOwnExcel.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionSignforOwnExcel.java new file mode 100644 index 000000000..b18ae17bf --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionSignforOwnExcel.java @@ -0,0 +1,419 @@ +/* + * 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 io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + + +/** + * 签收管理 Excel实体类 + * + * @author lmy + * @since 2023-06-13 + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(18) +public class DistributionSignforOwnExcel implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 配送车次 + */ + @ApiModelProperty(value = "配送车次") + @ColumnWidth(20) + @ExcelProperty("配送车次") + private String trainNumber; + + /** + * 订单自编号;订单关联id + */ + @ColumnWidth(20) + @ExcelProperty("订单自编号") + private String orderCode; + + /** + * 配送仓库(名称) + */ + @ApiModelProperty(value = "配送仓库(名称)") + @ColumnWidth(20) + @ExcelProperty("配送仓库") + private String warehouseName; + + /** + * 收货人 + */ + @ColumnWidth(20) + @ExcelProperty("客户名称") + private String consignee; + /** + * 收货人 + */ + @ColumnWidth(20) + @ExcelProperty("客户电话") + private String deliveryPhone; + /** + * 收货地址 + */ + @ColumnWidth(20) + @ExcelProperty("收货地址") + private String deliveryAddress; + + /** + * 配送类型 + */ + @ApiModelProperty(value = "配送类型;1-商配、2-市配") + @ColumnWidth(20) + @ExcelProperty("配送类型") + private String deliveryTypeName; + + /** + * 门店名称 + */ + @ColumnWidth(20) + @ExcelProperty("服务类型") + private String deliveryWayName; + + /** + * 总件数 + */ + @ApiModelProperty(value = "总件数") + @ColumnWidth(20) + @ExcelProperty("总件数") + private Integer reservationNum; + + /** + * 装车件数 + */ + @ApiModelProperty(value = "装车件数") + @ColumnWidth(20) + @ExcelProperty("装车件数") + private Integer loadedNumber; + + /** + * 签收数 + */ + @ApiModelProperty(value = "签收数") + @ColumnWidth(20) + @ExcelProperty("签收数") + private Integer receivedQuantity; + + /** + * 装车未扫数 + */ + @ApiModelProperty(value = "装车未扫数") + @ColumnWidth(20) + @ExcelProperty("装车未扫数") + private String withoutScanning; + + /** + * 未签收数目 + */ + @ApiModelProperty(value = "未签收数目") + @ColumnWidth(20) + @ExcelProperty("未签收数目") + private String unsigneds; + + /** + * 送货司机(名称) + */ + @ApiModelProperty(value = "送货司机(名称)") + @ColumnWidth(20) + @ExcelProperty("送货司机") + private String deliveryDriverName; + + /** + * 送货司机手机号 + */ + @ApiModelProperty(value = "送货司机手机号") + @ColumnWidth(20) + @ExcelProperty("送货司机手机号") + private String deliveryDriverPhone; + + /** + * 文员签收时间 + */ + @ApiModelProperty(value = "签收时间") + @ColumnWidth(20) + @ExcelProperty("签收时间") + private String signingTime; + + /** + * 司机签收时间 + */ + @ApiModelProperty(value = "司机签收时间") + @ColumnWidth(20) + @ExcelProperty("司机签收时间") + private String sjsigningTime; + + /** + * 签收人(名称) + */ + @ApiModelProperty(value = "签收人(名称)") + @ColumnWidth(20) + @ExcelProperty("签收人") + private String signeeName; + + + /** + * 文员签收状态;1-未签收,2-签收 + */ + @ApiModelProperty(value = "文员签收状态;1-未签收,2-签收") + @ColumnWidth(20) + @ExcelProperty("文员签收状态") + private String signingStatusName; + + /** + * 司机签收状态;1-未签收,2-签收 + */ + @ApiModelProperty(value = "司机签收状态;1-未签收,2-签收") + @ColumnWidth(20) + @ExcelProperty("司机签收状态") + private String driverSigningName; + + + + + + +// /** +// * 服务类型 +// */ +// @ApiModelProperty(value = "预约服务类型;1-上楼、2-超区、3-拆样、4-平移、5-分拣、6-搬运、7-返货;") +// @ColumnWidth(20) +// @ExcelProperty("预约服务类型") +// private String deliveryWay; +// +// /** +// * 商城名称 +// */ +// @ApiModelProperty(value = "商城名称") +// @ColumnWidth(20) +// @ExcelProperty("商城名称") +// private String mallName; +// +// +// +// /** +// * 订单总数 +// */ +// @ApiModelProperty(value = "订单总数") +// @ColumnWidth(20) +// @ExcelProperty("订单总数") +// private Integer orderTotal; +// +// +// /** +// * 签收类型;1-签收,2-代签收 +// */ +// @ApiModelProperty(value = "签收类型;1-签收,2-代签收") +// @ColumnWidth(20) +// @ExcelProperty("签收类型") +// private String signingType; +// /** +// * 服务号 +// */ +// @ApiModelProperty(value = "服务号") +// @ColumnWidth(20) +// @ExcelProperty("服务号") +// private String serviceNumber; +// /** +// * 司机备注 +// */ +// @ApiModelProperty(value = "司机备注") +// @ColumnWidth(20) +// @ExcelProperty("司机备注") +// private String driverRemarks; +// /** +// * 文员备注 +// */ +// @ApiModelProperty(value = "文员备注") +// @ColumnWidth(20) +// @ExcelProperty("文员备注") +// private String clerkSignRemarks; +// +// /** +// * 送货车辆(值) +// */ +// @ApiModelProperty(value = "送货车辆(值)") +// @ColumnWidth(20) +// @ExcelProperty("送货车辆") +// private String deliveryVehicleName; +// +// /** +// * 编号 +// */ +// @ApiModelProperty(value = "编号") +// @ColumnWidth(20) +// @ExcelProperty("编号") +// private String number; +// +// /** +// * 配送单号 +// */ +// @ApiModelProperty(value = "配送单号") +// @ColumnWidth(20) +// @ExcelProperty("配送单号") +// private String noteNumber; +// +// +// /** +// * 配送时间 +// */ +// @ApiModelProperty(value = "配送时间") +// @ColumnWidth(20) +// @ExcelProperty("配送时间") +// private String deliveryTime; +// /** +// * 装车时间 +// */ +// @ApiModelProperty(value = "装车时间") +// @ColumnWidth(20) +// @ExcelProperty("装车时间") +// private String loadingTime; +// +// /** +// * 定位打卡 +// */ +// @ApiModelProperty(value = "定位打卡") +// @ColumnWidth(20) +// @ExcelProperty("定位打卡") +// private String positioning; +// /** +// * 定位打卡地址 +// */ +// @ApiModelProperty(value = "定位打卡地址") +// @ColumnWidth(20) +// @ExcelProperty("定位打卡地址") +// private String positioningAdr; +// +// +// +// /** +// * 预约关联Id;预约关联id +// */ +// @ColumnWidth(20) +// @ExcelProperty("服务类型") +// private String deliveryTypeName; +// +// +// +// /** +// * 配送仓库 +// */ +// @ColumnWidth(20) +// @ExcelProperty("门店名称") +// private String storeName; +// /** +// * 服务类型 +// */ +// @ColumnWidth(20) +// @ExcelProperty("配送服务类型") +// private String deliveryWayName; +// +// /** +// * 签收状态;1-未签收,2-司机签收,3-文员签收 +// */ +// @ColumnWidth(20) +// @ExcelProperty("司机签收状态") +// private String driverSigningName; +// /** +// * 签收类型;1-签收,2-代签收 +// */ +// @ColumnWidth(20) +// @ExcelProperty("文员审核状态") +// private String signingStatusName; +// +// +// /** +// * 门店名称 +// */ +// @ColumnWidth(20) +// @ExcelProperty("服务类型") +// private String serveType; +// +// /** +// * 配送单号 +// */ +// @ApiModelProperty(value = "配送单号") +// @ColumnWidth(20) +// @ExcelProperty("服务类型") +// private String reservationCode; +// /** +// * 预约时间 +// */ +// @ApiModelProperty(value = "预约时间") +// @ColumnWidth(20) +// @ExcelProperty("服务类型") +// private String reservationDate; +// +// +// /** +// * 签收状态 +// */ +// @ApiModelProperty(value = "签收状态") +// @ColumnWidth(20) +// @ExcelProperty("签收状态") +// private String signingStatusAll; +// +// +// /** +// * 备注 +// */ +// @ColumnWidth(20) +// @ExcelProperty("备注") +// private String remarks; +// +// +// /** +// * 是否加急 +// */ +// @ColumnWidth(20) +// @ExcelProperty("是否加急") +// private String isUrgent; +// +// /** +// * 配送车牌号 +// */ +// @ColumnWidth(20) +// @ExcelProperty("配送车牌号") +// private String vehicleName; +// +// /** +// * 配送司机 +// */ +// @ColumnWidth(20) +// @ExcelProperty("配送司机") +// private String driverName; + + + + + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSigndetailMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSigndetailMapper.java index b7e9bb3dd..b7799b6b6 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSigndetailMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSigndetailMapper.java @@ -16,7 +16,6 @@ */ package com.logpm.distribution.mapper; -import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.logpm.distribution.dto.DistributionDeliveryInfoDTO; @@ -53,7 +52,7 @@ public interface DistributionSigndetailMapper extends BaseMapper exportDistributionSigndetail(@Param("ew") Wrapper queryWrapper); + List exportDistributionSigndetailOwn(@Param("param") DistributionSigndetailDTO queryWrapper); DistributionSigndetailVO selectVOById(Long id); /** diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSigndetailMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSigndetailMapper.xml index 3e37843aa..3d3b4e861 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSigndetailMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSigndetailMapper.xml @@ -194,6 +194,94 @@ + SELECT * FROM logpm_distribution_signfor ${ew.customSqlSegment} + @@ -933,4 +972,102 @@ + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSigndetailService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSigndetailService.java index dc7fda432..7865b4453 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSigndetailService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSigndetailService.java @@ -27,6 +27,7 @@ import com.logpm.distribution.vo.DistributionSigndetailVO; import org.springblade.core.mp.base.BaseService; import java.util.List; +import java.util.Map; /** * 签收明细 服务类 @@ -48,10 +49,9 @@ public interface IDistributionSigndetailService extends BaseService exportDistributionSigndetail(Wrapper queryWrapper); + List exportDistributionSigndetail(Map distributionSigndetail); /** * 自定义查询详情 * diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java index b1984739e..bd0b2f3b0 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java @@ -25,11 +25,13 @@ import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO; import com.logpm.distribution.entity.DistributionSignPrintEntity; import com.logpm.distribution.entity.DistributionSignforEntity; import com.logpm.distribution.excel.DistributionSignforExcel; +import com.logpm.distribution.excel.DistributionSignforOwnExcel; import com.logpm.distribution.vo.*; import com.logpm.distribution.vo.app.DistributionAppDeliveryListVO; import com.logpm.distribution.vo.app.DistributionAppParcelListVO; import com.logpm.distribution.vo.app.DistributionAppSignforVO; import com.logpm.distribution.vo.app.DistributionAppStockArticleVO; +import org.apache.poi.ss.formula.functions.T; import org.springblade.core.mp.base.BaseService; import org.springblade.core.tool.api.R; @@ -59,6 +61,12 @@ public interface IDistributionSignforService extends BaseService exportDistributionSignfor(Map distributionSignfor); + /** + * 导出数据 + * + * @param distributionSignfor@return + */ + List exportDistributionSignforOwn(Map distributionSignfor); /** * 签收订单统计 * diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSigndetailServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSigndetailServiceImpl.java index a231385b3..d003ce6fc 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSigndetailServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSigndetailServiceImpl.java @@ -16,8 +16,10 @@ */ package com.logpm.distribution.service.impl; -import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.logpm.distribution.dto.DistributionDeliveryInfoDTO; import com.logpm.distribution.dto.DistributionSigndetailDTO; import com.logpm.distribution.entity.DistributionSigndetailEntity; @@ -27,11 +29,17 @@ import com.logpm.distribution.service.IDistributionSigndetailService; import com.logpm.distribution.vo.DistributionDeliveryInfoVO; import com.logpm.distribution.vo.DistributionSigndetailVO; import lombok.extern.slf4j.Slf4j; +import org.springblade.common.constant.DictBizConstant; import org.springblade.core.mp.base.BaseServiceImpl; +import org.springblade.system.cache.DictBizCache; +import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import java.util.Map; /** * 签收明细 服务实现类 @@ -55,12 +63,35 @@ public class DistributionSigndetailServiceImpl extends BaseServiceImpl exportDistributionSigndetail(Wrapper queryWrapper) { - List distributionSigndetailList = baseMapper.exportDistributionSigndetail(queryWrapper); - //distributionSigndetailList.forEach(distributionSigndetail -> { - // distributionSigndetail.setTypeName(DictCache.getValue(DictEnum.YES_NO, DistributionSigndetail.getType())); - //}); - return distributionSigndetailList; + public List exportDistributionSigndetail(Map distributionSigndetail) { + + Object o = distributionSigndetail.get("ids"); + if(ObjectUtils.isNotNull(o)){ + distributionSigndetail.remove("ids"); + } + + DistributionSigndetailDTO distributionSigndetailDTO = JSONObject.parseObject(JSON.toJSONString(distributionSigndetail), DistributionSigndetailDTO.class); + + if(ObjectUtils.isNotNull(o)){ + String id= (String) o; + String[] split = id.split(","); + distributionSigndetailDTO.setIds(Arrays.asList(split)); + } + + List distributionSigndetailList = baseMapper.exportDistributionSigndetailOwn(distributionSigndetailDTO); + List list = new ArrayList<>(); + distributionSigndetailList.forEach(d -> { +// distributionSigndetail.setTypeName(DictCache.getValue(DictEnum.YES_NO, DistributionSigndetail.getType())); + DistributionSigndetailExcel signdetailExcel = new DistributionSigndetailExcel(); + BeanUtils.copyProperties(d,signdetailExcel); + + String value = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_TYPE, d.getServeType()); + signdetailExcel.setDeliveryNumber(value); + + + list.add(signdetailExcel); + }); + return list; } @Override diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java index 9dd9557c4..b5fb4b4db 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java @@ -16,6 +16,7 @@ */ package com.logpm.distribution.service.impl; +import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; @@ -31,6 +32,7 @@ import com.logpm.distribution.dto.*; import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO; import com.logpm.distribution.entity.*; import com.logpm.distribution.excel.DistributionSignforExcel; +import com.logpm.distribution.excel.DistributionSignforOwnExcel; import com.logpm.distribution.mapper.*; import com.logpm.distribution.service.*; import com.logpm.distribution.vo.*; @@ -42,6 +44,8 @@ import com.logpm.distribution.wrapper.DistributionStockArticleWrapper; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.StringUtils; +import org.apache.poi.ss.formula.functions.T; +import org.springblade.common.constant.DictBizConstant; import org.springblade.common.constant.DistributionTypeConstant; import org.springblade.common.constant.Inventory.InventoryLoadingStatusConstant; import org.springblade.common.constant.Inventory.InventorySigningStatusConstant; @@ -54,14 +58,12 @@ import org.springblade.common.constant.reservation.*; import org.springblade.common.constant.signing.SignforDriverSigningStatusConstant; import org.springblade.common.serviceConstant.ServiceConstant; import org.springblade.common.utils.GaoDeApiUtil; -import org.springblade.core.log.exception.ServiceException; import org.springblade.core.mp.base.BaseServiceImpl; -import org.springblade.core.mp.support.Condition; import org.springblade.core.secure.BladeUser; import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; -import org.springblade.core.tool.constant.BladeConstant; import org.springblade.core.tool.utils.Func; +import org.springblade.system.cache.DictBizCache; import org.springblade.system.feign.IDictBizClient; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; @@ -154,32 +156,87 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl exportDistributionSignfor(Map distributionSignfor) { - Object o = distributionSignfor.get("ids"); if(ObjectUtils.isNotNull(o)){ distributionSignfor.remove("ids"); } - BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); - if(ObjectUtils.isNull()){ - throw new ServiceException("请选择仓库!"); - } - - QueryWrapper queryWrapper = Condition.getQueryWrapper(distributionSignfor, DistributionSignforEntity.class); - queryWrapper.lambda().eq(DistributionSignforEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); +// BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); +// if(ObjectUtils.isNull()){ +// throw new ServiceException("请选择仓库!"); +// } +// QueryWrapper queryWrapper = Condition.getQueryWrapper(distributionSignfor, DistributionSignforEntity.class); +// queryWrapper.lambda().eq(DistributionSignforEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); +// if(ObjectUtils.isNotNull(o)){ +// queryWrapper.in("id",String.valueOf(o).split(",")); +// } +// queryWrapper.eq("warehouse_id",myCurrentWarehouse.getId()); + DistributionSignforVO distributionSignforVO = JSON.parseObject(JSON.toJSONString(distributionSignfor), DistributionSignforVO.class); if(ObjectUtils.isNotNull(o)){ - queryWrapper.in("id",String.valueOf(o).split(",")); + String id= (String) o; + String[] split = id.split(","); + distributionSignforVO.setIds(Arrays.asList(split)); } - queryWrapper.eq("warehouse_id",myCurrentWarehouse.getId()); - List distributionSignforList = baseMapper.exportDistributionSignfor(queryWrapper); + List distributionSignforList = baseMapper.exportDistributionSignforOwn(distributionSignforVO); List list = new ArrayList<>(); distributionSignforList.forEach(d -> { // distributionSignfor.setTypeName(DictCache.getValue(DictEnum.YES_NO, DistributionSignfor.getType())); - DistributionSignforExcel signforExcel = new DistributionSignforExcel(); - BeanUtils.copyProperties(d,signforExcel); + DistributionSignforExcel signforExcel = new DistributionSignforExcel(); + BeanUtils.copyProperties(d,signforExcel); // signforExcel.setConsignee(); - list.add(signforExcel); - }); - return list; + String value = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_TYPE, d.getDeliveryType()); + signforExcel.setDeliveryTypeName(value); + String value1 = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_SIGNFOR_STATUS, d.getSigningStatus()); + signforExcel.setSigningStatusName(value1); + String value2 = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_SIGNFOR_STATUS, d.getDriverSigning()); + signforExcel.setDriverSigningName(value2); + String value3 = DictBizCache.getValue(DictBizConstant.ADD_VALUE_SERVE_TYPE, d.getServeType()); + signforExcel.setDeliveryWayName(value3); + list.add(signforExcel); + }); + return list; + } + @Override + public List exportDistributionSignforOwn(Map distributionSignfor) { + + Object o = distributionSignfor.get("ids"); + if(ObjectUtils.isNotNull(o)){ + distributionSignfor.remove("ids"); + } +// BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); +// if(ObjectUtils.isNull()){ +// throw new ServiceException("请选择仓库!"); +// } +// QueryWrapper queryWrapper = Condition.getQueryWrapper(distributionSignfor, DistributionSignforEntity.class); +// queryWrapper.lambda().eq(DistributionSignforEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); +// if(ObjectUtils.isNotNull(o)){ +// queryWrapper.in("id",String.valueOf(o).split(",")); +// } +// queryWrapper.eq("warehouse_id",myCurrentWarehouse.getId()); + DistributionSignforVO distributionSignforVO = JSON.parseObject(JSON.toJSONString(distributionSignfor), DistributionSignforVO.class); + if(ObjectUtils.isNotNull(o)){ + String id= (String) o; + String[] split = id.split(","); + distributionSignforVO.setIds(Arrays.asList(split)); + } + + List distributionSignforList = baseMapper.exportDistributionSignforSigningOwn(distributionSignforVO); + + List list = new ArrayList<>(); + distributionSignforList.forEach(d ->{ + DistributionSignforOwnExcel signforExcel = new DistributionSignforOwnExcel(); + BeanUtils.copyProperties(d,signforExcel); + String value = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_TYPE, d.getDeliveryType()); + signforExcel.setDeliveryTypeName(value); + String value1 = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_SIGNFOR_STATUS, d.getSigningStatus()); + signforExcel.setSigningStatusName(value1); + String value2 = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_SIGNFOR_STATUS, d.getDriverSigning()); + signforExcel.setDriverSigningName(value2); + String value3 = DictBizCache.getValue(DictBizConstant.ADD_VALUE_SERVE_TYPE, d.getServeType()); + signforExcel.setDeliveryWayName(value3); + + list.add(signforExcel); + }); + return list; } @Override