From ea4ccc2aa4d948860b50b7af1c83cf4d471d0fbf Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Fri, 19 Jul 2024 16:45:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=B2=E7=AD=BE=E8=AE=A2=E5=8D=95BUG?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DistributionBillLadingScanEntity.java | 3 + .../vo/DistributionParcelListVO.java | 5 + .../DistributionStockArticleController.java | 2 +- .../excel/DistributionParcelListExcel.java | 4 + .../mapper/DistributionParcelListMapper.xml | 49 +++- .../DistributionStockArticleMapper.java | 7 + .../mapper/DistributionStockArticleMapper.xml | 270 ++++++++++++++++++ .../IDistributionStockArticleService.java | 3 +- .../DistributionStockArticleServiceImpl.java | 6 +- 9 files changed, 336 insertions(+), 13 deletions(-) diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionBillLadingScanEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionBillLadingScanEntity.java index 5972804bd..08ba96970 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionBillLadingScanEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionBillLadingScanEntity.java @@ -75,4 +75,7 @@ public class DistributionBillLadingScanEntity extends BaseEntity { @ApiModelProperty(value = "扫描操作人") private String scanUser; + @ApiModelProperty(value = "签收方式1 扫描签收 2PDA批量操作 3文员PC操作") + private Integer signforType; + } diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java index 9aa7df879..de4564721 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java @@ -126,6 +126,11 @@ public class DistributionParcelListVO extends DistributionParcelListEntity { */ private Integer loadingNub; + /** + * 装车数量 + */ + private Integer signforType; + /** * 签收数量 */ diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java index b62225f01..0b70c73f9 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java @@ -637,7 +637,7 @@ public class DistributionStockArticleController extends BladeController { @ApiOperationSupport(order = 2) @ApiOperation(value = "已签收订单 导出", notes = "传入distributionStockArticle") public void exportSignforDistributionStockArticleList(@ApiIgnore @RequestParam Map distributionStockArticle, Query query, HttpServletResponse response) { - List list = distributionStockArticleService.exportSignforDistributionStockArticleList(distributionStockArticle, Condition.getPage(query)); + List list = distributionStockArticleService.exportSignforDistributionStockArticleList(distributionStockArticle); ExcelUtil.export(response, "在库订单明细" + DateUtil.time(), "在库订单明细", list, DistributionSignForStockArticleExcel.class); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionParcelListExcel.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionParcelListExcel.java index 2b20f17b1..b3840aa25 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionParcelListExcel.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionParcelListExcel.java @@ -123,6 +123,10 @@ public class DistributionParcelListExcel implements Serializable { @ExcelProperty("实际签收人") private String signingUser; + @ColumnWidth(20) + @ExcelProperty("签收方式") + private String signingType; + @ColumnWidth(20) @ExcelProperty("车次号") private String trainNumber; diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml index be84bce3c..78c93bb8e 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml @@ -89,6 +89,7 @@ ldpl.waybill_number waybillNumber, ldsa.type_service typeService, ldpl.order_code, + IF(c.signfor_type IS NOT NULL, c.signfor_type, IF ( b.signfor_type IS NOT NULL, b.pickup_batch, a.signfor_type )) AS signforType, IF(c.reservation_code is not null,c.reservation_code,IF(b.pickup_batch is not null,b.pickup_batch,a.reservation_code)) AS reservationCode, IF(c.driver_name is not null,c.driver_name,IF(b.consignee is not null,b.consignee,a.driver_name)) AS driverName, IF(c.vehicle_name is not null,c.vehicle_name,IF(b.pick_up_plate is not null,b.pick_up_plate,a.vehicle_name)) AS vehicleName, @@ -117,7 +118,12 @@ ldl.signing_time, ldl.scan_user, ldl.signing_user, - ldr.reservation_code + ldr.reservation_code, + CASE ldl.signfor_type + WHEN 1 THEN '扫描签收' + WHEN 2 THEN '司机批量' + WHEN 3 THEN '文员签收' + END signfor_type FROM logpm_distribution_reservation_package ldrp LEFT JOIN logpm_distribution_loadscan ldl on ldl.package_id = ldrp.parce_list_id and ldl.scan_status !=1 AND ldl.is_deleted = 0 LEFT JOIN logpm_distribution_reservation ldr on ldr.id = ldrp.reservation_id @@ -164,7 +170,12 @@ ldbls.create_time AS scan_time, ldbls.create_time AS signing_time, ldbls.scan_user AS scan_user, - ldbls.scan_user AS signing_user + ldbls.scan_user AS signing_user, + CASE ldbls.signfor_type + WHEN 1 THEN '扫描签收' + WHEN 2 THEN '司机批量' + WHEN 3 THEN '文员签收' + END signfor_type FROM logpm_distrilbution_bill_package AS ldbp LEFT JOIN logpm_distrilbution_bill_lading ldbl ON ldbl.id = ldbp.bill_lading_id @@ -207,7 +218,12 @@ IF(ldl.scan_time is not null,ldl.scan_time,ldbls.create_time) AS scan_time, IF(ldl.scan_user is not null,ldl.scan_user,ldbls.scan_user) AS scan_user, IF(ldl.signing_user is not null,ldl.signing_user,ldbls.scan_user) AS signing_user, - IF(ldr.reservation_code is not null,ldr.reservation_code,ldbl.pickup_batch) AS reservation_code + IF(ldr.reservation_code is not null,ldr.reservation_code,ldbl.pickup_batch) AS reservation_code, + CASE ldl.signfor_type + WHEN 1 THEN '扫描签收' + WHEN 2 THEN '司机批量' + WHEN 3 THEN '文员签收' + END signfor_type FROM logpm_distribution_reservation_zero_package ldrzp LEFT JOIN logpm_distribution_loadscan ldl on ldl.package_id = ldrzp.parcel_list_id and ldl.scan_status !=1 AND ldl.is_deleted = 0 LEFT JOIN logpm_distribution_reservation ldr on ldr.id = ldrzp.reservation_id @@ -215,6 +231,9 @@ LEFT JOIN logpm_distribution_delivery_list lddl on lds.delivery_id =lddl.id LEFT JOIN logpm_distrilbution_bill_lading ldbl ON ldrzp.reservation_id = ldbl.id LEFT JOIN logpm_distribution_bill_lading_scan ldbls ON ldbls.parcel_list_id = ldrzp.parcel_list_id + + ldrzp.zero_package_status != 2 + ) AS c ON c.parcel_list_id = ldpl.id ldpl.is_deleted = 0 @@ -639,7 +658,7 @@ ldpl.send_warehouse_name, ldpl.accept_warehouse_id, ldpl.accept_warehouse_name, ldpl.order_package_delivery_status, ldpl.pallet pallet, - ldpl.goods_allocation goodsAllocation + ldpl.goods_allocation goodsAllocation From logpm_distribution_parcel_list ldpl ldpl.conditions in ('1','3') @@ -912,6 +931,7 @@ ldpl.waybill_number waybillNumber, ldsa.type_service typeService, ldpl.order_code, + IF(c.signfor_type IS NOT NULL,c.signfor_type,IF(b.signfor_type IS NOT NULL, b.pickup_batch, a.signfor_type )) AS signforType, IF(c.reservation_code is not null,c.reservation_code,IF(b.pickup_batch is not null,b.pickup_batch,a.reservation_code)) AS reservationCode, IF(c.driver_name is not null,c.driver_name,IF(b.consignee is not null,b.consignee,a.driver_name)) AS driverName, IF(c.vehicle_name is not null,c.vehicle_name,IF(b.pick_up_plate is not null,b.pick_up_plate,a.vehicle_name)) AS vehicleName, @@ -940,7 +960,12 @@ ldl.signing_time, ldl.scan_user, ldl.signing_user, - ldr.reservation_code + ldr.reservation_code, + CASE ldl.signfor_type + WHEN 1 THEN '扫描签收' + WHEN 2 THEN '司机批量' + WHEN 3 THEN '文员签收' + END signfor_type FROM logpm_distribution_reservation_package ldrp LEFT JOIN logpm_distribution_loadscan ldl on ldl.package_id = ldrp.parce_list_id and ldl.scan_status !=1 AND ldl.is_deleted = 0 LEFT JOIN logpm_distribution_reservation ldr on ldr.id = ldrp.reservation_id @@ -987,7 +1012,12 @@ ldbls.create_time AS scan_time, ldbls.create_time AS signing_time, ldbls.scan_user AS scan_user, - ldbls.scan_user AS signing_user + ldbls.scan_user AS signing_user, + CASE ldbls.signfor_type + WHEN 1 THEN '扫描签收' + WHEN 2 THEN '司机批量' + WHEN 3 THEN '文员签收' + END signfor_type FROM logpm_distrilbution_bill_package AS ldbp LEFT JOIN logpm_distrilbution_bill_lading ldbl ON ldbl.id = ldbp.bill_lading_id @@ -1030,7 +1060,12 @@ IF(ldl.scan_time is not null,ldl.scan_time,ldbls.create_time) AS scan_time, IF(ldl.scan_user is not null,ldl.scan_user,ldbls.scan_user) AS scan_user, IF(ldl.signing_user is not null,ldl.signing_user,ldbls.scan_user) AS signing_user, - IF(ldr.reservation_code is not null,ldr.reservation_code,ldbl.pickup_batch) AS reservation_code + IF(ldr.reservation_code is not null,ldr.reservation_code,ldbl.pickup_batch) AS reservation_code, + CASE ldl.signfor_type + WHEN 1 THEN '扫描签收' + WHEN 2 THEN '司机批量' + WHEN 3 THEN '文员签收' + END signfor_type FROM logpm_distribution_reservation_zero_package ldrzp LEFT JOIN logpm_distribution_loadscan ldl on ldl.package_id = ldrzp.parcel_list_id and ldl.scan_status !=1 AND ldl.is_deleted = 0 LEFT JOIN logpm_distribution_reservation ldr on ldr.id = ldrzp.reservation_id diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java index cad6a2b4d..77503e785 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java @@ -192,6 +192,13 @@ public interface DistributionStockArticleMapper extends BaseMapper pageSignforListOwe(IPage page,@Param("param") DistributionStockArticleOweDTO stockArticleEntity,@Param("collect") List warehouseIdList); + /** + * 查询签收订单信息 + * @param stockArticleEntity + * @return + */ + List listSignforListOwe(@Param("param") DistributionStockArticleOweDTO stockArticleEntity,@Param("collect") List warehouseIdList); + void updateAllOrderTotalNum(@Param("orderCode") String orderCode, @Param("total") Integer total); List> selectAdvance(@Param("orderCode")String orderCode); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml index 5951d024f..71e22f46f 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml @@ -1178,6 +1178,253 @@ from logpm_distribution_stock_article ldsa where ldsa.id = #{orderId} + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java index 78726f34c..14fc6be32 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java @@ -270,10 +270,9 @@ public interface IDistributionStockArticleService extends BaseService exportSignforDistributionStockArticleList(Map distributionStockArticle, IPage page); + List exportSignforDistributionStockArticleList(Map distributionStockArticle); /** * 维护指定订单的商场信息 diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java index bb2efa666..32f79b0ba 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java @@ -2651,7 +2651,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl exportSignforDistributionStockArticleList(Map distributionStockArticle, IPage page) { + public List exportSignforDistributionStockArticleList(Map distributionStockArticle) { DistributionStockArticleOweDTO stockArticleEntity = JSONObject.parseObject(JSONObject.toJSONString(distributionStockArticle), DistributionStockArticleOweDTO.class); if (Func.isNotEmpty(distributionStockArticle.get("typeServer"))) { stockArticleEntity.setTypeService((String) distributionStockArticle.get("typeServer")); @@ -2703,10 +2703,10 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl distributionStockArticleEntityIPage = baseMapper.pageSignforListOwe(page, stockArticleEntity,warehouseIdList); + List list = baseMapper.listSignforListOwe(stockArticleEntity,warehouseIdList); //处理创建人 List signForStockArticleExcels = new ArrayList<>(); - distributionStockArticleEntityIPage.getRecords().forEach(a -> { + list.forEach(a -> { if (Func.isNotEmpty(a.getCreateUser())) { R userR = userClient.userInfoById(a.getCreateUser()); a.setCreateUserName(userR.getData().getName());