|
|
|
@ -3217,6 +3217,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
//新增订单
|
|
|
|
|
List<DistributionParcelListDTO> packageListInfo = s.getPackageListInfo(); |
|
|
|
|
if (Func.isNotEmpty(packageListInfo)) { |
|
|
|
|
if (Func.isNotEmpty(signforEntity) && signforEntity.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())) { |
|
|
|
|
log.error("#############商配文员对已复核预约进行订单追加reservationId:{}", reservationEntity.getId()); |
|
|
|
|
throw new RuntimeException("收货单位:" + reservationEntity.getMallName() + "客户:" + reservationEntity.getConsignee() + "文员完成复核,无法追加订单"); |
|
|
|
|
} |
|
|
|
|
if (Func.isNotEmpty(reservationEntity) && reservationEntity.getSigningStatus().equals(ReservationSigningStatusConstant.yiqianshou.getValue())) { |
|
|
|
|
log.error("#############商配文员对已复核预约进行订单追加reservationId:{}", reservationEntity.getId()); |
|
|
|
|
throw new RuntimeException("收货单位:" + reservationEntity.getMallName() + "客户:" + reservationEntity.getConsignee() + "司机完成签收,无法追加订单"); |
|
|
|
@ -3239,6 +3243,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
logs.add(js); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
if (Func.isNotEmpty(signforEntity) && signforEntity.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())) { |
|
|
|
|
log.error("#############商配文员对已复核预约进行订单追加reservationId:{}", reservationEntity.getId()); |
|
|
|
|
throw new RuntimeException("收货单位:" + reservationEntity.getMallName() + "客户:" + reservationEntity.getConsignee() + "文员完成复核,无法追加订单"); |
|
|
|
|
} |
|
|
|
|
if (Func.isNotEmpty(reservationEntity) && reservationEntity.getSigningStatus().equals(ReservationSigningStatusConstant.yiqianshou.getValue())) { |
|
|
|
|
log.error("#############商配文员对已复核预约进行订单追加reservationId:{}", reservationEntity.getId()); |
|
|
|
|
throw new RuntimeException("收货单位:" + reservationEntity.getMallName() + "客户:" + reservationEntity.getConsignee() + "司机完成签收,无法追加订单"); |
|
|
|
@ -3361,8 +3369,12 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
if (Func.isNotEmpty(packageListInfo)) { |
|
|
|
|
packageListInfo.forEach(p -> { |
|
|
|
|
if (Func.isEmpty(oldPackageList.get(p.getId()))) { |
|
|
|
|
if (Func.isNotEmpty(reservationEntity) && reservationEntity.getSigningStatus().equals(ReservationSigningStatusConstant.yiqianshou.getValue())) { |
|
|
|
|
if (Func.isNotEmpty(signforEntity) && signforEntity.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())) { |
|
|
|
|
log.error("#############商配文员对已复核预约进行订单追加reservationId:{}", reservationEntity.getId()); |
|
|
|
|
throw new RuntimeException("收货单位:" + reservationEntity.getMallName() + "客户:" + reservationEntity.getConsignee() + "文员完成复核,无法追加订单"); |
|
|
|
|
} |
|
|
|
|
if (Func.isNotEmpty(reservationEntity) && reservationEntity.getSigningStatus().equals(ReservationSigningStatusConstant.yiqianshou.getValue())) { |
|
|
|
|
log.error("#############商配文员对司机完成签收订单追加reservationId:{}", reservationEntity.getId()); |
|
|
|
|
throw new RuntimeException("收货单位:" + reservationEntity.getMallName() + "客户:" + reservationEntity.getConsignee() + "司机完成签收,无法追加订单"); |
|
|
|
|
} |
|
|
|
|
//为该订单新增了包件
|
|
|
|
@ -6089,11 +6101,21 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
log.error("###########查询配送任务异常,deliveyId:{}", deliveryId); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
DistributionReservationEntity reservationEntity = distributionReservationService.getById(reservationId); |
|
|
|
|
if (Func.isEmpty(reservationEntity)) { |
|
|
|
|
log.error("###########查询预约任务异常,reservationId:{}", reservationId); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
if (conditions != 1) { |
|
|
|
|
log.error("###########包件类型错误,conditions:{}", conditions); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); |
|
|
|
|
if (Func.isEmpty(myCurrentWarehouse)){ |
|
|
|
|
log.error("###########retentionDeliveryReservationPackage未授权,warehouse:{}", myCurrentWarehouse); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
List<JSONObject> aaa =new ArrayList<>(); |
|
|
|
|
//订制品
|
|
|
|
|
//需要对该配送任务下的该包件进行取消状态标识
|
|
|
|
|
int row = distributionReservationMapper.cancelReservationPackage(reservationId, orderPackageId); |
|
|
|
@ -6116,6 +6138,14 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
int a = distributionSignforMapper.deductionLoadingPacjageNum(loadscanEntity.getReservationId(), loadscanEntity.getDeliveryId(), loadscanEntity.getLoadedNub()); |
|
|
|
|
//维护订单状态
|
|
|
|
|
distributionStockArticleService.maintenanceOrderInfo(parcelListEntity.getOrderCode(), parcelListEntity.getWarehouseId()); |
|
|
|
|
//增加滞留信息
|
|
|
|
|
String content = "包件在"+myCurrentWarehouse.getName()+"由"+loadscanEntity.getScanUser()+"取消配车,取消方式:滞留扫描,取消计划,配送车次号:"+loadscanEntity.getTrainNumber()+"预约任务号:"+reservationEntity.getReservationCode(); |
|
|
|
|
JSONObject js = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(),content , WorkNodeEnums.CANCEL_DISTRIBUTION.getCode()); |
|
|
|
|
aaa.add(js); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
if (!aaa.isEmpty()) { |
|
|
|
|
trunklinePackageTrackLogClient.addPackageTrackLog(aaa); |
|
|
|
|
} |
|
|
|
|
//进行了一条包件任务的取消,此时就应该对预约、配送任务进行数量的维护
|
|
|
|
|
distributionAsyncService.checkRetentionReservationAndDeliveryInfo(reservationId, deliveryId); |
|
|
|
|