|
|
@ -573,6 +573,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib |
|
|
|
} |
|
|
|
} |
|
|
|
return Resp.scanFail("此码不是订制品", "此码不是订制品"); |
|
|
|
return Resp.scanFail("此码不是订制品", "此码不是订制品"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//查询当前扫描的包件是否进行了装车
|
|
|
|
|
|
|
|
DistributionParcelListEntity parcelList = distributionParcelListService.selectByOrderPackageCode(distrilbutionloadingscanDTO.getBarcode(), myCurrentWarehouse.getId()); |
|
|
|
|
|
|
|
if (!Objects.isNull(parcelList)){ |
|
|
|
|
|
|
|
if (OrderPackageLoadingStatusConstant.yizhuangche.getValue().equals(parcelList.getOrderPackageLoadingStatus())){ |
|
|
|
|
|
|
|
return Resp.scanFail("操作失败", "包件已装车"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
//获取当前用户司机
|
|
|
|
//获取当前用户司机
|
|
|
|
DistributionDeliveryListEntity distributionDeliveryListEntity = distributionDeliveryListMapper.selectById(distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
DistributionDeliveryListEntity distributionDeliveryListEntity = distributionDeliveryListMapper.selectById(distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
//异步确认包条扫描信息
|
|
|
|
//异步确认包条扫描信息
|
|
|
@ -5081,6 +5088,11 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib |
|
|
|
List<DistributionParcelListEntity> parcelListEntities = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode())); |
|
|
|
List<DistributionParcelListEntity> parcelListEntities = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode())); |
|
|
|
if (Func.isNotEmpty(parcelListEntities) && parcelListEntities.size() == 1) { |
|
|
|
if (Func.isNotEmpty(parcelListEntities) && parcelListEntities.size() == 1) { |
|
|
|
DistributionParcelListEntity parcelListEntity = parcelListEntities.get(0); |
|
|
|
DistributionParcelListEntity parcelListEntity = parcelListEntities.get(0); |
|
|
|
|
|
|
|
if (OrderPackageLoadingStatusConstant.yizhuangche.getValue().equals(parcelListEntity.getOrderPackageLoadingStatus())){ |
|
|
|
|
|
|
|
//包件已装车
|
|
|
|
|
|
|
|
log.error("重复异常装车,:{}", parcelListEntity.getOrderPackageCode()); |
|
|
|
|
|
|
|
return Resp.scanFail("操作失败", "包件已装车"); |
|
|
|
|
|
|
|
} |
|
|
|
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(parcelListEntity.getStockArticleId()); |
|
|
|
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(parcelListEntity.getStockArticleId()); |
|
|
|
if (Func.isEmpty(stockArticleEntity)) { |
|
|
|
if (Func.isEmpty(stockArticleEntity)) { |
|
|
|
log.error("###############订单异常:{}", stockArticleEntity); |
|
|
|
log.error("###############订单异常:{}", stockArticleEntity); |
|
|
@ -5154,10 +5166,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib |
|
|
|
distributionLoadscanAbnormalEntity.setPackageCode(parcelListEntity.getOrderPackageCode()); |
|
|
|
distributionLoadscanAbnormalEntity.setPackageCode(parcelListEntity.getOrderPackageCode()); |
|
|
|
distributionLoadscanAbnormalEntity.setPackageId(parcelListEntity.getId()); |
|
|
|
distributionLoadscanAbnormalEntity.setPackageId(parcelListEntity.getId()); |
|
|
|
distributionLoadscanAbnormalService.save(distributionLoadscanAbnormalEntity); |
|
|
|
distributionLoadscanAbnormalService.save(distributionLoadscanAbnormalEntity); |
|
|
|
//修改包件状态 维护订单状态
|
|
|
|
|
|
|
|
parcelListEntity.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue()); |
|
|
|
|
|
|
|
parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yichuku.getValue()); |
|
|
|
|
|
|
|
distributionParcelListService.updateById(parcelListEntity); |
|
|
|
|
|
|
|
//添加包件数据至扫描表中
|
|
|
|
//添加包件数据至扫描表中
|
|
|
|
if (Func.isNotEmpty(distributionDeliverySelfEntity.getDeliveryId())) { |
|
|
|
if (Func.isNotEmpty(distributionDeliverySelfEntity.getDeliveryId())) { |
|
|
|
loadscanEntity.setDriverId(distributionDeliverySelfEntity.getDriverId()); |
|
|
|
loadscanEntity.setDriverId(distributionDeliverySelfEntity.getDriverId()); |
|
|
@ -5190,8 +5198,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib |
|
|
|
loadscanEntity.setLoadingId(distrilbutionloadingscanDTO.getLoadingId()); |
|
|
|
loadscanEntity.setLoadingId(distrilbutionloadingscanDTO.getLoadingId()); |
|
|
|
loadscanEntity.setIsAbnormalLoading(2); |
|
|
|
loadscanEntity.setIsAbnormalLoading(2); |
|
|
|
distributionLoadscanService.save(loadscanEntity); |
|
|
|
distributionLoadscanService.save(loadscanEntity); |
|
|
|
|
|
|
|
//修改包件装车状态
|
|
|
|
|
|
|
|
//修改包件状态 维护订单状态
|
|
|
|
|
|
|
|
parcelListEntity.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue()); |
|
|
|
|
|
|
|
parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yichuku.getValue()); |
|
|
|
|
|
|
|
distributionParcelListService.updateById(parcelListEntity); |
|
|
|
//出库
|
|
|
|
//出库
|
|
|
|
warehouseUpdownTypeClient.downPackage(distrilbutionloadingscanDTO.getBarcode(), myCurrentWarehouse.getId()); |
|
|
|
warehouseUpdownTypeClient.downDeliveryPackage(distrilbutionloadingscanDTO.getBarcode(), myCurrentWarehouse.getId()); |
|
|
|
//查询本车次是否第一次扫码,没有则更新上车时间
|
|
|
|
//查询本车次是否第一次扫码,没有则更新上车时间
|
|
|
|
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
//更新签收表的装车数量
|
|
|
|
//更新签收表的装车数量
|
|
|
@ -5199,11 +5212,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib |
|
|
|
//维护订单信息
|
|
|
|
//维护订单信息
|
|
|
|
distributionStockArticleService.maintenanceOrderInfo(parcelListEntity.getOrderCode(), myCurrentWarehouse.getId()); |
|
|
|
distributionStockArticleService.maintenanceOrderInfo(parcelListEntity.getOrderCode(), myCurrentWarehouse.getId()); |
|
|
|
|
|
|
|
|
|
|
|
//扣减订单在库数量
|
|
|
|
|
|
|
|
// distributionStockArticleMapper.deductionHandQuantity(loadscanEntity.getOrderId(), loadscanEntity.getLoadedNub());
|
|
|
|
|
|
|
|
//异步维护此异常装车包件的订单状态
|
|
|
|
|
|
|
|
// distributionAsyncService.maintenanceOrderStatus(parcelListEntity.getOrderCode(),myCurrentWarehouse.getId());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DistributionSignforEntity signforEntity = distributionSignforService.getOne(Wrappers.<DistributionSignforEntity>query().lambda().eq(DistributionSignforEntity::getReservationId, reservationEntity.getId()).eq(DistributionSignforEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId())); |
|
|
|
DistributionSignforEntity signforEntity = distributionSignforService.getOne(Wrappers.<DistributionSignforEntity>query().lambda().eq(DistributionSignforEntity::getReservationId, reservationEntity.getId()).eq(DistributionSignforEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId())); |
|
|
|
if (Func.isNotEmpty(signforEntity)) { |
|
|
|
if (Func.isNotEmpty(signforEntity)) { |
|
|
|
//标识该客户存在异常装车包件,为了后续的异常装车审核
|
|
|
|
//标识该客户存在异常装车包件,为了后续的异常装车审核
|
|
|
@ -5230,12 +5238,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public R getPackageListByDeliveryIdAndOrderId(IPage<Object> page, Long deliveryId, Long orderId) { |
|
|
|
public R getPackageListByDeliveryIdAndOrderId(IPage<Object> page, Long deliveryId, Long orderId) { |
|
|
|
|
|
|
|
|
|
|
|
List<DistributionParcelListVO> allPackageList = new ArrayList<>(); |
|
|
|
List<DistributionParcelListVO> allPackageList = new ArrayList<>(); |
|
|
|
List<DistributionParcelListEntity> reservationPackageList = baseMapper.getPackageListByDeliveryId(deliveryId, orderId); |
|
|
|
List<DistributionParcelListEntity> reservationPackageList = baseMapper.getPackageListByDeliveryId(deliveryId, orderId); |
|
|
|
DistributionReservationOrderPackageVO reservationOrderPackageVO = new DistributionReservationOrderPackageVO(); |
|
|
|
DistributionReservationOrderPackageVO reservationOrderPackageVO = new DistributionReservationOrderPackageVO(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<DistributionParcelListEntity> parcelListEntities = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getStockArticleId, orderId).eq(DistributionParcelListEntity::getOrderPackageReservationStatus, OrderPackageReservationStatusConstant.daiyuyue.getValue()).notIn(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiqianshou.getValue(), OrderPackageStatusConstant.yichuku.getValue())); |
|
|
|
List<DistributionParcelListEntity> parcelListEntities = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getStockArticleId, orderId).eq(DistributionParcelListEntity::getOrderPackageReservationStatus, OrderPackageReservationStatusConstant.daiyuyue.getValue()).notIn(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiqianshou.getValue(), OrderPackageStatusConstant.yichuku.getValue())); |
|
|
|
if (Func.isNotEmpty(reservationPackageList)) { |
|
|
|
if (Func.isNotEmpty(reservationPackageList)) { |
|
|
|
List<DistributionParcelListVO> parcelListVOS = DistributionParcelListWrapper.build().listVO(reservationPackageList); |
|
|
|
List<DistributionParcelListVO> parcelListVOS = DistributionParcelListWrapper.build().listVO(reservationPackageList); |
|
|
|