From 5346f411be675175aca76a0867746aa8c69b0ec1 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Wed, 3 Jul 2024 17:55:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E6=93=8D=E4=BD=9C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=A9=B3=E5=9B=9E=E5=88=A4=E6=96=AD=E3=80=81=E5=B7=B2?= =?UTF-8?q?=E7=AD=BE=E8=AE=A2=E5=8D=95=E6=97=A5=E5=BF=97=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DistributionStockArticleController.java | 10 +++- .../DistributionDeliveryListMapper.java | 5 +- .../IDistributionDeliveryListService.java | 4 +- .../DistributionDeliveryListServiceImpl.java | 32 ++++++++++- .../impl/DistributionSignforServiceImpl.java | 56 ++++++++++++------- 5 files changed, 77 insertions(+), 30 deletions(-) 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 4ed2594f9..17ea78f67 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 @@ -596,8 +596,14 @@ public class DistributionStockArticleController extends BladeController { @ApiOperationSupport(order = 2) @ApiOperation(value = "已签收订单", notes = "传入distributionStockArticle") public R> signforList(@ApiIgnore @RequestParam Map distributionStockArticle, Query query) { - IPage pages = distributionStockArticleService.pageSignforListtOwe(Condition.getPage(query), distributionStockArticle); - return R.data(pages); + try { + IPage pages = distributionStockArticleService.pageSignforListtOwe(Condition.getPage(query), distributionStockArticle); + return R.data(pages); + + }catch (Exception e){ + log.error("已签订单错误e:{}",e); + } + return R.data(null); } 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 fd18e7c51..dc34bd8bd 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 @@ -16,11 +16,9 @@ */ package com.logpm.distribution.mapper; -import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; -import com.logpm.distribution.dto.DistributionDeliveryInfoDTO; import com.logpm.distribution.dto.DistributionDeliveryListDTO; import com.logpm.distribution.dto.DistributionLoadingNumDTO; import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO; @@ -496,8 +494,9 @@ public interface DistributionDeliveryListMapper extends BaseMapper>>>当前车次:{},其他车次:{}", distributionDeliveryListEntity.getTrainNumber(), collect); return Resp.scanFail("包件已在其他车次存在异常", "包件已在其他车次存在异常"); + }else { + //这里需要判定文员是否对该异常进行驳回操作 + List collect = abnormalEntities.stream().filter(f -> distributionDeliveryListEntity.getId().equals(f.getDeliveryListId()) && distrilbutionloadingscanDTO.getReservationId().equals(f.getReservationId())).collect(Collectors.toList()); + if (!collect.isEmpty()) { + //存在异常操作 + if (collect.size() == 1){ + //判断是否进行审核以及驳货操作 + DistributionLoadscanAbnormalEntity distributionLoadscanAbnormalEntity = collect.get(0); + if (distributionLoadscanAbnormalEntity.getAuditingStatus().equals(3)){ + return Resp.scanFail("包件异常已驳回", "包件异常已驳回"); + } + } + } } } @@ -5879,14 +5892,21 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl retentionScanVos = new ArrayList<>(); + //查询包件 + BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); + if (Func.isEmpty(myCurrentWarehouse)){ + return Resp.scanFail("未授权!!!","未授权!!!"); + } switch (retentionType) { case 1: //包件--库存品 和包件 List loadscanEntityList = distributionLoadscanService.list(Wrappers.query().lambda() - .eq(DistributionLoadscanEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId()) .eq(DistributionLoadscanEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode()) .ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()) ); @@ -5896,6 +5916,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl>>>>>>>>>>>>>>>>>>>>>>reservationId:{},packageCode:{}", distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getOrderPackageCode()); return Resp.scanFail("包件已签收", "包件已签收"); @@ -5905,7 +5929,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl loadscaninvnEntityList = distributionLoadscaninvnService.list(Wrappers.query().lambda() - .eq(DistributionLoadscaninvnEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId()) .eq(DistributionLoadscaninvnEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode()) .ne(DistributionLoadscaninvnEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()) ); @@ -5953,7 +5976,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl>>>当前车次:{},其他车次:{}",deliveryListEntity.getTrainNumber(),info); return Resp.scanFail("包件已在其他车次存在异常", "包件已在其他车次存在异常"); + }else { + //这里需要判定文员是否对该异常进行驳回操作 + List LoadscanAbnormalEntityList = abnormalEntities.stream().filter(f -> deliveryListEntity.getId().equals(f.getDeliveryListId()) && distrilbutionloadingscanDTO.getReservationId().equals(f.getReservationId())).collect(Collectors.toList()); + if (!LoadscanAbnormalEntityList.isEmpty()) { + //存在异常操作 + if (LoadscanAbnormalEntityList.size() == 1){ + //判断是否进行审核以及驳货操作 + DistributionLoadscanAbnormalEntity distributionLoadscanAbnormalEntity = LoadscanAbnormalEntityList.get(0); + if (distributionLoadscanAbnormalEntity.getAuditingStatus().equals(3)){ + return Resp.scanFail("包件异常已驳回", "包件异常已驳回"); + } + } + } } //判断具体的装车信息 } @@ -6521,28 +6534,32 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl