From b4566579e84d6db83e96f393ec1216bc69cf84b6 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Mon, 2 Sep 2024 14:36:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A3=85=E8=BD=A6=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DistributionDeliveryAppController.java | 18 +++ .../dto/app/DistrilbutionloadingscanDTO.java | 2 +- .../DistributionDeliveryListMapper.java | 7 ++ .../mapper/DistributionDeliveryListMapper.xml | 16 +++ .../IDistributionDeliveryListService.java | 8 ++ .../DistributionDeliveryListServiceImpl.java | 105 +++++++++++++++--- 6 files changed, 142 insertions(+), 14 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionDeliveryAppController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionDeliveryAppController.java index 3724ef108..0eafb8cca 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionDeliveryAppController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionDeliveryAppController.java @@ -196,7 +196,25 @@ public class DistributionDeliveryAppController { msg = R.fail(e.getMessage()); log.error(e.getMessage()); } + return msg; + } + + /** + * 配送管理 装车扫描 + */ + @PostMapping("/newLoadingscan") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "装车扫描", notes = "传入DistrilbutionloadingscanDTO") + public R newLoadingscan(@Valid @RequestBody DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) { + R msg = null; + try{ + msg = distributionDeliveryListService.newLoadingscan(distrilbutionloadingscanDTO); + + }catch (Exception e){ + msg = R.fail(e.getMessage()); + log.error(e.getMessage()); + } return msg; } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/DistrilbutionloadingscanDTO.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/DistrilbutionloadingscanDTO.java index 1ec1cb490..371ca313a 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/DistrilbutionloadingscanDTO.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/DistrilbutionloadingscanDTO.java @@ -90,7 +90,7 @@ public class DistrilbutionloadingscanDTO { /** * 扫描物品 */ - @ApiModelProperty(value = "扫描物品(1-包条,2-托盘,3-订单)") + @ApiModelProperty(value = "扫描物品(1-包条,2-零担,3-库存品,4-托盘)") // @NotEmpty(message = "扫描物品不能为空") private Integer 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 bb3aa9a24..5cb77e4f8 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 @@ -545,4 +545,11 @@ public interface DistributionDeliveryListMapper extends BaseMapper selectDeliveryZeroOrderInfoDetail(Long id, Long id1); + + /** + * 查询计划中的包件信息 + * @param orderPackageCode + * @param deliveryId + */ + Long selectPackageByorderPackageCodeAndDeliveryId(@Param("orderPackageCode")String orderPackageCode,@Param("deliveryId") Long deliveryId,@Param("warehouseId") Long warehouseId); } 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 f904b076f..deafb6908 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 @@ -2577,5 +2577,21 @@ AND ldrs.stock_article_status in ('1','3') AND ldrzp.zero_package_status IN ( '1', '3' ) + 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 499d00146..ba5679e08 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 @@ -501,6 +501,14 @@ public interface IDistributionDeliveryListService extends BaseService list = disStockListDetailService.list(Wrappers.query().lambda() + .eq(DisStockListDetailEntity::getStockPackageCode, distrilbutionloadingscanDTO.getBarcode()) + .ne(DisStockListDetailEntity::getStockPackageStatus, ReservationPackageStatusConstant.quxiao.getValue()) + ); + if (list.isEmpty()){ + return Resp.scanFail("请在库存品页面扫描此码", "请在库存品页面扫描此码"); + } else { + return Resp.scanFail("系统无编码", "系统无编码"); + } + + if (OrderPackageLoadingStatusConstant.yizhuangche.getValue().equals(parcelListEntity.getOrderPackageLoadingStatus())){ + return Resp.scanFail("此包件已装车", "此包件已装车"); + } + //再次校验是否装车 + + + //查询是否满足计划 以及计划在哪个客户中 + Long reservationId = baseMapper.selectPackageByorderPackageCodeAndDeliveryId(orderPackageCode,deliveryId,warehouseId); + if (Objects.isNull(reservationId)){ + //判定是否满足异常装车 + } + //正常进行装车 + + + + } + break; + } + + + + return null; + } + private List handleAppDeliveryInventory(DistributionAppDeliveryListDTO distributionAppDeliveryListDTO, BasicdataWarehouseEntity myCurrentWarehouse) { List distributionAppStockListVOS = new ArrayList<>(); List disStockListDetailEntities = baseMapper.selectInventoryListByDeliveryListId(distributionAppDeliveryListDTO.getId());