From 5cf141be1598a898c3155e0be9b31c629e0597a1 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Wed, 16 Oct 2024 18:47:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E5=B7=A5=E5=8D=95BUG?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E3=80=81=E4=BB=93=E5=BA=93=E9=85=8D=E7=BD=AE?= =?UTF-8?q?BUG=E4=BF=AE=E5=A4=8D=E3=80=81PC=E7=AD=BE=E6=94=B6=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E7=8A=B6=E6=80=81=E7=BB=B4=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../excel/AftersalesWorkOrderExcel.java | 10 +- .../AftersalesCompletionRecordMapper.java | 2 +- .../AftersalesCompletionRecordMapper.xml | 5 - .../mapper/AftersalesWorkOrderMapper.xml | 15 +- .../IAftersalesCompletionRecordService.java | 2 +- ...AftersalesCompletionRecordServiceImpl.java | 4 +- .../impl/AftersalesWorkOrderServiceImpl.java | 2 +- .../DistributionReservationController.java | 1 - .../DistributionDeliveryListServiceImpl.java | 6 +- .../DistributionReservationServiceImpl.java | 3 +- .../impl/DistributionSignforServiceImpl.java | 3 +- .../DistrilbutionBillLadingServiceImpl.java | 130 ++++-------------- .../impl/WarehouseConfigServiceImpl.java | 6 +- 13 files changed, 61 insertions(+), 128 deletions(-) diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/excel/AftersalesWorkOrderExcel.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/excel/AftersalesWorkOrderExcel.java index 53f62e955..15b1889c4 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/excel/AftersalesWorkOrderExcel.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/excel/AftersalesWorkOrderExcel.java @@ -174,8 +174,14 @@ public class AftersalesWorkOrderExcel implements Serializable { * 异常问题描述 */ @ColumnWidth(20) - @ExcelProperty("异常问题描述") - private String problemDescription; + @ExcelProperty("调查经过") + private String investigationProcess; +// /** +// * 异常问题描述 +// */ +// @ColumnWidth(20) +// @ExcelProperty("异常问题描述") +// private String problemDescription; /** * 审核人 */ diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesCompletionRecordMapper.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesCompletionRecordMapper.java index 4faaa6d96..6816fc219 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesCompletionRecordMapper.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesCompletionRecordMapper.java @@ -52,5 +52,5 @@ public interface AftersalesCompletionRecordMapper extends BaseMapper exportAftersalesCompletionRecord(@Param("ew") Wrapper queryWrapper); - String getTotalMoney(@Param("param") AftersalesWorkOrderVO aftersalesWorkOrderVO, @Param("warehouseId") Long id); + String getTotalMoney(@Param("param") AftersalesWorkOrderVO aftersalesWorkOrderVO); } diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesCompletionRecordMapper.xml b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesCompletionRecordMapper.xml index e89c32155..dfeeef183 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesCompletionRecordMapper.xml +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesCompletionRecordMapper.xml @@ -41,11 +41,6 @@ and work_order_id = #{param.id} - - and warehouse_id = #{warehouseId} - - - diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml index 42b91cd6c..3e3bde05d 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml @@ -87,6 +87,7 @@ lawo.process_number, lawo.customer_service_name customerServiceName, lawo.warehouse_id warehouseId, + lawo.investigation_process investigationProcess, lawo.customer_service_id customerServiceId FROM logpm_aftersales_work_order lawo @@ -195,8 +196,9 @@ lawo.waybill_number, lawo.order_code, lawo.train_number, - lawo.FIRST, - lawo.secondary, + GROUP_CONCAT(DISTINCT laap.`first`) AS first, + GROUP_CONCAT(DISTINCT laap.secondary) AS secondary, + GROUP_CONCAT(DISTINCT laap.brand_name) AS brandName, lawo.vehicle_route, lawo.deliver_goods_time, lawo.discovery_time, @@ -219,17 +221,18 @@ lawo.process_number, lawo.customer_service_name customerServiceName, lawo.warehouse_id warehouseId, - lawo.brand_name brandName, + lawo.investigation_process investigationProcess, lawo.customer_service_id customerServiceId FROM logpm_aftersales_work_order lawo LEFT JOIN logpm_aftersales_processor lap ON lawo.id = lap.work_order_id - AND lap.types_of = '2' - AND lap.conditions IN ( 1, 2 ) LEFT JOIN logpm_aftersales_completion_record lacr ON lacr.work_order_id = lawo.id - AND lacr.is_deleted = '0' + LEFT JOIN logpm_aftersales_abnormal_package AS laap ON laap.work_order_id = lawo.id lawo.is_deleted = 0 + AND lap.types_of = '2' + AND lap.conditions IN ( 1, 2 ) + AND lacr.is_deleted = '0' and lawo.id IN diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesCompletionRecordService.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesCompletionRecordService.java index 30648845f..14750ac3d 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesCompletionRecordService.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesCompletionRecordService.java @@ -53,5 +53,5 @@ public interface IAftersalesCompletionRecordService extends BaseService aftersalesCompletionRecipientEntities = collect.get(workOrder.getId()); if(ObjectUtils.isNotNull(aftersalesCompletionRecipientEntities)){ diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java index 8fb48bcd0..18112794f 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java @@ -180,7 +180,6 @@ public class DistributionReservationController extends BladeController { public R autonomouslySave(@Valid @RequestBody DistributionReservationDTO distributionReservationDTO) { try{ R result = reservationService.insertAutonomouslyReservation(distributionReservationDTO); - return result; }catch (Exception e){ return R.fail(e.getMessage()); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java index dd2d1d79c..fe4d365ce 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java @@ -4189,7 +4189,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl deletedList = oldList.stream().filter(f -> !newList.stream().map(DistributionReservationEntity::getId).collect(Collectors.toList()).contains(f.getId())).collect(Collectors.toList()); if (!deletedList.isEmpty()) { //存在取消 - for (DistributionReservationEntity reservationEntity : addNewList) { + for (DistributionReservationEntity reservationEntity : deletedList) { String reservationContent = user.getNickName() + "在" + myCurrentWarehouse.getName() + "进行预约计划取消转配送;预约计划:" + reservationEntity.getReservationCode() + "车次号:" + deliveryListEntity.getTrainNumber(); @@ -4208,7 +4208,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl[" + newList.stream().map(DistributionReservationEntity::getReservationCode).collect(Collectors.joining(",")) + "]"; + + "预约编号:[" + oldList.stream().map(DistributionReservationEntity::getReservationCode).collect(Collectors.joining(",")) + "]变更为-->[" + newList.stream().map(DistributionReservationEntity::getReservationCode).collect(Collectors.joining(",")) + "]"+"当前总件数:"+(newList.stream().mapToInt(DistributionReservationEntity::getReservationNum).sum()+newList.stream().mapToInt(DistributionReservationEntity::getReservationStockListNum).sum()); DistributionPlanLogEntity distributionPlanLogEntity = new DistributionPlanLogEntity(); distributionPlanLogEntity.setContent(distributionContent); distributionPlanLogEntity.setRefId(deliveryListEntity.getId()); @@ -4216,7 +4216,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildNodeFanoutMsgByReservation(reservationEntity,map,BizOperationEnums.ADD); - distributionNodeWorkService.planReservation(nodeFanoutMsg,AuthUtil.getUser()); + handleCreatedReservationPlanLog(reservationEntity,user,myCurrentWarehouse); return R.status(true); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java index f2aa4756d..c31539104 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java @@ -3478,7 +3478,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl jsonObjects = updateBillPackeg(distrilbutionBillLading, myCurrentWarehouse, billLadingEntity.getPickupBatch()); if (!jsonObjects.isEmpty()) { logs.addAll(jsonObjects); @@ -682,7 +645,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl zeroPackageList = distrilbutionBillLading.getParcelLisList(); zeroPackageMap = zeroPackageList.stream().collect(Collectors.groupingBy(DistributionParcelListDTO::getStockArticleId)); } - this.saveDistrilbutionBillLading(distrilbutionBillLading); + this.saveDistrilbutionBillLading(distrilbutionBillLading,myCurrentWarehouse); // List packageEntityList = new ArrayList<>(); if (StringUtils.isNotBlank(distrilbutionBillLading.getStockArticleId())) { String[] split = distrilbutionBillLading.getStockArticleId().split(","); @@ -916,10 +879,10 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl buildNodeFanoutMsgForBill(DistrilbutionBillLadingDTO distrilbutionBillLading, List packageEntityList, List detailsEntities, List zeroPackageEntityList, List listEntity) { if (distrilbutionBillLading.getId() == null) { @@ -4272,7 +4255,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl list = new ArrayList<>(); boolean isZeroType = false; @@ -4283,60 +4266,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl zeroPackageEntityList = new ArrayList<>(); -// List parcelNumberEntityList = new ArrayList<>(); -// AtomicInteger nu = new AtomicInteger(); -// //是 添加物料信息 -// list.forEach(i -> { -// if (i.getQuantity() != 0) { -// DistributionReservationZeroPackageEntity zeroPackageEntity = new DistributionReservationZeroPackageEntity(); -// zeroPackageEntity.setQuantity(i.getQuantity()); -// zeroPackageEntity.setReservationId(distrilbutionBillLading.getId()); -// zeroPackageEntity.setType("3"); -// zeroPackageEntity.setCategoryName(i.getFirsts()); -// zeroPackageEntity.setZeroPackageStatus("1"); -// zeroPackageEntity.setStockArticleId(i.getStockArticleId()); -// zeroPackageEntity.setRealityQuantity(0); -// //修改包件配送数量 -// //查询 -// DistributionStockArticleEntity byId = distributionStockArticleService.getById(i.getStockArticleId()); -// DistributionParcelNumberEntity one = distributionParcelNumberService.getOne(Wrappers.query().lambda().eq(DistributionParcelNumberEntity::getParcelListId, i.getId())); -// -// int i1 = one.getDeliveryQuantity() + i.getQuantity(); -// //全部数据不能大于预约数 -// if (ObjectUtils.isNotNull(one) && i1 <= one.getHandQuantity()) { -// nu.addAndGet(i.getQuantity()); -// DistributionParcelNumberEntity parcelNumberEntity = new DistributionParcelNumberEntity(); -// parcelNumberEntity.setId(one.getId()); -// parcelNumberEntity.setDeliveryQuantity(one.getDeliveryQuantity() + i.getQuantity()); -// parcelNumberEntity.setHandQuantity(byId.getHandQuantity()); -// parcelNumberEntityList.add(parcelNumberEntity); -// zeroPackageEntity.setParcelListId(one.getParcelListId()); -// zeroPackageEntityList.add(zeroPackageEntity); -// } else { -// throw new ServiceException("配送数量大于在库数量!!"); -// } -// -// } -// }); -// if (!parcelNumberEntityList.isEmpty()) { -// parcelNumberEntityList.forEach(p -> { -// if (nu.get() <= p.getHandQuantity()) { -// p.setHandQuantity(null); -// distributionParcelNumberService.updateById(p); -// } else { -// throw new ServiceException("预约数量大于在库数量!!"); -// } -// }); -// } else { -// throw new ServiceException("数据异常,请联系管理员!!"); -// } -// distributionZeroPackageService.saveBatch(zeroPackageEntityList); -// } + //新增自提日志 // 创建备货任务 DistributionStockupEntity distributionStockupEntity = buildDistributionStockupEntityBydistrilbutionBillLading(distrilbutionBillLading); diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseConfigServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseConfigServiceImpl.java index aef4c0699..9e961ab86 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseConfigServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseConfigServiceImpl.java @@ -45,13 +45,13 @@ public class WarehouseConfigServiceImpl extends BaseServiceImpl