From ee0dc02309dc46e0bb9659461f5bb9944938b054 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Wed, 20 Dec 2023 16:41:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AE=A2=E6=88=B7=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E3=80=81=E5=BA=93=E5=AD=98=E5=93=81=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DistributionDeliveryListController.java | 41 ++++++--- .../DistributionDeliveryInfoMapper.java | 3 +- .../mapper/DistributionDeliveryInfoMapper.xml | 88 ++++++++++++++++++- .../DistributionDeliveryListMapper.java | 2 +- .../mapper/DistributionDeliveryListMapper.xml | 24 +++++ .../mapper/DistributionReservationMapper.xml | 26 +++--- .../IDistributionDeliveryListService.java | 10 ++- .../DistributionDeliveryInfoServiceImpl.java | 2 + .../DistributionDeliveryListServiceImpl.java | 55 ++++++++++-- 9 files changed, 217 insertions(+), 34 deletions(-) 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 4e20870c8..9460e96e1 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 @@ -91,6 +91,32 @@ public class DistributionDeliveryListController extends BladeController { return R.data(pages); } + /** + * 查看订单 + */ + @GetMapping("/clientDetail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "查看配送客户详情列表", notes = "传入distributionDeliveryList") + public R> clientDetail(@RequestParam Map distributionReservationDTO , Query query) { + + IPage pages = distributionDeliveryListService.getClientDetail(Condition.getPage(query), distributionReservationDTO); + return R.data(pages); + } + + + + /** + * 查看订单 + */ + @GetMapping("/order") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "查看订单", notes = "传入distributionDeliveryList") + public R> order(@RequestParam Map distributionStockArticle , Query query) { + IPage pages = distributionDeliveryInfoService.selectDistributionDeliveryorder(Condition.getPage(query), distributionStockArticle); + return R.data(pages); + } + + /** * 查看包件详情 */ @@ -110,8 +136,8 @@ public class DistributionDeliveryListController extends BladeController { @GetMapping("/inventory") @ApiOperationSupport(order = 1) @ApiOperation(value = "查看包件详情", notes = "传入distributionDeliveryList") - public R> inventory(DistributionDeliveryInfoDTO distributionDeliveryInfoDTO, Query query) { - List pages = distributionDeliveryListService.selectDistributionDeliveryinventory(Condition.getPage(query), distributionDeliveryInfoDTO); + public R> inventory(@RequestParam Map distributionInventoryDTO, Query query) { + List pages = distributionDeliveryListService.selectDistributionDeliveryinventory(Condition.getPage(query), distributionInventoryDTO); return R.data(pages); } @@ -127,16 +153,7 @@ public class DistributionDeliveryListController extends BladeController { return R.data(r); } - /** - * 查看订单 - */ - @GetMapping("/order") - @ApiOperationSupport(order = 1) - @ApiOperation(value = "查看订单", notes = "传入distributionDeliveryList") - public R> order(@RequestParam Map distributionStockArticle , Query query) { - IPage pages = distributionDeliveryInfoService.selectDistributionDeliveryorder(Condition.getPage(query), distributionStockArticle); - return R.data(pages); - } + /** 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 93fffee11..7870cc2fa 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 @@ -76,7 +76,8 @@ public interface DistributionDeliveryInfoMapper extends BaseMapper selectcustomList(Long id); + List selectcustomList(@Param("id") Long id); + List selectClientList(@Param("id") Long id, @Param("param")Map param); /** * 从预约客户查询包条自定义分页 * @param page 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 1219d269a..f4463ad16 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 @@ -281,7 +281,7 @@ JOIN logpm_distribution_stock_article ldsa ON ldrs.stock_article_id = ldsa.id JOIN (SELECT - DISTINCT ldpl.stock_article_id,GROUP_CONCAT(ldpl.material_name) AS materialName + DISTINCT ldpl.stock_article_id,GROUP_CONCAT(DISTINCT ldpl.material_name) AS materialName FROM logpm_distribution_parcel_list ldpl JOIN logpm_distribution_reservation_package ldrp ON ldrp.parce_list_id = ldpl.id @@ -557,4 +557,90 @@ FROM WHERE lds.reservation_id = #{reservationId} and lwtg.association_type in ('3') GROUP BY lwtg.tray_id,lds.reservation_id,lwtg.tray_code,lwtg.num,lwtg.association_type + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java index 220e6a43f..621c4a9f1 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java @@ -370,7 +370,7 @@ public interface DistributionDeliveryListMapper extends BaseMapper getInventoryByDeliveryId(IPage page,@Param("deliveryListId") Long deliveryId); + List getInventoryByDeliveryId(IPage page,@Param("deliveryListId") Long deliveryId,@Param("param") Map param); /** * 查询该配送计划下指定收货单位的预约信息 diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml index 9fc377110..971f7f4bc 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml @@ -1420,6 +1420,30 @@ and lds.delivery_id = #{deliveryListId} + + and ldsl.incoming_batch like concat('%',#{param.incomingBatch},'%') + + + and ldsl.order_code like concat('%',#{param.orderCode},'%') + + + and ldsl.market_name like concat('%',#{param.marketName},'%') + + + and ldsl.brand_name like concat('%',#{param.brandName},'%') + + + and ldsl.cargo_number like concat('%',#{param.cargoNumber},'%') + + + and ldsl.description_goods like concat('%',#{param.descriptionGoods},'%') + + + and ldsl.cargo_norms like concat('%',#{param.cargoNorms},'%') + + + and ldsl.cargo_unit like concat('%',#{param.cargoUnit},'%') + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java index 5ddb082d5..fc284c468 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java @@ -219,7 +219,7 @@ public interface IDistributionDeliveryListService extends BaseService selectDistributionDeliveryinventory(IPage page, DistributionDeliveryInfoDTO distributionDeliveryInfoDTO); + List selectDistributionDeliveryinventory(IPage page, Map distributionInventoryDTO); /** * 生成配送的打印模型 @@ -369,6 +369,14 @@ public interface IDistributionDeliveryListService extends BaseService aftersalesPackageScan(Long deliveryId, String scanBarCode); + /** + * 查询配送任务客户列表 + * @param page + * @param distributionReservationDTO + * @return + */ + IPage getClientDetail(IPage page, Map distributionReservationDTO); + /** * 查询签收预约客户包件信息 * @param reservationId diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java index 4eb2f8e1b..cf619db62 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java @@ -434,4 +434,6 @@ public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl parcelNumberVOS = baseMapper.getZeroPackageListByDeliveryId(distributionDeliveryInfoDTO.getDeliveryId()); List deliveryStockArticleInfo = baseMapper.getDeliveryStockArticleInfo(deliveryId); @@ -4540,11 +4540,15 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl selectDistributionDeliveryinventory(IPage page, DistributionDeliveryInfoDTO distributionDeliveryInfoDTO) { - - List distributionStockListEntities = baseMapper.getInventoryByDeliveryId(page, distributionDeliveryInfoDTO.getDeliveryId()); + public List selectDistributionDeliveryinventory(IPage page,Map distributionInventoryDTO) { + if (Func.isEmpty(distributionInventoryDTO.get("deliveryId"))){ + log.info("#####查询配送计划库存品列表deliveryId缺失"); + return null; + } + Long deliveryId = Long.parseLong(distributionInventoryDTO.get("deliveryId").toString()); + List distributionStockListEntities = baseMapper.getInventoryByDeliveryId(page, deliveryId,distributionInventoryDTO); distributionStockListEntities.forEach(rs -> { - List list = distributionLoadscaninvnService.list(Wrappers.query().lambda().eq(DistributionLoadscaninvnEntity::getInventoryId, rs.getStocklistId()).eq(DistributionLoadscaninvnEntity::getReservationId, rs.getReservationId()).eq(DistributionLoadscaninvnEntity::getDeliveryId, distributionDeliveryInfoDTO.getDeliveryId()).ne(DistributionLoadscaninvnEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())); + List list = distributionLoadscaninvnService.list(Wrappers.query().lambda().eq(DistributionLoadscaninvnEntity::getInventoryId, rs.getStocklistId()).eq(DistributionLoadscaninvnEntity::getReservationId, rs.getReservationId()).eq(DistributionLoadscaninvnEntity::getDeliveryId, deliveryId).ne(DistributionLoadscaninvnEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())); rs.setLoadedinNumber(0); if (Func.isNotEmpty(list)) { //存在装车记录 @@ -5981,6 +5985,47 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl getClientDetail(IPage page, Map distributionReservationDTO) { + if (Func.isEmpty(distributionReservationDTO.get("deliveryId"))){ + log.info("############获取客户详情失败,deliveryId为空"); + return null; + } + Long deliveryId = Long.parseLong((String)distributionReservationDTO.get("deliveryId")); + List customList = distributionDeliveryInfoMapper.selectClientList(deliveryId,distributionReservationDTO); + if (!customList.isEmpty()) { + customList.forEach(c -> { + if (Func.isNotEmpty(c.getLoadingStatus())) { + switch (c.getLoadingStatus()) { + case "10": + c.setLoadingStatus(ReservationLoadingStatusConstant.daizhuangche.getName()); + break; + case "20": + c.setLoadingStatus(ReservationLoadingStatusConstant.bufenzhuangche.getName()); + break; + case "30": + c.setLoadingStatus(ReservationLoadingStatusConstant.yizhuangche.getName()); + break; + } + } + if (Func.isNotEmpty(c.getReservationSigningStatus())) { + switch (c.getReservationSigningStatus()) { + case "10": + c.setReservationSigningStatus(ReservationSigningStatusConstant.daiqianshou.getName()); + break; + case "20": + c.setReservationSigningStatus(ReservationSigningStatusConstant.bufenqianshou.getName()); + break; + case "30": + c.setReservationSigningStatus(ReservationSigningStatusConstant.yiqianshou.getName()); + break; + } + } + }); + } + return page.setRecords(customList); + } + public Map getDriverCar(String kind, Long deliveryListEntityId) { Map map = new HashMap<>();