From 3399f0be3a5a8199eefd6fc412bf63f72a40b05c Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Fri, 26 Apr 2024 11:33:52 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=B9=B2=E7=BA=BF-=E4=B8=89=E6=96=B9?= =?UTF-8?q?=E4=B8=AD=E8=BD=ACbug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feign/IDistributionParcelListClient.java | 3 ++ .../com/logpm/trunkline/dto/LoadCarsDTO.java | 3 ++ .../trunkline/vo/CarsLoadWaybillInfoVO.java | 2 + .../feign/DistributionParcelListClient.java | 11 ++++ .../mapper/DistributionParcelListMapper.java | 4 ++ .../mapper/DistributionParcelListMapper.xml | 33 ++++++++++++ .../IDistributionParcelListService.java | 4 ++ .../DistributionParcelListServiceImpl.java | 10 ++++ .../TripartiteTransferController.java | 53 +++++++++++++++++++ .../mapper/TrunklineCarsLoadMapper.xml | 8 +++ .../mapper/TrunklineCarsOrderMapper.xml | 2 + .../service/ITrunklineCarsLoadService.java | 5 ++ .../impl/TrunklineCarsLoadServiceImpl.java | 34 +++++++++++- .../impl/WarehouseWaybillServiceImpl.java | 14 ++--- 14 files changed, 178 insertions(+), 8 deletions(-) diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java index 6d2a83f2a..7fa78ee59 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java @@ -149,4 +149,7 @@ public interface IDistributionParcelListClient { @GetMapping(API_PREFIX+"/findAllStockListByOrderPackageCode") List findAllStockListByOrderPackageCode(String orderPackageCode); + + @PostMapping(API_PREFIX+"/updatePackageStatus") + void updatePackageStatus(@RequestParam List orderPackageCodes, @RequestParam Long warehouseId, @RequestParam String packageStatus); } diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java index cb7d3e6ec..a4832855f 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java @@ -120,4 +120,7 @@ public class LoadCarsDTO implements Serializable { private List signPhotoList; + + private Integer isTransfer = 0; + } diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadWaybillInfoVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadWaybillInfoVO.java index b4093b94a..dfbe37d83 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadWaybillInfoVO.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadWaybillInfoVO.java @@ -22,6 +22,8 @@ public class CarsLoadWaybillInfoVO implements Serializable { private Integer waybillNum; private String openPrice; private String goodsName; + private String waybillType; + private Long waybillId; private String remark; private BigDecimal totalFreight; private BigDecimal deliveryFee; diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java index 43bc2bd48..c87380cab 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java @@ -320,4 +320,15 @@ public class DistributionParcelListClient implements IDistributionParcelListClie return distributionParcelListService.list(queryWrapper); } + + @Override + public void updatePackageStatus(List orderPackageCodes, Long warehouseId, String packageStatus) { + distributionParcelListService.updatePackageStatus(orderPackageCodes,warehouseId,packageStatus); + + List list = distributionParcelListService.findListByOrderPackageCode(orderPackageCodes,warehouseId); + //循环list调用更新updateOrderInfo方法 + list.forEach(item->{ + distributionStockArticleService.updateOrderInfo(item.getOrderCode(),warehouseId); + }); + } } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java index 63ac1720d..f7eded8b2 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java @@ -259,4 +259,8 @@ public interface DistributionParcelListMapper extends BaseMapper类型的集合,包含匹配的包裹列表实体。 */ List findListByIds(@Param("parcelListIds") Set parcelListIds, @Param("warehouseId") Long warehouseId); + + void updatePackageStatus(@Param("orderPackageCodes") List orderPackageCodes, @Param("warehouseId") Long warehouseId, @Param("packageStatus") String packageStatus); + + List findListByOrderPackageCode(@Param("orderPackageCodes") List orderPackageCodes, @Param("warehouseId") Long warehouseId); } 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 ddea1baad..6055799e7 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 @@ -1457,4 +1457,37 @@ and warehouse_id = #{warehouseId} + + + update logpm_distribution_parcel_list ldpl + set ldpl.order_package_status = #{packageStatus} + where exists( + select 1 from ( + + + select #{item} pid + + + union all + select #{item} pid + + + ) packageCodes where packageCodes.pid = ldpl.order_package_code) + and ldpl.warehouse_id = #{warehouseId} + + + + + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java index 34f94c2cb..de27bd71b 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java @@ -219,4 +219,8 @@ public interface IDistributionParcelListService extends BaseService类型的集合,包含匹配的包裹列表实体。 */ List findListByIds(Set parcelListIds, Long warehouseId); + + void updatePackageStatus(List orderPackageCodes, Long warehouseId, String packageStatus); + + List findListByOrderPackageCode(List orderPackageCodes, Long warehouseId); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java index 13a364939..76bce1852 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java @@ -1215,4 +1215,14 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl orderPackageCodes, Long warehouseId, String packageStatus) { + baseMapper.updatePackageStatus(orderPackageCodes,warehouseId,packageStatus); + } + + @Override + public List findListByOrderPackageCode(List orderPackageCodes, Long warehouseId) { + return baseMapper.findListByOrderPackageCode(orderPackageCodes,warehouseId); + } + } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/TripartiteTransferController.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/TripartiteTransferController.java index 123aedc44..d14caf8e9 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/TripartiteTransferController.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/TripartiteTransferController.java @@ -468,6 +468,59 @@ public class TripartiteTransferController { } } + @ResponseBody + @PostMapping("/tripartiteTransferFindSignPhoto") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "三方中转签收图片列表", notes = "传入loadCarsDTO") + public R tripartiteTransferFindSignPhoto(@RequestBody LoadCarsDTO loadCarsDTO) { + String method = "############tripartiteTransferFindSignPhoto: "; + log.info(method+"请求参数{}",loadCarsDTO); + try{ + +// //当前登录人选择的仓库 +// BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); +// if(!Objects.isNull(myCurrentWarehouse)){ +// loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId()); +// } +// +// IPage pages = carsLoadService.tripartiteTransferPageList(loadCarsDTO); + + return carsLoadService.tripartiteTransferFindSignPhoto(loadCarsDTO); + }catch (CustomerException e){ + log.error(e.message,e); + return R.fail(e.code,e.message); + }catch (Exception e){ + log.error(method+"系统异常",e); + return R.fail(500,"系统异常"); + } + } + + @ResponseBody + @PostMapping("/tripartiteTransferUploadSignPhoto") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "三方中转签收图片上传", notes = "传入loadCarsDTO") + public R tripartiteTransferUploadSignPhoto(@RequestBody LoadCarsDTO loadCarsDTO) { + String method = "############tripartiteTransferUploadSignPhoto: "; + log.info(method+"请求参数{}",loadCarsDTO); + try{ + +// //当前登录人选择的仓库 +// BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); +// if(!Objects.isNull(myCurrentWarehouse)){ +// loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId()); +// } +// +// IPage pages = carsLoadService.tripartiteTransferPageList(loadCarsDTO); + + return carsLoadService.tripartiteTransferUploadSignPhoto(loadCarsDTO); + }catch (CustomerException e){ + log.error(e.message,e); + return R.fail(e.code,e.message); + }catch (Exception e){ + log.error(method+"系统异常",e); + return R.fail(500,"系统异常"); + } + } } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml index f9313a4ed..3aacc3207 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml @@ -154,6 +154,7 @@ left join logpm_distribution_parcel_list ldpl on ldsa.order_code = ldpl.order_code where ldpl.is_deleted = 0 and ldpl.order_package_status = '20' + and and ldpl.is_deleted = 0 and ldpl.is_transfer = 1 and ldpl.waybill_number is not null @@ -173,6 +174,13 @@ and ldsa.warehouse_id = #{param.warehouseId} and ldpl.warehouse_id = #{param.warehouseId} + + and ldpl.accept_warehouse_id = #{param.warehouseId} + and ldsa.type_service = '4' + + + and ldsa.type_service != '4' + group by ldpl.order_code, ldpl.waybill_number, ldsa.is_zero, diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml index 946a30e3c..a36f50728 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml @@ -104,6 +104,8 @@