From a49bd9c7ac31c8cb539a3a8fa906e75400a9985f Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Tue, 9 Jan 2024 21:27:59 +0800 Subject: [PATCH] =?UTF-8?q?1.=E7=BB=B4=E6=8A=A4=E4=BF=A1=E6=81=AF=E5=BC=82?= =?UTF-8?q?=E6=AD=A5=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DistributionDeliveryAppController.java | 1 + .../OrderPackageStatusDataHandler.java | 60 +- .../DistributionDeliveryListServiceImpl.java | 556 +++++++++--------- 3 files changed, 329 insertions(+), 288 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java index e9b5a3b8d..0fdf1327a 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java @@ -135,6 +135,7 @@ public class DistributionDeliveryAppController { @ApiOperation(value = "装车扫描", notes = "传入DistrilbutionloadingscanDTO") public R loadingscan(@Valid @RequestBody DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) { R msg = distributionDeliveryListService.loadingscan(distrilbutionloadingscanDTO); + return msg; } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/OrderPackageStatusDataHandler.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/OrderPackageStatusDataHandler.java index b03320c72..fbdda8cc1 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/OrderPackageStatusDataHandler.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/OrderPackageStatusDataHandler.java @@ -2,10 +2,17 @@ package com.logpm.distribution.receiver; +import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.logpm.distribution.dto.app.DistrilbutionloadingscanDTO; import com.logpm.distribution.entity.DistributionParcelListEntity; +import com.logpm.distribution.entity.DistributionReservationEntity; import com.logpm.distribution.mapper.DistributionParcelListMapper; import com.logpm.distribution.mapper.DistributionStockArticleMapper; +import com.logpm.distribution.service.IDistributionDeliveryListService; +import com.logpm.distribution.service.IDistributionReservationService; +import com.logpm.distribution.service.IDistributionStockArticleService; +import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient; import com.rabbitmq.client.Channel; import lombok.extern.slf4j.Slf4j; import org.springblade.common.constant.RabbitConstant; @@ -13,6 +20,7 @@ import org.springframework.amqp.core.Message; import org.springframework.amqp.rabbit.annotation.RabbitHandler; import org.springframework.amqp.rabbit.annotation.RabbitListener; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; import java.util.Map; @@ -24,39 +32,49 @@ public class OrderPackageStatusDataHandler { @Autowired private DistributionParcelListMapper baseMapper; - + @Autowired + private IWarehouseUpdownTypeClient warehouseUpdownTypeClient; @Autowired private DistributionStockArticleMapper distributionStockArticleMapper; + @Autowired + private IDistributionStockArticleService distributionStockArticleService; - @RabbitHandler - public void orderPackageStatusChange(Map map, Message message, Channel channel){ + @Autowired + private IDistributionReservationService distributionReservationService; + @Autowired + private IDistributionDeliveryListService distributionDeliveryListService; - Object orderPackageCode1 = map.get("orderPackageCode"); - String orderPackageCode= (String) orderPackageCode1; - String groundingStatus=(String)map.get("groundingStatus"); - Long warehouseId = (Long)map.get("warehouseId"); + @RabbitHandler + public void orderPackageStatusChange(Map map, Message message, Channel channel){ - // 处理包件状态 - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("order_package_code",orderPackageCode) - .eq("warehouse_id",warehouseId) - .eq("is_deleted",0); - DistributionParcelListEntity parcelListEntity = baseMapper.selectOne(queryWrapper); - parcelListEntity.setOrderPackageGroundingStatus(groundingStatus); - int i = baseMapper.updateById(parcelListEntity); try{ - // 更新状态 - baseMapper.updateOrderPackageCodeById(parcelListEntity.getId(),groundingStatus); - + log.info(">>>>>>>>>>>>>>>>>>>>>>>>>>>>处理状态>>>>>>>>>>>>>>>>>>>>>>>>>>"); + Long myCurrentWarehouseId = Long.parseLong(map.get("myCurrentWarehouseId").toString()); + String distrilbutionloadingscanDTOJson = (String)map.get("distrilbutionloadingscanDTO"); + DistrilbutionloadingscanDTO distrilbutionloadingscanDTO = JSONObject.parseObject(distrilbutionloadingscanDTOJson,DistrilbutionloadingscanDTO.class); + String parcelListEntityJSon = (String)map.get("parcelListEntity"); + DistributionParcelListEntity parcelListEntity = JSONObject.parseObject(parcelListEntityJSon,DistributionParcelListEntity.class); + + String reservationEntityJson = (String)map.get("reservationEntity"); + + DistributionReservationEntity reservationEntity = JSONObject.parseObject(reservationEntityJson,DistributionReservationEntity.class); + + //包件配送下架 + warehouseUpdownTypeClient.downDeliveryPackage(parcelListEntity.getOrderPackageCode(), myCurrentWarehouseId); + //维护订单的信息 + distributionStockArticleService.maintenanceOrderInfo(parcelListEntity.getOrderCode(), myCurrentWarehouseId); + //维护预约的信息 + distributionReservationService.maintenanceReservationInfo(reservationEntity.getId()); + //维护配送任务信息 + distributionDeliveryListService.maintenanceDeliveryInfo(distrilbutionloadingscanDTO.getDeliveryId()); }catch (Exception e){ - - // 更新状态报错 - log.error(">>>>>> updateGroundingStatus 异常信息",e); + log.error(">>>>>> 维护包件信息 报错",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 b1cee5754..c7026df02 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 @@ -17,6 +17,7 @@ package com.logpm.distribution.service.impl; import cn.hutool.core.date.DateUtil; +import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; @@ -58,6 +59,7 @@ import org.jetbrains.annotations.NotNull; import org.springblade.common.constant.DictBizConstant; import org.springblade.common.constant.DistributionTypeConstant; import org.springblade.common.constant.Inventory.InventoryLoadingStatusConstant; +import org.springblade.common.constant.RabbitConstant; import org.springblade.common.constant.common.IsOrNoConstant; import org.springblade.common.constant.delivery.DeliveryLoadingStatusConstant; import org.springblade.common.constant.delivery.DeliveryStatusConstant; @@ -90,6 +92,7 @@ import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.system.cache.DictBizCache; import org.springblade.system.feign.IDictBizClient; +import org.springframework.amqp.rabbit.core.RabbitTemplate; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; @@ -115,105 +118,105 @@ import java.util.stream.Collectors; @Log4j2 public class DistributionDeliveryListServiceImpl extends BaseServiceImpl implements IDistributionDeliveryListService { @Autowired - private DistributionDeliveryInfoMapper distributionDeliveryInfoMapper; + private DistributionDeliveryInfoMapper distributionDeliveryInfoMapper; @Autowired - private DistributionReservationMapper distributionReservationMapper; + private DistributionReservationMapper distributionReservationMapper; @Autowired - private IDistributionReservationStockarticleService distributionReservationStockarticleService; + private IDistributionReservationStockarticleService distributionReservationStockarticleService; @Autowired - private IDistributionReservationStocklistService distributionReservationStocklistService; + private IDistributionReservationStocklistService distributionReservationStocklistService; @Autowired - private IDistributionReservationPackageService distributionReservationPackageService; + private IDistributionReservationPackageService distributionReservationPackageService; @Autowired - private DistributionReservationPackageMapper distributionReservationPackageMapper; + private DistributionReservationPackageMapper distributionReservationPackageMapper; @Autowired - private IDistributionParcelListService distributionParcelListService; + private IDistributionParcelListService distributionParcelListService; @Autowired - private DistributionLoadscanMapper distributionLoadscanMapper; + private DistributionLoadscanMapper distributionLoadscanMapper; @Autowired - private DistributionLoadscanServiceImpl distributionLoadscanService; + private DistributionLoadscanServiceImpl distributionLoadscanService; @Autowired - private DistributionLoadscaninvnServiceImpl distributionLoadscaninvnService; + private DistributionLoadscaninvnServiceImpl distributionLoadscaninvnService; @Autowired - private DistributionDeliveryListMapper distributionDeliveryListMapper; + private DistributionDeliveryListMapper distributionDeliveryListMapper; @Autowired - private DistributionSignforServiceImpl distributionSignforService; + private DistributionSignforServiceImpl distributionSignforService; @Autowired - private DistributionSignforMapper distributionSignforMapper; + private DistributionSignforMapper distributionSignforMapper; @Autowired - private IDistributionSignforService distributionSignforServicer; + private IDistributionSignforService distributionSignforServicer; @Autowired - private DistributionStockArticleMapper distributionStockArticleMapper; + private DistributionStockArticleMapper distributionStockArticleMapper; @Autowired - private IDistributionStockArticleService distributionStockArticleService; + private IDistributionStockArticleService distributionStockArticleService; @Autowired - private DistributionSigndetailServiceImpl distributionSigndetailService; + private DistributionSigndetailServiceImpl distributionSigndetailService; @Autowired - private DistributionPackadeliServiceImpl distributionPackadeliService; + private DistributionPackadeliServiceImpl distributionPackadeliService; @Autowired - private DistributionDeliverySelfMapper distributionDeliverySelfMapper; + private DistributionDeliverySelfMapper distributionDeliverySelfMapper; @Autowired - private IDistributionDeliverySelfService distributionDeliverySelfService; + private IDistributionDeliverySelfService distributionDeliverySelfService; @Autowired - private DistributionDeliveryTripartiteMapper distributionDeliveryTripartiteMapper; + private DistributionDeliveryTripartiteMapper distributionDeliveryTripartiteMapper; @Autowired - private IDistributionDeliveryTripartiteService distributionDeliveryTripartiteService; + private IDistributionDeliveryTripartiteService distributionDeliveryTripartiteService; @Autowired - private DistributionReservationStockarticleMapper distributionReservationStockarticleMapper; + private DistributionReservationStockarticleMapper distributionReservationStockarticleMapper; @Autowired - private DistributionStockupMapper distributionStockupMapper; + private DistributionStockupMapper distributionStockupMapper; @Autowired - private IDistributionStockupInfoService distributionStockupInfoService; + private IDistributionStockupInfoService distributionStockupInfoService; @Autowired - private DistributionStockMapper distributionStockMapper; + private DistributionStockMapper distributionStockMapper; @Autowired - private DistributionLoadscaninvnMapper distributionLoadscaninvnMapper; + private DistributionLoadscaninvnMapper distributionLoadscaninvnMapper; @Autowired - private IDistributionAsyncService distributionAsyncService; + private IDistributionAsyncService distributionAsyncService; @Autowired - private IDictBizClient dictBizClient; + private IDictBizClient dictBizClient; @Autowired - private IBasicdataDriverArteryClient iBasicdataDriverArteryClient; + private IBasicdataDriverArteryClient iBasicdataDriverArteryClient; @Autowired - private IBasicdataWarehouseClient warehouseClient; + private IBasicdataWarehouseClient warehouseClient; @Autowired - private IDisStockListDetailService disStockListDetailService; + private IDisStockListDetailService disStockListDetailService; @Autowired - private DistributionStockListMapper distributionStockListMapper; + private DistributionStockListMapper distributionStockListMapper; @Autowired - private IDistributionStockListService distributionStockListService; + private IDistributionStockListService distributionStockListService; @Autowired - private IWarehouseUpdownTypeClient warehouseUpdownTypeClient; + private IWarehouseUpdownTypeClient warehouseUpdownTypeClient; @Autowired - private IBasicPrintTemplateClient basicPrintTemplateClient; + private IBasicPrintTemplateClient basicPrintTemplateClient; @Autowired - private IWarehouseTrayTypeClient warehouseTrayTypeClient; + private IWarehouseTrayTypeClient warehouseTrayTypeClient; @Autowired - private IDistributionLoadscanAbnormalService distributionLoadscanAbnormalService; + private IDistributionLoadscanAbnormalService distributionLoadscanAbnormalService; @Autowired - private IDistributionReservationZeroPackageService distributionReservationZeroPackageService; + private IDistributionReservationZeroPackageService distributionReservationZeroPackageService; @Autowired - private IDistributionParcelNumberService distributionParcelNumberService; + private IDistributionParcelNumberService distributionParcelNumberService; @Autowired - private IWarehouseTrayGoodsClient warehouseTrayGoodsClient; + private IWarehouseTrayGoodsClient warehouseTrayGoodsClient; @Autowired - private IWarehouseWaybillClient warehouseWaybillClient; + private IWarehouseWaybillClient warehouseWaybillClient; @Autowired - private BladeRedis bladeRedis; + private BladeRedis bladeRedis; @Autowired // 自提mapper - private DistrilbutionBillLadingMapper distrilbutionBillLadingMapper; + private DistrilbutionBillLadingMapper distrilbutionBillLadingMapper; @Autowired // 自提关联订单 - private DistrilbutionBillStockMapper distrilbutionBillStockMapper; + private DistrilbutionBillStockMapper distrilbutionBillStockMapper; // 自提关联包件 @Autowired - private DistrilbutionBillPackageMapper distrilbutionBillPackageMapper; + private DistrilbutionBillPackageMapper distrilbutionBillPackageMapper; @Autowired - private DistributionParcelListMapper distributionParcelListMapper; + private DistributionParcelListMapper distributionParcelListMapper; @Autowired - private DistributionDeliveryChargeMapper distributionDeliveryChargeMapper; + private DistributionDeliveryChargeMapper distributionDeliveryChargeMapper; @Autowired @Lazy @@ -223,6 +226,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl list = disStockListDetailService.list(Wrappers.query().lambda() .eq(DisStockListDetailEntity::getStockPackageCode, distrilbutionloadingscanDTO.getBarcode()) .ne(DisStockListDetailEntity::getStockPackageStatus, ReservationPackageStatusConstant.quxiao.getValue()) @@ -572,15 +578,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl map = new HashMap(); + String distrilbutionloadingscanDTOJson = JSONObject.toJSONString(distrilbutionloadingscanDTO); + map.put("distrilbutionloadingscanDTO",distrilbutionloadingscanDTOJson); + String parcelListEntityJson = JSONObject.toJSONString(parcelListEntity); + map.put("parcelListEntity",parcelListEntityJson); + map.put("myCurrentWarehouseId",myCurrentWarehouse.getId()); + String reservationEntityJson = JSONObject.toJSONString(reservationEntity); + map.put("reservationEntity",reservationEntityJson); + + + log.info(">>>>>>>>>>>>> 进入延迟队列处理包件相关信息状态"); + rabbitTemplate.convertAndSend(RabbitConstant.ORDER_PACKAGE_STATUS_INFO_EXCHANGE, RabbitConstant.ORDER_PACKAGE_STATUS_INFO_ROUTING, map, message -> { + message.getMessageProperties() + .setHeader("x-delay", 3000); + return message; + }); + + + extracteOrderPackageStatus(distrilbutionloadingscanDTO, parcelListEntity, myCurrentWarehouse, reservationEntity); + + + } else if (parcelListEntityList.isEmpty()) { //查找出该包件信息 DistributionParcelListEntity parcelListEntity = distributionParcelListService.getOne(Wrappers.query().lambda().eq(DistributionParcelListEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode())); List reservationEntityList = distributionDeliveryListMapper.selectReservationByDeliveryListId(distrilbutionloadingscanDTO.getDeliveryId()); @@ -669,9 +689,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl reservationEntities = reservationEntityList.stream().filter(r -> Func.isNotEmpty(r.getConsignee()) && r.getConsignee().equals(stockArticleEntity.getCustomerName()) && r.getDeliveryAddress().equals(stockArticleEntity.getCustomerAddress()) && r.getDeliveryPhone().equals(stockArticleEntity.getCustomerTelephone()) && r.getMallName().equals(stockArticleEntity.getMallName())).collect(Collectors.toList()); //查看是否存在满足条件的预约单 if (reservationEntities.size() == 1) { - if (Func.isEmpty(distrilbutionloadingscanDTO.getReservationId())){ + if (Func.isEmpty(distrilbutionloadingscanDTO.getReservationId())) { log.info("异常装车未指定客户"); - return Resp.scanFail("请指定客户进行异常装车","请指定客户进行异常装车"); + return Resp.scanFail("请指定客户进行异常装车", "请指定客户进行异常装车"); } return R.fail(5000, "异常装车"); // return Resp.scanFail("装车失败","程序出错,请联系彪桑"); @@ -691,9 +711,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl r.getReceivingUnit().equals(stockArticleEntity.getConsigneeUnit()) && r.getMallName().equals(stockArticleEntity.getMallName())); if (reservationEntities.size() == 1) { - if (Func.isEmpty(distrilbutionloadingscanDTO.getReservationId())){ + if (Func.isEmpty(distrilbutionloadingscanDTO.getReservationId())) { log.info("异常装车未指定客户"); - return Resp.scanFail("请指定客户进行异常装车","请指定客户进行异常装车"); + return Resp.scanFail("请指定客户进行异常装车", "请指定客户进行异常装车"); } return R.fail(5000, "异常装车"); } else { @@ -806,13 +826,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl { - List parcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(distrilbutionloadingscanDTO.getReservationId(), reservationStockarticleEntity.getStockArticleId(),myCurrentWarehouse.getId()); + List parcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(distrilbutionloadingscanDTO.getReservationId(), reservationStockarticleEntity.getStockArticleId(), myCurrentWarehouse.getId()); for (DistributionParcelListEntity parcelListEntity : parcelListEntities) { List packageLoadingScans = distributionLoadscanService.list(Wrappers.query().lambda().eq(DistributionLoadscanEntity::getReservationId, distrilbutionloadingscanDTO.getReservationId()).eq(DistributionLoadscanEntity::getOrderId, reservationStockarticleEntity.getStockArticleId()).eq(DistributionLoadscanEntity::getPackageId, parcelListEntity.getId()).ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())); - DistributionLoadscanEntity packageLoadingScan=null; - if(packageLoadingScans!=null&&!packageLoadingScans.isEmpty()){ - log.info(">>>>>>>>> 包件查询 的装车件数:{}",packageLoadingScans.size()); - packageLoadingScan = packageLoadingScans.get(0); + DistributionLoadscanEntity packageLoadingScan = null; + if (packageLoadingScans != null && !packageLoadingScans.isEmpty()) { + log.info(">>>>>>>>> 包件查询 的装车件数:{}", packageLoadingScans.size()); + packageLoadingScan = packageLoadingScans.get(0); } //无装车数据包件进行装车 if (Func.isEmpty(packageLoadingScan)) { @@ -1775,7 +1804,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl packageIds = updatePackageList.stream().map(DistributionParcelListEntity::getId).collect(Collectors.toList()); - if (Func.isNotEmpty(packageIds)){ + if (Func.isNotEmpty(packageIds)) { distributionParcelListMapper.updatePackageListByIds(packageIds); } } @@ -1804,8 +1833,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl deliveryIds = distributionDeliverySelfMapper.selectdeliveryList(driverArtery.getId()); if (!deliveryIds.isEmpty()) { - distributionAppDeliveryListVOS = baseMapper.selectDistributionAppDeliveryListPage(page, distributionAppDeliveryListDTO, deliveryIds,myCurrentWarehouse.getId()); + distributionAppDeliveryListVOS = baseMapper.selectDistributionAppDeliveryListPage(page, distributionAppDeliveryListDTO, deliveryIds, myCurrentWarehouse.getId()); } else { return page.setRecords(distributionAppDeliveryListVOS); } } else { - distributionAppDeliveryListVOS = baseMapper.selectDistributionAppDeliveryListPage(page, distributionAppDeliveryListDTO, null,myCurrentWarehouse.getId()); + distributionAppDeliveryListVOS = baseMapper.selectDistributionAppDeliveryListPage(page, distributionAppDeliveryListDTO, null, myCurrentWarehouse.getId()); } //转换字典字段 for (DistributionAppDeliveryListVO distributionAppDeliveryListVO : distributionAppDeliveryListVOS) { @@ -2450,7 +2477,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl getAppDeliveryreservationListPage( DistributionAppDeliveryListDTO distributionDeliveryList) { + public List getAppDeliveryreservationListPage(DistributionAppDeliveryListDTO distributionDeliveryList) { //查询客户 BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); List customList = distributionDeliveryInfoMapper.selectAppcustomListPage(distributionDeliveryList.getId()); @@ -2468,7 +2495,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl parcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(reservationStockarticleEntity.getReservationId(), reservationStockarticleEntity.getStockArticleId(),myCurrentWarehouse.getId()); + List parcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(reservationStockarticleEntity.getReservationId(), reservationStockarticleEntity.getStockArticleId(), myCurrentWarehouse.getId()); parcelListEntities.forEach(p -> { WarehouseTrayGoodsEntity warehouseTrayGoodsEntity = new WarehouseTrayGoodsEntity(); warehouseTrayGoodsEntity.setAssociationId(p.getId()); @@ -2589,15 +2616,15 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl loadscanEntityList = distributionLoadscanService.list(Wrappers.query().lambda() .eq(DistributionLoadscanEntity::getDeliveryId, deliveryListDTO.getId()) .ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()) ); - if (Func.isNotEmpty(loadscanEntityList) && loadscanEntityList.size() > 0){ - //此配送任务存在装车 无法进行司机切换 + if (Func.isNotEmpty(loadscanEntityList) && loadscanEntityList.size() > 0) { + //此配送任务存在装车 无法进行司机切换 log.error("配送任务存在装车数据,无法进行司机切换"); return R.fail("任务已装车联系司机滞留货物后进行司机切换..."); } @@ -2714,20 +2741,20 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl waybillIds = v.stream().map(DistributionStockArticleEntity::getWaybillId).distinct().collect(Collectors.toList()); List mallIds = v.stream().map(DistributionStockArticleEntity::getMallId).distinct().collect(Collectors.toList()); List storeIds = v.stream().map(DistributionStockArticleEntity::getStoreId).distinct().collect(Collectors.toList()); - if (Func.isNotEmpty(waybillNumbers)){ + if (Func.isNotEmpty(waybillNumbers)) { reservationEntity.setWaybillNo(waybillNumbers); } - if (Func.isNotEmpty(storeCodes)){ + if (Func.isNotEmpty(storeCodes)) { reservationEntity.setStoreName(storeCodes); } - if (Func.isNotEmpty(waybillIds)){ + if (Func.isNotEmpty(waybillIds)) { String w = waybillIds.stream().map(String::valueOf).collect(Collectors.joining(",")); reservationEntity.setWaybillId(w); } - if (Func.isNotEmpty(mallIds) && mallIds.size() == 1){ + if (Func.isNotEmpty(mallIds) && mallIds.size() == 1) { reservationEntity.setMallId(mallIds.get(0)); } - if (Func.isNotEmpty(storeIds) && storeIds.size() == 1){ + if (Func.isNotEmpty(storeIds) && storeIds.size() == 1) { reservationEntity.setStoreId(storeIds.get(0)); } reservationEntity.setStatus(1); @@ -2827,7 +2854,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl parcelNumberVOS = s.getParcelNumberVOS(); reservationStockarticleEntity.setIsZero(s.getIsZero()); @@ -3023,7 +3050,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl parcelNumberVOS = s.getParcelNumberVOS(); @@ -3250,7 +3277,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl { if (rs.getIsZero().equals(IsOrNoConstant.no.getValue())) { - List parcelListEntityList = distributionReservationMapper.selectPackageByReservationAndStockArticle(rs.getReservationId(), rs.getStockArticleId(),myCurrentWarehouse.getId()); + List parcelListEntityList = distributionReservationMapper.selectPackageByReservationAndStockArticle(rs.getReservationId(), rs.getStockArticleId(), myCurrentWarehouse.getId()); List packageLoadingList = distributionLoadscanService.list(Wrappers.query().lambda().eq(DistributionLoadscanEntity::getDeliveryId, distributionAppDeliveryListDTO.getId()).ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()).eq(DistributionLoadscanEntity::getReservationId, rs.getReservationId()).in(DistributionLoadscanEntity::getPackageId, parcelListEntityList.stream().map(DistributionParcelListEntity::getId).collect(Collectors.toList()))); if (Func.isNotEmpty(packageLoadingList)) { signNubSr.getAndAdd(packageLoadingList.stream().mapToInt(DistributionLoadscanEntity::getLoadedNub).sum()); @@ -3888,8 +3915,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl updateMarketDeliveryList(DistributionDeliveryListDTO deliveryListDTO) { BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); - if (Func.isEmpty(myCurrentWarehouse)){ - return R.fail(403,"未授权!!!"); + if (Func.isEmpty(myCurrentWarehouse)) { + return R.fail(403, "未授权!!!"); } @@ -3901,7 +3928,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl distributionReservationEntities = distributionReservationMapper.selectList(Wrappers.query().lambda().in(DistributionReservationEntity::getId, newReservationIds)); List needStockUpReservationList = distributionReservationEntities.stream().filter(r -> r.getStockupStatus().equals(ReservationStockupStatusConstant.weibeihuo.getValue())).collect(Collectors.toList()); DistributionStockupEntity stockupEntity = null; - if (Func.isNotEmpty(needStockUpReservationList)){ + if (Func.isNotEmpty(needStockUpReservationList)) { //需要进行备货的预约列表 stockupEntity = new DistributionStockupEntity(); stockupEntity.setAssignStatus(StockAssignStatusConstant.weizhipai.getValue()); @@ -3947,12 +3974,12 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl getPackageListByDeliverylistId(IPage page, Map distributionDeliveryInfoDTO) throws ParseException { - if (Func.isEmpty(distributionDeliveryInfoDTO.get("deliveryId"))){ + public List getPackageListByDeliverylistId(IPage page, Map distributionDeliveryInfoDTO) throws ParseException { + if (Func.isEmpty(distributionDeliveryInfoDTO.get("deliveryId"))) { log.info("参数缺失deliveryId"); return null; } - Long deliveryId = Long.parseLong((String) distributionDeliveryInfoDTO.get("deliveryId")) ; + Long deliveryId = Long.parseLong((String) distributionDeliveryInfoDTO.get("deliveryId")); //查询零担订单包件 // List parcelNumberVOS = baseMapper.getZeroPackageListByDeliveryId(distributionDeliveryInfoDTO.getDeliveryId()); List deliveryStockArticleInfo = baseMapper.getDeliveryStockArticleInfo(deliveryId); @@ -4094,117 +4121,115 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl distributionParcelListVOS = new ArrayList<>(); - if (Func.isNotEmpty(reservationStockarticleEntityList)){ - List orderIds = reservationStockarticleEntityList.stream().filter(order -> order.getIsZero().equals(IsOrNoConstant.no.getValue())).map(DistributionReservationStockarticleEntity::getStockArticleId).collect(Collectors.toList()); - if (Func.isNotEmpty(orderIds)){ - //查询该客户的非零但订单包间 - List parcelListEntityList = distributionReservationMapper.getReservationPackage(orderIds,distributionDeliveryInfoDTO); - List parcelListVOList = DistributionParcelListWrapper.build().listVO(parcelListEntityList); - for (DistributionParcelListVO distributionParcelListVO : parcelListVOList) { - if (Func.isNotEmpty(loadingDataMap)) { - DistributionLoadscanEntity loadscanEntity = loadingDataMap.get(distributionParcelListVO.getId()); - if (Func.isNotEmpty(loadscanEntity)) { - if (loadscanEntity.getSignforState().equals(LoadScanSigningStatusConstant.yiqianshou.getValue())) { - distributionParcelListVO.setSigningNub(loadscanEntity.getReceivedQuantity()); - } - if (Func.isNotEmpty(loadscanEntity.getSigningTime())) { - distributionParcelListVO.setSigningTime(loadscanEntity.getSigningTime()); - } - if (Func.isNotEmpty(loadscanEntity.getScanUser())) { - distributionParcelListVO.setScanUser(loadscanEntity.getScanUser()); - } - if (Func.isNotEmpty(loadscanEntity.getDriverName())) { - distributionParcelListVO.setDriverName(loadscanEntity.getDriverName()); - } - if (Func.isNotEmpty(loadscanEntity.getLoadedNub())) { - distributionParcelListVO.setLoadingNub(loadscanEntity.getLoadedNub()); - } - if (Func.isNotEmpty(loadscanEntity.getScanTime())) { - distributionParcelListVO.setLoadingTime(loadscanEntity.getScanTime()); - } - if (Func.isNotEmpty(loadscanEntity.getSigningUser())) { - distributionParcelListVO.setSigningUser(loadscanEntity.getSigningUser()); - } - if (Func.isNotEmpty(loadscanEntity.getScanStatus())) { - switch (loadscanEntity.getScanStatus()) { - case "1": - distributionParcelListVO.setScanStatus(LoadingStatusConstant.quxiao.getName()); - break; - case "2": - distributionParcelListVO.setScanStatus(LoadingStatusConstant.saomiao.getName()); - break; - case "3": - distributionParcelListVO.setScanStatus(LoadingStatusConstant.quxiao.getName()); - break; - case "4": - distributionParcelListVO.setScanStatus(LoadingStatusConstant.yijianzhuangche.getName()); - break; - } - distributionParcelListVO.setLoadingNub(loadscanEntity.getLoadedNub()); - } + if (Func.isNotEmpty(reservationStockarticleEntityList)) { + List orderIds = reservationStockarticleEntityList.stream().filter(order -> order.getIsZero().equals(IsOrNoConstant.no.getValue())).map(DistributionReservationStockarticleEntity::getStockArticleId).collect(Collectors.toList()); + if (Func.isNotEmpty(orderIds)) { + //查询该客户的非零但订单包间 + List parcelListEntityList = distributionReservationMapper.getReservationPackage(orderIds, distributionDeliveryInfoDTO); + List parcelListVOList = DistributionParcelListWrapper.build().listVO(parcelListEntityList); + for (DistributionParcelListVO distributionParcelListVO : parcelListVOList) { + if (Func.isNotEmpty(loadingDataMap)) { + DistributionLoadscanEntity loadscanEntity = loadingDataMap.get(distributionParcelListVO.getId()); + if (Func.isNotEmpty(loadscanEntity)) { + if (loadscanEntity.getSignforState().equals(LoadScanSigningStatusConstant.yiqianshou.getValue())) { + distributionParcelListVO.setSigningNub(loadscanEntity.getReceivedQuantity()); + } + if (Func.isNotEmpty(loadscanEntity.getSigningTime())) { + distributionParcelListVO.setSigningTime(loadscanEntity.getSigningTime()); + } + if (Func.isNotEmpty(loadscanEntity.getScanUser())) { + distributionParcelListVO.setScanUser(loadscanEntity.getScanUser()); + } + if (Func.isNotEmpty(loadscanEntity.getDriverName())) { + distributionParcelListVO.setDriverName(loadscanEntity.getDriverName()); + } + if (Func.isNotEmpty(loadscanEntity.getLoadedNub())) { + distributionParcelListVO.setLoadingNub(loadscanEntity.getLoadedNub()); + } + if (Func.isNotEmpty(loadscanEntity.getScanTime())) { + distributionParcelListVO.setLoadingTime(loadscanEntity.getScanTime()); + } + if (Func.isNotEmpty(loadscanEntity.getSigningUser())) { + distributionParcelListVO.setSigningUser(loadscanEntity.getSigningUser()); + } + if (Func.isNotEmpty(loadscanEntity.getScanStatus())) { + switch (loadscanEntity.getScanStatus()) { + case "1": + distributionParcelListVO.setScanStatus(LoadingStatusConstant.quxiao.getName()); + break; + case "2": + distributionParcelListVO.setScanStatus(LoadingStatusConstant.saomiao.getName()); + break; + case "3": + distributionParcelListVO.setScanStatus(LoadingStatusConstant.quxiao.getName()); + break; + case "4": + distributionParcelListVO.setScanStatus(LoadingStatusConstant.yijianzhuangche.getName()); + break; } + distributionParcelListVO.setLoadingNub(loadscanEntity.getLoadedNub()); } - distributionParcelListVOS.add(distributionParcelListVO); } - } - List zeroOrderIds = reservationStockarticleEntityList.stream().filter(order -> order.getIsZero().equals(IsOrNoConstant.yes.getValue())).map(DistributionReservationStockarticleEntity::getStockArticleId).collect(Collectors.toList()); - if (Func.isNotEmpty(zeroOrderIds)){ - //查询该客户的零但订单包间 - List zeroParcelListEntityList = baseMapper.getZeroPackageListByDeliveryId(deliveryId, zeroOrderIds); - List zeroParcelListVOList = DistributionParcelListWrapper.build().listVO(zeroParcelListEntityList); - for (DistributionParcelListVO parcelListVO : zeroParcelListVOList) { - if (Func.isNotEmpty(loadingDataMap)) { - DistributionLoadscanEntity loadscanEntity = loadingDataMap.get(parcelListVO.getId()); - if (Func.isNotEmpty(loadscanEntity)) { - if (Func.isNotEmpty(loadscanEntity.getSigningTime())) { - parcelListVO.setSigningTime(loadscanEntity.getSigningTime()); - } - if (Func.isNotEmpty(loadscanEntity.getScanUser())) { - parcelListVO.setScanUser(loadscanEntity.getScanUser()); - } - if (Func.isNotEmpty(loadscanEntity.getDriverName())) { - parcelListVO.setDriverName(loadscanEntity.getDriverName()); - } - if (Func.isNotEmpty(loadscanEntity.getLoadedNub())) { - parcelListVO.setLoadingNub(loadscanEntity.getLoadedNub()); - } - if (loadscanEntity.getSignforState().equals(LoadScanSigningStatusConstant.yiqianshou.getValue())) { - parcelListVO.setSigningNub(loadscanEntity.getReceivedQuantity()); - } - if (Func.isNotEmpty(loadscanEntity.getScanStatus())) { - switch (loadscanEntity.getScanStatus()) { - case "1": - parcelListVO.setScanStatus(LoadingStatusConstant.quxiao.getName()); - break; - case "2": - parcelListVO.setScanStatus(LoadingStatusConstant.saomiao.getName()); - break; - case "3": - parcelListVO.setScanStatus(LoadingStatusConstant.quxiao.getName()); - break; - case "4": - parcelListVO.setScanStatus(LoadingStatusConstant.yijianzhuangche.getName()); - break; - case "5": - parcelListVO.setScanStatus(LoadingStatusConstant.buluzhuangche.getName()); - break; - } - parcelListVO.setLoadingNub(loadscanEntity.getLoadedNub()); - } + distributionParcelListVOS.add(distributionParcelListVO); + } + + } + List zeroOrderIds = reservationStockarticleEntityList.stream().filter(order -> order.getIsZero().equals(IsOrNoConstant.yes.getValue())).map(DistributionReservationStockarticleEntity::getStockArticleId).collect(Collectors.toList()); + if (Func.isNotEmpty(zeroOrderIds)) { + //查询该客户的零但订单包间 + List zeroParcelListEntityList = baseMapper.getZeroPackageListByDeliveryId(deliveryId, zeroOrderIds); + List zeroParcelListVOList = DistributionParcelListWrapper.build().listVO(zeroParcelListEntityList); + for (DistributionParcelListVO parcelListVO : zeroParcelListVOList) { + if (Func.isNotEmpty(loadingDataMap)) { + DistributionLoadscanEntity loadscanEntity = loadingDataMap.get(parcelListVO.getId()); + if (Func.isNotEmpty(loadscanEntity)) { + if (Func.isNotEmpty(loadscanEntity.getSigningTime())) { + parcelListVO.setSigningTime(loadscanEntity.getSigningTime()); + } + if (Func.isNotEmpty(loadscanEntity.getScanUser())) { + parcelListVO.setScanUser(loadscanEntity.getScanUser()); + } + if (Func.isNotEmpty(loadscanEntity.getDriverName())) { + parcelListVO.setDriverName(loadscanEntity.getDriverName()); + } + if (Func.isNotEmpty(loadscanEntity.getLoadedNub())) { + parcelListVO.setLoadingNub(loadscanEntity.getLoadedNub()); + } + if (loadscanEntity.getSignforState().equals(LoadScanSigningStatusConstant.yiqianshou.getValue())) { + parcelListVO.setSigningNub(loadscanEntity.getReceivedQuantity()); + } + if (Func.isNotEmpty(loadscanEntity.getScanStatus())) { + switch (loadscanEntity.getScanStatus()) { + case "1": + parcelListVO.setScanStatus(LoadingStatusConstant.quxiao.getName()); + break; + case "2": + parcelListVO.setScanStatus(LoadingStatusConstant.saomiao.getName()); + break; + case "3": + parcelListVO.setScanStatus(LoadingStatusConstant.quxiao.getName()); + break; + case "4": + parcelListVO.setScanStatus(LoadingStatusConstant.yijianzhuangche.getName()); + break; + case "5": + parcelListVO.setScanStatus(LoadingStatusConstant.buluzhuangche.getName()); + break; } + parcelListVO.setLoadingNub(loadscanEntity.getLoadedNub()); } - distributionParcelListVOS.add(parcelListVO); } } - }else { + distributionParcelListVOS.add(parcelListVO); + } + } + } else { //可能出现配送任务下的所有客户都是库存品 - log.info("#############此配送任务下无订单信息,deliveryId:{}",deliveryId); + log.info("#############此配送任务下无订单信息,deliveryId:{}", deliveryId); } - - // for (DistributionReservationStockarticleEntity reservationStockarticleEntity : reservationStockarticleEntityList) { // if (reservationStockarticleEntity.getIsZero().equals(IsOrNoConstant.no.getValue())) { // List parcelListEntityList = distributionReservationMapper.getReservationPackage(reservationStockarticleEntity.getReservationId(), reservationStockarticleEntity.getStockArticleId(),distributionDeliveryInfoDTO); @@ -4311,8 +4336,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl selectDiscussStockArticleInfoList(Map params, Query query, Long deliveryListId) { IPage page = Condition.getPage(query); @@ -4499,13 +4522,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl selectDistributionDeliveryinventory(IPage page,Map distributionInventoryDTO) { - if (Func.isEmpty(distributionInventoryDTO.get("deliveryId"))){ + public List selectDistributionDeliveryinventory(IPage page, Map distributionInventoryDTO) { + if (Func.isEmpty(distributionInventoryDTO.get("deliveryId"))) { log.info("#####查询配送计划库存品列表deliveryId缺失"); return null; } Long deliveryId = Long.parseLong(distributionInventoryDTO.get("deliveryId").toString()); - List distributionStockListEntities = baseMapper.getInventoryByDeliveryId(page, deliveryId,distributionInventoryDTO); + List distributionStockListEntities = baseMapper.getInventoryByDeliveryId(page, deliveryId, distributionInventoryDTO); distributionStockListEntities.forEach(rs -> { List list = distributionLoadscaninvnService.list(Wrappers.query().lambda().eq(DistributionLoadscaninvnEntity::getInventoryId, rs.getStocklistId()).eq(DistributionLoadscaninvnEntity::getReservationId, rs.getReservationId()).eq(DistributionLoadscaninvnEntity::getDeliveryId, deliveryId).ne(DistributionLoadscaninvnEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())); rs.setLoadedinNumber(0); @@ -4614,10 +4637,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl>>>> printBatch 市配 {}",ids); + log.info(">>>>> printBatch 市配 {}", ids); return handleShiPeiData(template, idArray, html); } else if (1 == type) { - log.info(">>>>> printBatch 商配 {}",ids); + log.info(">>>>> printBatch 商配 {}", ids); return handleShangPeiData(template.getId(), idArray, html); } else if (3 == type) { @@ -5172,7 +5195,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl>>>>>>>>>>>>>>:{}",retentionScanVo.getOrderPackageCode()); - return Resp.scanFail(retentionScanVo.getOrderPackageCode()+"已签收", "此包件已签收"); + if (retentionScanVo.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue())) { + log.error("滞留扫描出现签收包件>>>>>>>>>>>>>>>:{}", retentionScanVo.getOrderPackageCode()); + return Resp.scanFail(retentionScanVo.getOrderPackageCode() + "已签收", "此包件已签收"); } retentionScanVo.setScanType(3); retentionScanVos.add(retentionScanVo); @@ -5725,7 +5748,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl getClientDetail(IPage page, Map distributionReservationDTO) { - if (Func.isEmpty(distributionReservationDTO.get("deliveryId"))){ + if (Func.isEmpty(distributionReservationDTO.get("deliveryId"))) { log.info("############获取客户详情失败,deliveryId为空"); return null; } - Long deliveryId = Long.parseLong((String)distributionReservationDTO.get("deliveryId")); - List customList = distributionDeliveryInfoMapper.selectClientList(deliveryId,distributionReservationDTO); + Long deliveryId = Long.parseLong((String) distributionReservationDTO.get("deliveryId")); + List customList = distributionDeliveryInfoMapper.selectClientList(deliveryId, distributionReservationDTO); if (!customList.isEmpty()) { customList.forEach(c -> { if (Func.isNotEmpty(c.getLoadingStatus())) { @@ -6369,7 +6392,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 订单总数 {}",distributionReservationStockarticleEntityList.size()); + log.info(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 订单总数 {}", distributionReservationStockarticleEntityList.size()); // 取值 for (DistributionReservationStockarticleEntity distributionReservationStockarticleEntity : distributionReservationStockarticleEntityList) { @@ -6410,9 +6433,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 库存品总数 {}",distributionReservationStocklistEntities.size()); + log.info(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 库存品总数 {}", distributionReservationStocklistEntities.size()); if (distributionReservationStocklistEntities.isEmpty()) { @@ -6480,17 +6503,17 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl tes = new HashSet<>(); - if(!list.isEmpty()){ + if (!list.isEmpty()) { StringBuffer str = new StringBuffer(); for (DistributionParcelListEntity distributionParcelListEntity : list) { - if(ObjectUtils.isNotNull(distributionParcelListEntity.getMaterialUnit())){ + if (ObjectUtils.isNotNull(distributionParcelListEntity.getMaterialUnit())) { tes.add(distributionParcelListEntity.getMaterialUnit()); } } for (String te : tes) { - if(!str.toString().isEmpty()){ + if (!str.toString().isEmpty()) { str.append(","); } str.append(te); @@ -6498,7 +6521,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl iPage= baseMapper.getShippingInformation(page,distributionDeliveryInfoDTO); - if(!iPage.getRecords().isEmpty()){ - iPage.getRecords().forEach( i ->{ - if("1".equals(i.getKind())){ + IPage iPage = baseMapper.getShippingInformation(page, distributionDeliveryInfoDTO); + if (!iPage.getRecords().isEmpty()) { + iPage.getRecords().forEach(i -> { + if ("1".equals(i.getKind())) { //自主 //查询司机信息 List distributionDeliverySelfEntities = distributionDeliverySelfMapper.selectList(Wrappers.query().lambda() .eq(DistributionDeliverySelfEntity::getDeliveryId, i.getId()) ); - if(!distributionDeliverySelfEntities.isEmpty()){ + if (!distributionDeliverySelfEntities.isEmpty()) { String collect = distributionDeliverySelfEntities.stream().map(DistributionDeliverySelfEntity::getDriverName).collect(Collectors.joining(",")); i.setDriverName(collect); } - }else{ + } else { //三方 List list = distributionDeliveryTripartiteService.list(Wrappers.query().lambda() .eq(DistributionDeliveryTripartiteEntity::getDeliveryId, i.getId()) ); - if(!list.isEmpty()){ + if (!list.isEmpty()) { String collect = list.stream().map(DistributionDeliveryTripartiteEntity::getDriverName).collect(Collectors.joining(",")); i.setDriverName(collect); } @@ -6646,9 +6668,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl loadingOrderMap = loadscanEntityList.stream().collect(Collectors.toMap(DistributionLoadscanEntity::getOrderId, Function.identity(), (k1, k2) -> k2)); - if (Func.isNotEmpty(loadingOrderMap.get(orderId))){ + if (Func.isNotEmpty(loadingOrderMap.get(orderId))) { return false; } } @@ -6658,9 +6680,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl distributionReservationEntities = baseMapper.selectReservationByDeliveryListId(deliveryId); - if (Func.isNotEmpty(distributionReservationEntities)){ + if (Func.isNotEmpty(distributionReservationEntities)) { int packageNum = distributionReservationEntities.stream().mapToInt(DistributionReservationEntity::getReservationNum).sum(); int inventoryNum = distributionReservationEntities.stream().mapToInt(DistributionReservationEntity::getReservationStockListNum).sum(); deliveryListEntity.setDeliveryNumber(packageNum); @@ -6675,13 +6697,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl