|
|
|
@ -710,7 +710,11 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
|
|
|
|
|
//更新签收表的装车数量
|
|
|
|
|
Integer j = distributionSignforMapper.updateloadByReservationId(loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId(), loadscanEntity.getPackageNub()); |
|
|
|
|
|
|
|
|
|
//进行解托操作
|
|
|
|
|
Map<String,Object> info = new HashMap<>(); |
|
|
|
|
info.put("orderPackageCode",parcelListEntity.getOrderPackageCode()); |
|
|
|
|
info.put("warehouseId",myCurrentWarehouse.getId()); |
|
|
|
|
warehouseUpdownTypeClient.downDeliveryPackage(info); |
|
|
|
|
|
|
|
|
|
Map<String, Object> map = new HashMap(); |
|
|
|
|
String distrilbutionloadingscanDTOJson = JSONObject.toJSONString(distrilbutionloadingscanDTO); |
|
|
|
@ -736,6 +740,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//extracteOrderPackageStatus(distrilbutionloadingscanDTO, parcelListEntity, myCurrentWarehouse, reservationEntity);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -4354,6 +4360,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
Long deliveryId = Long.parseLong((String) distributionDeliveryInfoDTO.get("deliveryId")); |
|
|
|
|
DistributionDeliveryListEntity deliveryListEntity = this.getById(deliveryId); |
|
|
|
|
//查询零担订单包件
|
|
|
|
|
// List<DistributionParcelNumberVO> parcelNumberVOS = baseMapper.getZeroPackageListByDeliveryId(distributionDeliveryInfoDTO.getDeliveryId());
|
|
|
|
|
List<DistributionStockArticleVO> deliveryStockArticleInfo = baseMapper.getDeliveryStockArticleInfo(deliveryId); |
|
|
|
@ -4376,6 +4383,16 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
ArrayList<DistributionParcelListVO> distributionParcelListVOS = new ArrayList<>(); |
|
|
|
|
if (Func.isNotEmpty(reservationStockarticleEntityList)) { |
|
|
|
|
List<Long> orderIds = reservationStockarticleEntityList.stream().filter(order -> order.getIsZero().equals(IsOrNoConstant.no.getValue())).map(DistributionReservationStockarticleEntity::getStockArticleId).collect(Collectors.toList()); |
|
|
|
|
List<Long> reservationId = reservationStockarticleEntityList.stream().map(DistributionReservationStockarticleEntity::getReservationId).collect(Collectors.toList()); |
|
|
|
|
Map<Long,String> map = new HashMap<>(); |
|
|
|
|
if (!reservationId.isEmpty()) { |
|
|
|
|
for (Long l : reservationId) { |
|
|
|
|
List<DistributionStockArticleVO> distributionStockArticleVOS = distributionReservationMapper.selectOrderInfoByReservationId(l); |
|
|
|
|
distributionStockArticleVOS.forEach(s->{ |
|
|
|
|
map.put(s.getId(),s.getReservationCode()); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (Func.isNotEmpty(orderIds)) { |
|
|
|
|
//查询该客户的非零但订单包间
|
|
|
|
|
IPage<DistributionParcelListEntity> parcelListEntityList = distributionReservationMapper.getReservationPackage(page, orderIds, distributionDeliveryInfoDTO); |
|
|
|
@ -4385,6 +4402,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
List<DistributionParcelListVO> parcelListVOList = DistributionParcelListWrapper.build().listVO(parcelListEntityList.getRecords()); |
|
|
|
|
for (DistributionParcelListVO distributionParcelListVO : parcelListVOList) { |
|
|
|
|
// log.info(">>>>>> distributionParcelListVO {}", distributionParcelListVO);
|
|
|
|
|
distributionParcelListVO.setDeliveryTrainNumber(deliveryListEntity.getTrainNumber()); |
|
|
|
|
if (!map.isEmpty()){ |
|
|
|
|
distributionParcelListVO.setReservationCode(map.get(distributionParcelListVO.getStockArticleId())); |
|
|
|
|
} |
|
|
|
|
if (Func.isNotEmpty(loadingDataMap)) { |
|
|
|
|
DistributionLoadscanEntity loadscanEntity = loadingDataMap.get(distributionParcelListVO.getId()); |
|
|
|
|
// log.info(">>>>>> loadscanEntity {}", loadscanEntity);
|
|
|
|
@ -4608,6 +4629,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
// Long deliveryId = Long.parseLong((String) distributionDeliveryInfoDTO.get("deliveryId"));
|
|
|
|
|
//查询零担订单包件
|
|
|
|
|
// List<DistributionParcelNumberVO> parcelNumberVOS = baseMapper.getZeroPackageListByDeliveryId(distributionDeliveryInfoDTO.getDeliveryId());
|
|
|
|
|
DistributionDeliveryListEntity deliveryListEntity = this.getById(deliveryId); |
|
|
|
|
|
|
|
|
|
List<DistributionStockArticleVO> deliveryStockArticleInfo = baseMapper.getDeliveryStockArticleInfo(deliveryId); |
|
|
|
|
if (Func.isEmpty(deliveryStockArticleInfo)) { |
|
|
|
|
log.error("配送任务订单查询异常:{}", deliveryStockArticleInfo); |
|
|
|
@ -4628,6 +4651,16 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
ArrayList<DistributionParcelListVO> distributionParcelListVOS = new ArrayList<>(); |
|
|
|
|
if (Func.isNotEmpty(reservationStockarticleEntityList)) { |
|
|
|
|
List<Long> orderIds = reservationStockarticleEntityList.stream().filter(order -> order.getIsZero().equals(IsOrNoConstant.no.getValue())).map(DistributionReservationStockarticleEntity::getStockArticleId).collect(Collectors.toList()); |
|
|
|
|
List<Long> reservationId = reservationStockarticleEntityList.stream().map(DistributionReservationStockarticleEntity::getReservationId).collect(Collectors.toList()); |
|
|
|
|
Map<Long,String> map = new HashMap<>(); |
|
|
|
|
if (!reservationId.isEmpty()) { |
|
|
|
|
for (Long l : reservationId) { |
|
|
|
|
List<DistributionStockArticleVO> distributionStockArticleVOS = distributionReservationMapper.selectOrderInfoByReservationId(l); |
|
|
|
|
distributionStockArticleVOS.forEach(s->{ |
|
|
|
|
map.put(s.getId(),s.getReservationCode()); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (Func.isNotEmpty(orderIds)) { |
|
|
|
|
//查询该客户的非零但订单包间
|
|
|
|
|
List<DistributionParcelListEntity> parcelListEntityList = distributionReservationMapper.getReservationPackageByDeliveryId(orderIds, deliveryId); |
|
|
|
@ -4637,6 +4670,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
List<DistributionParcelListVO> parcelListVOList = DistributionParcelListWrapper.build().listVO(parcelListEntityList); |
|
|
|
|
for (DistributionParcelListVO distributionParcelListVO : parcelListVOList) { |
|
|
|
|
log.info(">>>>>> distributionParcelListVO {}", distributionParcelListVO); |
|
|
|
|
distributionParcelListVO.setDeliveryTrainNumber(deliveryListEntity.getTrainNumber()); |
|
|
|
|
if (!map.isEmpty()){ |
|
|
|
|
distributionParcelListVO.setReservationCode(map.get(distributionParcelListVO.getStockArticleId())); |
|
|
|
|
} |
|
|
|
|
if (Func.isNotEmpty(loadingDataMap)) { |
|
|
|
|
DistributionLoadscanEntity loadscanEntity = loadingDataMap.get(distributionParcelListVO.getId()); |
|
|
|
|
log.info(">>>>>> loadscanEntity {}", loadscanEntity); |
|
|
|
|