|
|
|
@ -2657,14 +2657,14 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
//查询满足条件的托盘码
|
|
|
|
|
List<DistributionParcelListEntity> distributionParcelListEntities = distributionReservationMapper.selectPackageListByReservationId(distributionAppReservationVO.getId()); |
|
|
|
|
int trayNum = 0; |
|
|
|
|
if (Func.isNotEmpty(distributionParcelListEntities)){ |
|
|
|
|
if (Func.isNotEmpty(distributionParcelListEntities)) { |
|
|
|
|
List<String> packageCodeList = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getOrderPackageCode).collect(Collectors.toList()); |
|
|
|
|
List<WarehouseTrayGoodsEntity> collect = trayList.stream().distinct().collect(Collectors.toList()); |
|
|
|
|
for (WarehouseTrayGoodsEntity warehouseTrayGoodsEntity : collect) { |
|
|
|
|
List<WarehouseTrayGoodsEntity> trayIdList = warehouseTrayGoodsClient.getTrayIdList(warehouseTrayGoodsEntity.getTrayId().toString(), warehouseTrayGoodsEntity.getTrayCode()); |
|
|
|
|
//判断该托盘上的货物都存在于计划之中
|
|
|
|
|
boolean isLoadingTrayFlag = trayIdList.stream().map(WarehouseTrayGoodsEntity::getAssociationValue).allMatch(t -> packageCodeList.contains(t)); |
|
|
|
|
if (isLoadingTrayFlag){ |
|
|
|
|
if (isLoadingTrayFlag) { |
|
|
|
|
trayNum += 1; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -4599,8 +4599,11 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
throw new ServiceException("参数错误"); |
|
|
|
|
} |
|
|
|
|
if (2 == type) { |
|
|
|
|
log.info(">>>>> printBatch 市配 {}",ids); |
|
|
|
|
return handleShiPeiData(template, idArray, html); |
|
|
|
|
} else if (1 == type) { |
|
|
|
|
log.info(">>>>> printBatch 商配 {}",ids); |
|
|
|
|
|
|
|
|
|
return handleShangPeiData(template.getId(), idArray, html); |
|
|
|
|
} else if (3 == type) { |
|
|
|
|
// 自提
|
|
|
|
@ -5829,16 +5832,16 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
abnormalPackageVO.setIsAbnormalSinging(1); |
|
|
|
|
aftersalesAbnormalPackageVOS.add(abnormalPackageVO); |
|
|
|
|
} |
|
|
|
|
}else { |
|
|
|
|
} else { |
|
|
|
|
//查看是否是异常装车包件
|
|
|
|
|
List<DistributionLoadscanEntity> list = distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda() |
|
|
|
|
.eq(DistributionLoadscanEntity::getDeliveryId, deliveryId) |
|
|
|
|
.eq(DistributionLoadscanEntity::getIsAbnormalLoading, IsOrNoConstant.yes.getValue()) |
|
|
|
|
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()) |
|
|
|
|
); |
|
|
|
|
if (Func.isNotEmpty(list)){ |
|
|
|
|
if (Func.isNotEmpty(list)) { |
|
|
|
|
List<DistributionLoadscanEntity> abnormalPackageList = list.stream().filter(f -> f.getOrderPackageCode().equals(scanBarCode)).collect(Collectors.toList()); |
|
|
|
|
if (Func.isNotEmpty(abnormalPackageList)){ |
|
|
|
|
if (Func.isNotEmpty(abnormalPackageList)) { |
|
|
|
|
for (DistributionLoadscanEntity distributionLoadscanEntity : abnormalPackageList) { |
|
|
|
|
DistributionParcelListEntity parcelListEntity = distributionParcelListService.getById(distributionLoadscanEntity.getPackageId()); |
|
|
|
|
AftersalesAbnormalPackageVO abnormalPackageVO = Func.copy(distributionLoadscanEntity, AftersalesAbnormalPackageVO.class); |
|
|
|
@ -5893,7 +5896,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
List<DistributionRetentionScanVo> distributionRetentionScanVos = distributionDeliveryListMapper.selectRetentionZeroPackage(deliveryId, scanBarCode); |
|
|
|
|
if (Func.isNotEmpty(distributionRetentionScanVos)){ |
|
|
|
|
if (Func.isNotEmpty(distributionRetentionScanVos)) { |
|
|
|
|
for (DistributionRetentionScanVo distributionRetentionScanVo : distributionRetentionScanVos) { |
|
|
|
|
AftersalesAbnormalPackageVO abnormalPackageVO = Func.copy(distributionRetentionScanVo, AftersalesAbnormalPackageVO.class); |
|
|
|
|
abnormalPackageVO.setConditions(3); |
|
|
|
@ -5925,10 +5928,32 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
if ("1".equals(kind)) { |
|
|
|
|
QueryWrapper<DistributionDeliverySelfEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.eq("delivery_id", deliveryListEntityId); |
|
|
|
|
DistributionDeliverySelfEntity deliverySelfEntity = distributionDeliverySelfService.getOne(queryWrapper); |
|
|
|
|
dirverName = deliverySelfEntity.getDriverName(); |
|
|
|
|
dirverPhone = deliverySelfEntity.getDriverPhone(); |
|
|
|
|
carNumber = deliverySelfEntity.getVehicleNub(); |
|
|
|
|
List<DistributionDeliverySelfEntity> deliverySelfEntity = distributionDeliverySelfService.list(queryWrapper); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
StringBuilder sbName = new StringBuilder(); |
|
|
|
|
StringBuilder sbPhone = new StringBuilder(); |
|
|
|
|
StringBuilder sbCarNumber = new StringBuilder(); |
|
|
|
|
for (DistributionDeliverySelfEntity distributionDeliverySelfEntity : deliverySelfEntity) { |
|
|
|
|
if (!sbName.toString().equals("")) { |
|
|
|
|
sbName.append("/"); |
|
|
|
|
} |
|
|
|
|
sbName.append(distributionDeliverySelfEntity.getDriverName()); |
|
|
|
|
|
|
|
|
|
if (!sbPhone.toString().equals("")) { |
|
|
|
|
sbPhone.append("/"); |
|
|
|
|
} |
|
|
|
|
sbPhone.append(distributionDeliverySelfEntity.getDriverPhone()); |
|
|
|
|
|
|
|
|
|
if (!sbCarNumber.toString().equals("")) { |
|
|
|
|
sbCarNumber.append("/"); |
|
|
|
|
} |
|
|
|
|
sbCarNumber.append(distributionDeliverySelfEntity.getVehicleNub()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
dirverName = sbName.toString(); |
|
|
|
|
dirverPhone = sbPhone.toString(); |
|
|
|
|
carNumber = sbCarNumber.toString(); |
|
|
|
|
} else if ("2".equals(kind)) { |
|
|
|
|
QueryWrapper<DistributionDeliveryTripartiteEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.eq("delivery_id", deliveryListEntityId); |
|
|
|
@ -6256,7 +6281,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
switch (i) { |
|
|
|
|
case 1: |
|
|
|
|
// 订单
|
|
|
|
|
distributionReservationStockarticleEntityList = distributionReservationStockarticleService.lambdaQuery().eq(DistributionReservationStockarticleEntity::getReservationId, distributionReservationEntity.getId()).list(); |
|
|
|
|
|
|
|
|
|
LambdaQueryWrapper<DistributionReservationStockarticleEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
lambdaQueryWrapper.eq(DistributionReservationStockarticleEntity::getReservationId, distributionReservationEntity.getId()); |
|
|
|
|
lambdaQueryWrapper.ne(DistributionReservationStockarticleEntity::getStockArticleStatus, 2); |
|
|
|
|
|
|
|
|
|
distributionReservationStockarticleEntityList = distributionReservationStockarticleService.list(lambdaQueryWrapper); |
|
|
|
|
log.info(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 订单总数 {}",distributionReservationStockarticleEntityList.size()); |
|
|
|
|
|
|
|
|
|
// 取值
|
|
|
|
|
for (DistributionReservationStockarticleEntity distributionReservationStockarticleEntity : distributionReservationStockarticleEntityList) { |
|
|
|
@ -6297,7 +6328,11 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
case 2: |
|
|
|
|
distributionReservationStocklistEntities = distributionReservationStocklistService.lambdaQuery().eq(DistributionReservationStocklistEntity::getReservationId, distributionReservationEntity.getId()).list(); |
|
|
|
|
distributionReservationStocklistEntities = distributionReservationStocklistService.lambdaQuery().eq(DistributionReservationStocklistEntity::getReservationId, distributionReservationEntity.getId()).ne(DistributionReservationStocklistEntity::getStockListStatus,2).list(); |
|
|
|
|
|
|
|
|
|
log.info(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 库存品总数 {}",distributionReservationStocklistEntities.size()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (distributionReservationStocklistEntities.isEmpty()) { |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|