|
|
|
@ -676,6 +676,19 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
String collect = abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getTrainNumber).collect(Collectors.joining(",")); |
|
|
|
|
log.info("包件已在其他车次存在异常 >>>>当前车次:{},其他车次:{}", distributionDeliveryListEntity.getTrainNumber(), collect); |
|
|
|
|
return Resp.scanFail("包件已在其他车次存在异常", "包件已在其他车次存在异常"); |
|
|
|
|
}else { |
|
|
|
|
//这里需要判定文员是否对该异常进行驳回操作
|
|
|
|
|
List<DistributionLoadscanAbnormalEntity> collect = abnormalEntities.stream().filter(f -> distributionDeliveryListEntity.getId().equals(f.getDeliveryListId()) && distrilbutionloadingscanDTO.getReservationId().equals(f.getReservationId())).collect(Collectors.toList()); |
|
|
|
|
if (!collect.isEmpty()) { |
|
|
|
|
//存在异常操作
|
|
|
|
|
if (collect.size() == 1){ |
|
|
|
|
//判断是否进行审核以及驳货操作
|
|
|
|
|
DistributionLoadscanAbnormalEntity distributionLoadscanAbnormalEntity = collect.get(0); |
|
|
|
|
if (distributionLoadscanAbnormalEntity.getAuditingStatus().equals(3)){ |
|
|
|
|
return Resp.scanFail("包件异常已驳回", "包件异常已驳回"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -5879,14 +5892,21 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R retentionScan(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) { |
|
|
|
|
if (distrilbutionloadingscanDTO.getBarcode().isEmpty()) { |
|
|
|
|
log.error("参数缺失Barcode:{}",distrilbutionloadingscanDTO.getBarcode()); |
|
|
|
|
} |
|
|
|
|
Integer retentionType = distrilbutionloadingscanDTO.getRetentionType(); |
|
|
|
|
DistributionDeliveryListEntity deliveryListEntity = this.getById(distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
|
List<DistributionRetentionScanVo> retentionScanVos = new ArrayList<>(); |
|
|
|
|
//查询包件
|
|
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); |
|
|
|
|
if (Func.isEmpty(myCurrentWarehouse)){ |
|
|
|
|
return Resp.scanFail("未授权!!!","未授权!!!"); |
|
|
|
|
} |
|
|
|
|
switch (retentionType) { |
|
|
|
|
case 1: |
|
|
|
|
//包件--库存品 和包件
|
|
|
|
|
List<DistributionLoadscanEntity> loadscanEntityList = distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda() |
|
|
|
|
.eq(DistributionLoadscanEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId()) |
|
|
|
|
.eq(DistributionLoadscanEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode()) |
|
|
|
|
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()) |
|
|
|
|
); |
|
|
|
@ -5896,6 +5916,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
//包件存在装车才能进行滞留
|
|
|
|
|
//通过配送任务和包件确定预约信息
|
|
|
|
|
DistributionLoadscanEntity distributionLoadscanEntity = loadscanEntityList.get(0); |
|
|
|
|
if (2 == distributionLoadscanEntity.getIsAbnormalLoading()){ |
|
|
|
|
//异常装车未进行审核
|
|
|
|
|
return Resp.scanFail("包件存在异常", "包件存在异常"); |
|
|
|
|
} |
|
|
|
|
if (2 == distributionLoadscanEntity.getSignforState()) { |
|
|
|
|
log.info("滞留扫描失败,包件已签收>>>>>>>>>>>>>>>>>>>>>>>reservationId:{},packageCode:{}", distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getOrderPackageCode()); |
|
|
|
|
return Resp.scanFail("包件已签收", "包件已签收"); |
|
|
|
@ -5905,7 +5929,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
List<DistributionLoadscaninvnEntity> loadscaninvnEntityList = distributionLoadscaninvnService.list(Wrappers.<DistributionLoadscaninvnEntity>query().lambda() |
|
|
|
|
.eq(DistributionLoadscaninvnEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId()) |
|
|
|
|
.eq(DistributionLoadscaninvnEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode()) |
|
|
|
|
.ne(DistributionLoadscaninvnEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()) |
|
|
|
|
); |
|
|
|
@ -5953,7 +5976,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
return Resp.scanFail("包件未装车", "包件未装车"); |
|
|
|
|
} else { |
|
|
|
|
//该配送任务查询无该包件信息
|
|
|
|
|
return Resp.scanFail("此配送无该包件", "此配送无该包件信息"); |
|
|
|
|
return Resp.scanFail("系统无编码", "系统无编码"); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -7638,6 +7661,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
@Transactional |
|
|
|
|
public void maintenanceDeliveryInfo(Long deliveryId) { |
|
|
|
|