|
|
|
@ -2964,9 +2964,20 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
stockupInfoEntity.setStockUpType("1"); |
|
|
|
|
distributionStockupInfoService.save(stockupInfoEntity); |
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//根据配送计划和运单号查询出该预约
|
|
|
|
|
// DistributionReservationEntity reservationEntity = baseMapper.selectReservationByDeliveryListIdAndCustomer(deliveryListEntityId, k);
|
|
|
|
|
DistributionReservationEntity reservationEntity = baseMapper.selectReservationByDeliveryListIdAndCustomerUnit(deliveryListEntityId, k); |
|
|
|
|
DistributionSignforEntity signforEntity = distributionSignforService.getOne(Wrappers.<DistributionSignforEntity>query().lambda() |
|
|
|
|
.eq(DistributionSignforEntity::getReservationId, reservationEntity.getId()) |
|
|
|
|
.eq(DistributionSignforEntity::getDeliveryId, deliveryListEntity.getId()) |
|
|
|
|
); |
|
|
|
|
if (Func.isNotEmpty(signforEntity) && signforEntity.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())){ |
|
|
|
|
log.error("#############商配文员对已复核预约进行订单追加reservationId:{}",reservationEntity.getId()); |
|
|
|
|
throw new RuntimeException("收货单位:"+reservationEntity.getMallName()+"客户:"+reservationEntity.getConsignee()+"完成复核签收,无法追加订单"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//查询出该预约下的订单信息
|
|
|
|
|
List<DistributionReservationStockarticleEntity> reservationStockarticleEntityList = distributionReservationStockarticleMapper.selectList(Wrappers.<DistributionReservationStockarticleEntity>query().lambda().eq(DistributionReservationStockarticleEntity::getReservationId, reservationEntity.getId()).ne(DistributionReservationStockarticleEntity::getStockArticleStatus, ReservationOrderStatusConstant.quxiao.getValue())); |
|
|
|
|
Map<Long, List<DistributionReservationStockarticleEntity>> oldOrder = reservationStockarticleEntityList.stream().collect(Collectors.groupingBy(DistributionReservationStockarticleEntity::getStockArticleId)); |
|
|
|
|