From 3158426c467115b7dc8062eceee986ef7b58d20b Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Fri, 17 Jan 2025 18:15:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=AD=BE=E6=94=B6=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=20=E5=92=8C=E9=85=8D=E9=80=81=E8=BD=A6=E6=AC=A1?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/LogpmDataSearchServiceImpl.java | 15 +++- .../mapper/DistributionSignforMapper.java | 2 + .../mapper/DistributionSignforMapper.xml | 11 +++ .../DistributionDeliveryListServiceImpl.java | 13 ++- .../DistributionReservationServiceImpl.java | 22 ++--- .../impl/DistributionSignforServiceImpl.java | 88 +++++++++++++------ 6 files changed, 108 insertions(+), 43 deletions(-) diff --git a/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/impl/LogpmDataSearchServiceImpl.java b/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/impl/LogpmDataSearchServiceImpl.java index d29087cf2..f69fb4154 100644 --- a/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/impl/LogpmDataSearchServiceImpl.java +++ b/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/impl/LogpmDataSearchServiceImpl.java @@ -173,13 +173,13 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService { if (signListByWaybillNumber != null && !signListByWaybillNumber.isEmpty()) { //统计装车数量load_num - int loadNum = signListByWaybillNumber.stream().mapToInt(QualityDeliverEntity::getLoadNum).sum(); + int loadNum = signListByWaybillNumber.stream().filter(e -> e.getLoadNum() !=null).mapToInt(QualityDeliverEntity::getLoadNum).sum(); // 计划配送数 plan_num - int planNum = signListByWaybillNumber.stream().mapToInt(QualityDeliverEntity::getPlanNum).sum(); + int planNum = signListByWaybillNumber.stream().filter(e-> e.getPlanNum()!=null).mapToInt(QualityDeliverEntity::getPlanNum).sum(); // 计算签收数量sign_num - int signNum = signListByWaybillNumber.stream().mapToInt(QualityDeliverEntity::getSignNum).sum(); + int signNum = signListByWaybillNumber.stream().filter(e-> e.getSignNum()!=null).mapToInt(QualityDeliverEntity::getSignNum).sum(); // 配送装车 QualityDeliverEntity qualityDeliverEntity = signListByWaybillNumber.get(0); @@ -214,6 +214,8 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService { } + //对nodeInfoVOList集合中的作业时间 按照 时间倒序排序 + nodeInfoVOList.sort(Comparator.comparing(NodeInfoVO::getOperateTime).reversed()); result.setNodeInfoVOList(nodeInfoVOList); // 配送签收 @@ -372,6 +374,13 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService { } + + + //对nodeInfoVOList集合中的作业时间 按照 时间倒序排序 + nodeInfoVOList.sort(Comparator.comparing(NodeInfoVO::getOperateTime).reversed()); + + + result.setNodeInfoVOList(nodeInfoVOList); // 配送签收 diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java index 9d8cc30d7..424d97e50 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java @@ -495,4 +495,6 @@ public interface DistributionSignforMapper extends BaseMapper + + + UPDATE logpm_distribution_signfor SET + signee_name = #{user.nickName}, + signee_id = #{user.userId}, + received_quantity = ( received_quantity + #{nub} ) + WHERE + is_deleted =0 and delivery_id = #{deliveryId} and reservation_id = #{reservationId} + + DELETE FROM logpm_distribution_signfor 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 32706b204..b11d4c9db 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 @@ -10641,7 +10641,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl distributionParcelListEntities = distributionReservationMapper.selectPackageListByReservationId(reservationId); @@ -3894,16 +3896,16 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl 0) { - reservationEntity.setLoadingStatus(ReservationLoadingStatusConstant.bufenzhuangche.getValue()); + updateEntity.setLoadingStatus(ReservationLoadingStatusConstant.bufenzhuangche.getValue()); } if (loadingNum == 0) { - reservationEntity.setLoadingStatus(ReservationLoadingStatusConstant.daizhuangche.getValue()); + updateEntity.setLoadingStatus(ReservationLoadingStatusConstant.daizhuangche.getValue()); } } } @@ -3912,28 +3914,28 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl 0) { - reservationEntity.setSigningStatus(ReservationSigningStatusConstant.bufenqianshou.getValue()); + updateEntity.setSigningStatus(ReservationSigningStatusConstant.bufenqianshou.getValue()); } if (signingNum == 0) { - reservationEntity.setSigningStatus(ReservationSigningStatusConstant.daiqianshou.getValue()); + updateEntity.setSigningStatus(ReservationSigningStatusConstant.daiqianshou.getValue()); } if (stockUpStatus) { - reservationEntity.setStockStatus(ReservationStockupStatusConstant.yibeihuo.getValue()); + updateEntity.setStockStatus(ReservationStockupStatusConstant.yibeihuo.getValue()); } else { //判断是否都为完成签收 Integer stockNum = distributionStockMapper.selectStockNumByReservationId(reservationId); //判断当前客户是否签收完成了 if (stockNum > 0) { - reservationEntity.setStockStatus(ReservationStockupStatusConstant.daibeihuo.getValue()); + updateEntity.setStockStatus(ReservationStockupStatusConstant.daibeihuo.getValue()); } else { - reservationEntity.setStockStatus(ReservationStockupStatusConstant.weibeihuo.getValue()); + updateEntity.setStockStatus(ReservationStockupStatusConstant.weibeihuo.getValue()); } } if ((reservationEntity.getReservationNum() + reservationEntity.getReservationStockListNum()) == 0) { - reservationEntity.setReservationStatus(ReservationStatusConstant.yiquexiao.getValue()); + updateEntity.setReservationStatus(ReservationStatusConstant.yiquexiao.getValue()); } - this.updateById(reservationEntity); + this.updateById(updateEntity); } } 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 fd5b1563c..97a14bcea 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 @@ -4377,10 +4377,12 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl