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 advanceEntityList = advanceService.findListByIds(advanceIds); List waybillOrderEntities = new ArrayList<>(); + List updateAdvanceEntityList = new ArrayList<>(); Set orderCodeSet = new HashSet<>(); for (TrunklineAdvanceEntity advanceEntity : advanceEntityList) { orderCodeSet.add(advanceEntity.getOrderCode()); @@ -824,13 +825,16 @@ public class OpenOrderServiceImpl implements IOpenOrderService { waybillOrderEntities.add(waybillOrderEntity); // orderCodes.add(advanceEntity.getOrderCode()); - advanceEntity.setWaybillStatus("1"); - advanceEntity.setWaybillNo(waybillNo); + TrunklineAdvanceEntity updateAdvanceEntity = new TrunklineAdvanceEntity(); + updateAdvanceEntity.setId(advanceId); + updateAdvanceEntity.setWaybillStatus("1"); + updateAdvanceEntity.setWaybillNo(waybillNo); + updateAdvanceEntityList.add(updateAdvanceEntity); } trunklineWaybillOrderService.saveBatch(waybillOrderEntities); //修改暂存单的状态为已开单 - advanceService.updateBatchById(advanceEntityList); + advanceService.updateBatchById(updateAdvanceEntityList); //更新暂存单包件的运单信息