|
|
|
@ -597,11 +597,12 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
Integer j = distributionSignforMapper.updateloadByReservationId(loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId(), loadscanEntity.getPackageNub()); |
|
|
|
|
//扣减订单的在库数量
|
|
|
|
|
Integer k = distributionStockArticleMapper.deductionHandQuantity(loadscanEntity.getOrderId(), loadscanEntity.getLoadedNub()); |
|
|
|
|
//这里还需要一个维护状态的方法
|
|
|
|
|
//这里还需要一个订单维护状态的方法
|
|
|
|
|
distributionStockArticleService.updateOrderInfo(parcelListEntity.getOrderCode(),parcelListEntity.getWarehouseId()); |
|
|
|
|
//异步维护状态
|
|
|
|
|
// str.append("包件装车");
|
|
|
|
|
// loadingNum.getAndAdd(loadscanEntity.getPackageNub());
|
|
|
|
|
distributionAsyncService.checkLoadingByPackage(parcelListEntity, loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId()); |
|
|
|
|
// distributionAsyncService.checkLoadingByPackage(parcelListEntity, loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId());
|
|
|
|
|
} else if (parcelListEntityList.size() == 0) { |
|
|
|
|
//查找出该包件信息
|
|
|
|
|
DistributionParcelListEntity parcelListEntity = distributionParcelListService.getOne(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode())); |
|
|
|
@ -612,7 +613,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
} |
|
|
|
|
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleMapper.selectById(parcelListEntity.getStockArticleId()); |
|
|
|
|
if (shangpeiFlag) { |
|
|
|
|
|
|
|
|
|
List<DistributionReservationEntity> reservationEntities = reservationEntityList.stream().filter(r -> Func.isNotEmpty(r.getConsignee()) && r.getConsignee().equals(stockArticleEntity.getCustomerName()) && r.getDeliveryAddress().equals(stockArticleEntity.getCustomerAddress()) && r.getDeliveryPhone().equals(stockArticleEntity.getCustomerTelephone()) && r.getMallName().equals(stockArticleEntity.getMallName())).collect(Collectors.toList()); |
|
|
|
|
//查看是否存在满足条件的预约单
|
|
|
|
|
if (reservationEntities.size() == 1) { |
|
|
|
@ -631,7 +631,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
shangpeiFlag = reservationEntityList.stream().allMatch(r -> r.getDeliveryType().equals(DistributionTypeConstant.shangpei.getValue())); |
|
|
|
|
if (shangpeiFlag) { |
|
|
|
|
List<DistributionReservationEntity> reservationEntities = reservationEntityList.stream().filter(r -> r.getReceivingUnit().equals(stockArticleEntity.getConsigneeUnit()) && r.getMallName().equals(stockArticleEntity.getMallName())).collect(Collectors.toList()); |
|
|
|
@ -764,6 +763,11 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
return Resp.scanFail("查询托盘货物失败", "查询托盘货物失败"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//异步维护预约装车状态,
|
|
|
|
|
|
|
|
|
|
//异步维护配送任务装车状态
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//查询已装车件数
|
|
|
|
|
String str = getLoadingMsg(distrilbutionloadingscanDTO); |
|
|
|
|
return Resp.scanSuccess("装车成功", str); |
|
|
|
@ -1539,7 +1543,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
loadscanEntity.setVehicleName(finalDistributionDeliverySelfEntity.getVehicleNub()); |
|
|
|
|
loadscanEntity.setScanStatus(LoadingStatusConstant.yijianzhuangche.getValue()); |
|
|
|
|
loadscanEntity.setOneClick(2); |
|
|
|
|
loadscanEntity.setScanUser(user.getUserName()); |
|
|
|
|
loadscanEntity.setScanUser(user.getNickName()); |
|
|
|
|
loadscanEntity.setScanTime(now); |
|
|
|
|
if (StringUtils.isNotBlank(finalDistributionDeliverySelfEntity.getDriverPhone())) { |
|
|
|
|
loadscanEntity.setDriverPhone(finalDistributionDeliverySelfEntity.getDriverPhone()); |
|
|
|
@ -2625,9 +2629,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public IPage<DistributionAppReservationVO> getAppDeliveryreservationListPage(IPage<DistributionAppReservationVO> page, DistributionAppDeliveryListDTO distributionDeliveryList) { |
|
|
|
|
public List<DistributionAppReservationVO> getAppDeliveryreservationListPage( DistributionAppDeliveryListDTO distributionDeliveryList) { |
|
|
|
|
//查询客户
|
|
|
|
|
List<DistributionAppReservationVO> customList = distributionDeliveryInfoMapper.selectAppcustomListPage(page, distributionDeliveryList.getId()); |
|
|
|
|
List<DistributionAppReservationVO> customList = distributionDeliveryInfoMapper.selectAppcustomListPage(distributionDeliveryList.getId()); |
|
|
|
|
for (DistributionAppReservationVO distributionAppReservationVO : customList) { |
|
|
|
|
List<DistributionReservationStockarticleEntity> reservationStockarticleEntityList = distributionReservationMapper.selectStockArticleByReservationId(distributionAppReservationVO.getId()); |
|
|
|
|
List<DistributionStockEntity> distributionStockEntities = new ArrayList<>(); |
|
|
|
@ -2712,7 +2716,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
distributionAppReservationVO.setIsload("否"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return page.setRecords(customList); |
|
|
|
|
return customList; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -6677,4 +6681,19 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
|
|
|
|
|
return iPage; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean judgmentOrderRemove(Long deliveryId, Long orderId) { |
|
|
|
|
List<DistributionLoadscanEntity> loadscanEntityList = distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda() |
|
|
|
|
.eq(DistributionLoadscanEntity::getDeliveryId, deliveryId) |
|
|
|
|
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()) |
|
|
|
|
); |
|
|
|
|
if (Func.isNotEmpty(loadscanEntityList)){ |
|
|
|
|
Map<Long, DistributionLoadscanEntity> loadingOrderMap = loadscanEntityList.stream().collect(Collectors.toMap(DistributionLoadscanEntity::getOrderId, Function.identity(), (k1, k2) -> k2)); |
|
|
|
|
if (Func.isNotEmpty(loadingOrderMap.get(orderId))){ |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|