Browse Source

配送状态维护

pull/2/head
汤建军 10 months ago
parent
commit
9ca629f49a
  1. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  2. 14
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml

@ -1279,7 +1279,7 @@
logpm_distribution_signfor lds
JOIN logpm_distribution_reservation ldr ON lds.reservation_id = ldr.id
<where>
ldr.reservation_status != 40
ldr.reservation_status != 40 AND (ldr.reservation_num + ldr.reservation_stock_list_num) > 0
<if test="deliveryListId != null and deliveryListId != ''">
and lds.delivery_id = #{deliveryListId}
</if>

14
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -6750,7 +6750,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
deliveryListEntity.setDeliveryNumber(packageNum);
deliveryListEntity.setInventoryNub(inventoryNum);
}
deliveryListEntity.setCustomersNumber(distributionReservationEntities.size());
List<DistributionReservationEntity> collect = distributionReservationEntities.stream().filter(f -> (f.getReservationNum() + f.getReservationStockListNum()) > 0).collect(Collectors.toList());
log.info(deliveryListEntity.getTrainNumber()+"#################维护配送任务客户数>>>>>>>,:{}",collect.size());
deliveryListEntity.setCustomersNumber(collect.size());
this.updateById(deliveryListEntity);
}
@ -6860,14 +6862,22 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
List<DistributionSignforEntity> list = distributionSignforService.list(Wrappers.<DistributionSignforEntity>query().lambda()
.eq(DistributionSignforEntity::getDeliveryId, deliveryId)
);
List<DistributionReservationEntity> distributionReservationEntities = baseMapper.selectReservationByDeliveryListId(deliveryId);
//查询客户列表
log.info(">>>>>>>>>>>>>>> 车次状态维护3 代码执行 list={}",list);
if (Func.isNotEmpty(distributionReservationEntities)){
boolean flag = distributionReservationEntities.stream().allMatch(a -> ReservationSigningStatusConstant.yiqianshou.getValue().equals(a.getSigningStatus()));
log.info(">>>>>>>>>>>>>>> 客户是否完全签收 代码执行 list={}",flag);
}
if (list.size()>0) {
//查看所有的签收信息是否均已完成
boolean anyMatch = list.stream().allMatch(s -> s.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue()));
log.info(">>>>>>>>>>>>>>> 车次状态维护4 代码执行 anyMatch={}",anyMatch);
log.info(">>>>>>>>>>>>>>> 当前车次复核数量:{}", list.stream().filter(s -> s.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())).count()
);
);
if (anyMatch) {
deliveryListEntity.setDeliveryStatus(DeliveryStatusConstant.yiwancheng.getValue());
}

Loading…
Cancel
Save