diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java index f008f3534..ff0463b4c 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java @@ -365,6 +365,7 @@ public class DistributionDeliveryListController extends BladeController { @ApiOperation(value = "批量打印 配送单") public R> printBatch(@ApiParam(value = "主键集合", required = true) @RequestParam String ids, @ApiParam(value = "打印类型", required = true) @RequestParam Integer type) { try { + log.info(">>>>>>>>>>>>>>>>>> printBatch {}",ids); List printPreviewVOS = distributionDeliveryListService.printBatch(ids, type); return R.data(printPreviewVOS); } catch (Exception e) { diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java index 4f573ed02..01ac735d3 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java @@ -2657,14 +2657,14 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl distributionParcelListEntities = distributionReservationMapper.selectPackageListByReservationId(distributionAppReservationVO.getId()); int trayNum = 0; - if (Func.isNotEmpty(distributionParcelListEntities)){ + if (Func.isNotEmpty(distributionParcelListEntities)) { List packageCodeList = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getOrderPackageCode).collect(Collectors.toList()); List collect = trayList.stream().distinct().collect(Collectors.toList()); for (WarehouseTrayGoodsEntity warehouseTrayGoodsEntity : collect) { List 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>>>> 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 list = distributionLoadscanService.list(Wrappers.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 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 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 queryWrapper = new QueryWrapper<>(); queryWrapper.eq("delivery_id", deliveryListEntityId); - DistributionDeliverySelfEntity deliverySelfEntity = distributionDeliverySelfService.getOne(queryWrapper); - dirverName = deliverySelfEntity.getDriverName(); - dirverPhone = deliverySelfEntity.getDriverPhone(); - carNumber = deliverySelfEntity.getVehicleNub(); + List 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 queryWrapper = new QueryWrapper<>(); queryWrapper.eq("delivery_id", deliveryListEntityId); @@ -6256,7 +6281,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl 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>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 库存品总数 {}",distributionReservationStocklistEntities.size()); + + if (distributionReservationStocklistEntities.isEmpty()) { return result; } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java index b0df9af9c..c4c267967 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java @@ -248,7 +248,8 @@ public class WarehouseWarehousingEntryServiceImpl extends BaseServiceImpl iterator = list.iterator(); while (iterator.hasNext()){ - if(ObjectUtils.isNotNull(iterator.next().getConditions() ) && iterator.next().getConditions().equals("3")){ + WarehouseWarehousingDetailEntity next = iterator.next(); + if(ObjectUtils.isNotNull(next.getConditions() ) && next.getConditions().equals("3")){ iterator.remove(); } }