|
|
@ -2424,34 +2424,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
.ne(DisStockListDetailEntity::getStockPackageStatus, ReservationPackageStatusConstant.quxiao.getValue()) |
|
|
|
.ne(DisStockListDetailEntity::getStockPackageStatus, ReservationPackageStatusConstant.quxiao.getValue()) |
|
|
|
); |
|
|
|
); |
|
|
|
//查询当前客户的所有异常情况
|
|
|
|
//查询当前客户的所有异常情况
|
|
|
|
List<DistributionLoadscanAbnormalEntity> abnormalEntities = distributionLoadscanAbnormalService.list(Wrappers.<DistributionLoadscanAbnormalEntity>query().lambda() |
|
|
|
|
|
|
|
.eq(DistributionLoadscanAbnormalEntity::getPackageCode, distrilbutionloadingscanDTO.getBarcode()) |
|
|
|
|
|
|
|
// .eq(DistributionLoadscanAbnormalEntity::getAuditingStatus, 1)
|
|
|
|
|
|
|
|
//修改 状态
|
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
if (!abnormalEntities.isEmpty()) { |
|
|
|
|
|
|
|
//判断此包件的异常是否是当前扫描车次和客户
|
|
|
|
|
|
|
|
//首先判断存在异常是否不属于当前车次和客户
|
|
|
|
|
|
|
|
boolean flag = abnormalEntities.stream().allMatch(a -> !deliveryListEntity.getId().equals(a.getDeliveryListId()) || !distrilbutionloadingscanDTO.getReservationId().equals(a.getReservationId())); |
|
|
|
|
|
|
|
if (flag){ |
|
|
|
|
|
|
|
//该异常属于其他车次
|
|
|
|
|
|
|
|
String collect = abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getTrainNumber).collect(Collectors.joining(",")); |
|
|
|
|
|
|
|
log.info("包件已在其他车次存在异常 >>>>当前车次:{},其他车次:{}",deliveryListEntity.getTrainNumber(),collect); |
|
|
|
|
|
|
|
return Resp.scanFail("包件已在其他车次存在异常", "包件已在其他车次存在异常"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//判断具体的装车信息
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// boolean flag = abnormalEntities.stream().filter(f->f.getAuditingStatus() == 1).allMatch(a -> deliveryListEntity.getId().equals(a.getDeliveryListId()) && distrilbutionloadingscanDTO.getReservationId().equals(a.getReservationId()));
|
|
|
|
|
|
|
|
// if (flag){
|
|
|
|
|
|
|
|
// //存在异常 进行异常签收还是异常装车区分
|
|
|
|
|
|
|
|
// return Resp.scanFail("包件已存在异常", "包件已存在异常");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// String collect = abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getTrainNumber).collect(Collectors.joining(","));
|
|
|
|
|
|
|
|
// log.info("包件已在其他车次存在异常 >>>>当前车次:{},其他车次:{}",deliveryListEntity.getTrainNumber(),collect);
|
|
|
|
|
|
|
|
// return Resp.scanFail("包件已在其他车次存在异常", "包件已在其他车次存在异常");
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (Func.isNotEmpty(list)) { |
|
|
|
if (Func.isNotEmpty(list)) { |
|
|
|
//满足条件此码必定为库存品
|
|
|
|
//满足条件此码必定为库存品
|
|
|
|
//判断该库存品是否属于当前客户
|
|
|
|
//判断该库存品是否属于当前客户
|
|
|
@ -2466,6 +2439,25 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
//查询该客户是否存在该包件信息
|
|
|
|
//查询该客户是否存在该包件信息
|
|
|
|
List<DistributionParcelListEntity> collect = parcelListEntityList.stream().filter(p -> p.getOrderPackageCode().equals(distrilbutionloadingscanDTO.getBarcode())).collect(Collectors.toList()); |
|
|
|
List<DistributionParcelListEntity> collect = parcelListEntityList.stream().filter(p -> p.getOrderPackageCode().equals(distrilbutionloadingscanDTO.getBarcode())).collect(Collectors.toList()); |
|
|
|
if (Func.isNotEmpty(collect) && collect.size() == 1) { |
|
|
|
if (Func.isNotEmpty(collect) && collect.size() == 1) { |
|
|
|
|
|
|
|
List<DistributionLoadscanAbnormalEntity> abnormalEntities = distributionLoadscanAbnormalService.list(Wrappers.<DistributionLoadscanAbnormalEntity>query().lambda() |
|
|
|
|
|
|
|
.eq(DistributionLoadscanAbnormalEntity::getPackageCode, distrilbutionloadingscanDTO.getBarcode()) |
|
|
|
|
|
|
|
.eq(DistributionLoadscanAbnormalEntity::getPackageId, collect.get(0).getId()) |
|
|
|
|
|
|
|
//修改 状态
|
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
if (!abnormalEntities.isEmpty()) { |
|
|
|
|
|
|
|
//判断此包件的异常是否是当前扫描车次和客户
|
|
|
|
|
|
|
|
//首先判断存在异常是否不属于当前车次和客户
|
|
|
|
|
|
|
|
boolean flag = abnormalEntities.stream().allMatch(a -> !deliveryListEntity.getId().equals(a.getDeliveryListId()) || !distrilbutionloadingscanDTO.getReservationId().equals(a.getReservationId())); |
|
|
|
|
|
|
|
if (flag){ |
|
|
|
|
|
|
|
//该异常属于其他车次
|
|
|
|
|
|
|
|
String info = abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getTrainNumber).collect(Collectors.joining(",")); |
|
|
|
|
|
|
|
log.info("包件已在其他车次存在异常 >>>>当前车次:{},其他车次:{}",deliveryListEntity.getTrainNumber(),info); |
|
|
|
|
|
|
|
return Resp.scanFail("包件已在其他车次存在异常", "包件已在其他车次存在异常"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//判断具体的装车信息
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//存在则查询该包件是否进行装车
|
|
|
|
//存在则查询该包件是否进行装车
|
|
|
|
DistributionLoadscanEntity loadscanEntity = distributionLoadscanMapper.selectOne(Wrappers.<DistributionLoadscanEntity>query().lambda() |
|
|
|
DistributionLoadscanEntity loadscanEntity = distributionLoadscanMapper.selectOne(Wrappers.<DistributionLoadscanEntity>query().lambda() |
|
|
|
.ne(DistributionLoadscanEntity::getScanStatus, 1) |
|
|
|
.ne(DistributionLoadscanEntity::getScanStatus, 1) |
|
|
|