diff --git a/blade-service/logpm-business/src/main/resources/logback.xml b/blade-service/logpm-business/src/main/resources/logback.xml index 3c54a2c7f..5bef9e9bd 100644 --- a/blade-service/logpm-business/src/main/resources/logback.xml +++ b/blade-service/logpm-business/src/main/resources/logback.xml @@ -2,7 +2,7 @@ logback - + 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 16b4c55b7..071d3f7ff 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 @@ -39,126 +39,17 @@ import com.logpm.basicdata.entity.BasicdataWarehouseEntity; import com.logpm.basicdata.feign.IBasicdataDriverArteryClient; import com.logpm.basicdata.feign.IBasicdataWarehouseClient; import com.logpm.distribution.bean.Resp; -import com.logpm.distribution.dto.DistributionCancelReservationPackageDTO; -import com.logpm.distribution.dto.DistributionDeliveryExcelDTO; -import com.logpm.distribution.dto.DistributionDeliveryListDTO; -import com.logpm.distribution.dto.DistributionDeliverySelfDTO; -import com.logpm.distribution.dto.DistributionDeliveryTripartiteDTO; -import com.logpm.distribution.dto.DistributionLoadingNumDTO; -import com.logpm.distribution.dto.DistributionParcelListDTO; -import com.logpm.distribution.dto.DistributionParcelNumberDTO; -import com.logpm.distribution.dto.DistributionReservationDTO; -import com.logpm.distribution.dto.DistributionStockArticleDTO; -import com.logpm.distribution.dto.DistributionStockupDTO; -import com.logpm.distribution.dto.PushNotificationDTO; +import com.logpm.distribution.dto.*; import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO; import com.logpm.distribution.dto.app.DistrilbutionloadingscanDTO; -import com.logpm.distribution.entity.DisStockListDetailEntity; -import com.logpm.distribution.entity.DistributionBillLadingScanEntity; -import com.logpm.distribution.entity.DistributionDeliveryChargeEntity; -import com.logpm.distribution.entity.DistributionDeliveryDetailsEntity; -import com.logpm.distribution.entity.DistributionDeliveryListEntity; -import com.logpm.distribution.entity.DistributionDeliverySelfEntity; -import com.logpm.distribution.entity.DistributionDeliveryTripartiteEntity; -import com.logpm.distribution.entity.DistributionLoadscanAbnormalEntity; -import com.logpm.distribution.entity.DistributionLoadscanEntity; -import com.logpm.distribution.entity.DistributionLoadscaninvnEntity; -import com.logpm.distribution.entity.DistributionPackadeliEntity; -import com.logpm.distribution.entity.DistributionParcelListEntity; -import com.logpm.distribution.entity.DistributionParcelNumberEntity; -import com.logpm.distribution.entity.DistributionPlanLogEntity; -import com.logpm.distribution.entity.DistributionReservationEntity; -import com.logpm.distribution.entity.DistributionReservationPackageEntity; -import com.logpm.distribution.entity.DistributionReservationStockarticleEntity; -import com.logpm.distribution.entity.DistributionReservationStocklistEntity; -import com.logpm.distribution.entity.DistributionReservationZeroPackageEntity; -import com.logpm.distribution.entity.DistributionRetentionScanEntity; -import com.logpm.distribution.entity.DistributionSigndetailEntity; -import com.logpm.distribution.entity.DistributionSignforEntity; -import com.logpm.distribution.entity.DistributionStockArticleEntity; -import com.logpm.distribution.entity.DistributionStockEntity; -import com.logpm.distribution.entity.DistributionStockListEntity; -import com.logpm.distribution.entity.DistributionStockupEntity; -import com.logpm.distribution.entity.DistributionStockupInfoEntity; -import com.logpm.distribution.entity.DistrilbutionBillLadingEntity; -import com.logpm.distribution.entity.DistrilbutionBillPackageEntity; -import com.logpm.distribution.entity.DistrilbutionBillStockEntity; +import com.logpm.distribution.entity.*; import com.logpm.distribution.excel.DistributionDeliveryListExcel; -import com.logpm.distribution.mapper.DistributionDeliveryChargeMapper; -import com.logpm.distribution.mapper.DistributionDeliveryInfoMapper; -import com.logpm.distribution.mapper.DistributionDeliveryListMapper; -import com.logpm.distribution.mapper.DistributionDeliverySelfMapper; -import com.logpm.distribution.mapper.DistributionDeliveryTripartiteMapper; -import com.logpm.distribution.mapper.DistributionLoadscanMapper; -import com.logpm.distribution.mapper.DistributionLoadscaninvnMapper; -import com.logpm.distribution.mapper.DistributionParcelListMapper; -import com.logpm.distribution.mapper.DistributionReservationMapper; -import com.logpm.distribution.mapper.DistributionReservationPackageMapper; -import com.logpm.distribution.mapper.DistributionReservationStockarticleMapper; -import com.logpm.distribution.mapper.DistributionSignforMapper; -import com.logpm.distribution.mapper.DistributionStockArticleMapper; -import com.logpm.distribution.mapper.DistributionStockListMapper; -import com.logpm.distribution.mapper.DistributionStockMapper; -import com.logpm.distribution.mapper.DistributionStockupMapper; -import com.logpm.distribution.mapper.DistrilbutionBillLadingMapper; -import com.logpm.distribution.mapper.DistrilbutionBillPackageMapper; -import com.logpm.distribution.mapper.DistrilbutionBillStockMapper; -import com.logpm.distribution.service.IDisStockListDetailService; -import com.logpm.distribution.service.IDistributionAsyncService; -import com.logpm.distribution.service.IDistributionBillLadingScanService; -import com.logpm.distribution.service.IDistributionDeliveryDetailsService; -import com.logpm.distribution.service.IDistributionDeliveryListService; -import com.logpm.distribution.service.IDistributionDeliverySelfService; -import com.logpm.distribution.service.IDistributionDeliveryTripartiteService; -import com.logpm.distribution.service.IDistributionLoadscanAbnormalService; -import com.logpm.distribution.service.IDistributionNodeWorkService; -import com.logpm.distribution.service.IDistributionParcelListService; -import com.logpm.distribution.service.IDistributionParcelNumberService; -import com.logpm.distribution.service.IDistributionPlanLogService; -import com.logpm.distribution.service.IDistributionReservationPackageService; -import com.logpm.distribution.service.IDistributionReservationService; -import com.logpm.distribution.service.IDistributionReservationStockarticleService; -import com.logpm.distribution.service.IDistributionReservationStocklistService; -import com.logpm.distribution.service.IDistributionReservationZeroPackageService; -import com.logpm.distribution.service.IDistributionSignforService; -import com.logpm.distribution.service.IDistributionStockArticleService; -import com.logpm.distribution.service.IDistributionStockListService; -import com.logpm.distribution.service.IDistributionStockupInfoService; -import com.logpm.distribution.vo.DisStockListDetailVO; -import com.logpm.distribution.vo.DistributionDeliveryInfoVO; -import com.logpm.distribution.vo.DistributionDeliveryListPrintReponseVO; -import com.logpm.distribution.vo.DistributionDeliveryListPrintRequestVO; -import com.logpm.distribution.vo.DistributionDeliveryListVO; -import com.logpm.distribution.vo.DistributionDeliverySelfVO; -import com.logpm.distribution.vo.DistributionDeliveryTripartiteVO; -import com.logpm.distribution.vo.DistributionDeliveryWordVO; -import com.logpm.distribution.vo.DistributionOrderInfoVO; -import com.logpm.distribution.vo.DistributionParcelListVO; -import com.logpm.distribution.vo.DistributionParcelNumberVO; -import com.logpm.distribution.vo.DistributionReservationOrderPackageVO; -import com.logpm.distribution.vo.DistributionReservationStocklistVO; -import com.logpm.distribution.vo.DistributionRetentionScanVo; -import com.logpm.distribution.vo.DistributionStockArticleVO; -import com.logpm.distribution.vo.DistributionStockListVO; -import com.logpm.distribution.vo.DistributionStockupVO; -import com.logpm.distribution.vo.DistributionTrayRetentionVO; -import com.logpm.distribution.vo.DistributionstatisticsnmbVO; -import com.logpm.distribution.vo.app.DistributionAppDeliveryListVO; -import com.logpm.distribution.vo.app.DistributionAppDeliverySelfVO; -import com.logpm.distribution.vo.app.DistributionAppDetailVO; -import com.logpm.distribution.vo.app.DistributionAppNewDeliveryListVO; -import com.logpm.distribution.vo.app.DistributionAppNewReservationVO; -import com.logpm.distribution.vo.app.DistributionAppParcelListVO; -import com.logpm.distribution.vo.app.DistributionAppReservationVO; -import com.logpm.distribution.vo.app.DistributionAppStockArticleVO; -import com.logpm.distribution.vo.app.DistributionAppStockListVO; -import com.logpm.distribution.vo.app.DistributionRetentionScanVO; +import com.logpm.distribution.mapper.*; +import com.logpm.distribution.service.*; +import com.logpm.distribution.vo.*; +import com.logpm.distribution.vo.app.*; import com.logpm.distribution.vo.print.PrintPreviewVO; -import com.logpm.distribution.wrapper.DistributionDeliveryListWrapper; -import com.logpm.distribution.wrapper.DistributionDisStockListWrapper; -import com.logpm.distribution.wrapper.DistributionParcelListWrapper; -import com.logpm.distribution.wrapper.DistributionReservationWrapper; -import com.logpm.distribution.wrapper.DistributionStockArticleWrapper; +import com.logpm.distribution.wrapper.*; import com.logpm.factorydata.enums.BrandEnums; import com.logpm.factorydata.util.FactoryDataMessageSender; import com.logpm.factorydata.vo.NodePushMsg; @@ -168,13 +59,7 @@ import com.logpm.warehouse.entity.WarehouseConfigEntity; import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; import com.logpm.warehouse.entity.WarehouseTrayGoodsEntity; import com.logpm.warehouse.entity.WarehouseWaybillEntity; -import com.logpm.warehouse.feign.IWarehouseConfigClient; -import com.logpm.warehouse.feign.IWarehouseRetentionScanClient; -import com.logpm.warehouse.feign.IWarehouseTrayGoodsClient; -import com.logpm.warehouse.feign.IWarehouseTrayTypeClient; -import com.logpm.warehouse.feign.IWarehouseUpdownStockUpAreaClient; -import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient; -import com.logpm.warehouse.feign.IWarehouseWaybillClient; +import com.logpm.warehouse.feign.*; import com.logpm.warehouse.vo.TrayTypeDataVO; import lombok.extern.log4j.Log4j2; import org.apache.commons.lang.StringUtils; @@ -192,27 +77,10 @@ import org.springblade.common.constant.common.IsOrNoConstant; import org.springblade.common.constant.delivery.DeliveryLoadingStatusConstant; import org.springblade.common.constant.delivery.DeliveryStartStatusConstant; import org.springblade.common.constant.delivery.DeliveryStatusConstant; -import org.springblade.common.constant.loading.LoadScanSigningStatusConstant; -import org.springblade.common.constant.loading.LoadScanSigningTypeStatusConstant; -import org.springblade.common.constant.loading.LoadingAbnormalAuditingStatusConstant; -import org.springblade.common.constant.loading.LoadingAbnormalTypeConstant; -import org.springblade.common.constant.loading.LoadingIsInsertConstant; -import org.springblade.common.constant.loading.LoadingStatusConstant; -import org.springblade.common.constant.order.OrderStatusConstant; -import org.springblade.common.constant.orderpackage.OrderPackageFreezeStatusConstant; -import org.springblade.common.constant.orderpackage.OrderPackageGroundingStatusConstant; -import org.springblade.common.constant.orderpackage.OrderPackageLoadingStatusConstant; -import org.springblade.common.constant.orderpackage.OrderPackageReservationStatusConstant; -import org.springblade.common.constant.orderpackage.OrderPackageStatusConstant; -import org.springblade.common.constant.orderpackage.OrderPackageStockupStatusConstant; +import org.springblade.common.constant.loading.*; +import org.springblade.common.constant.orderpackage.*; import org.springblade.common.constant.printTemplate.PrintTemplateStatusConstant; -import org.springblade.common.constant.reservation.ReservationInventoryStatusConstant; -import org.springblade.common.constant.reservation.ReservationLoadingStatusConstant; -import org.springblade.common.constant.reservation.ReservationOrderStatusConstant; -import org.springblade.common.constant.reservation.ReservationPackageStatusConstant; -import org.springblade.common.constant.reservation.ReservationSigningStatusConstant; -import org.springblade.common.constant.reservation.ReservationStatusConstant; -import org.springblade.common.constant.reservation.ReservationStockupStatusConstant; +import org.springblade.common.constant.reservation.*; import org.springblade.common.constant.retention.RetentionSourceTypeConstant; import org.springblade.common.constant.signing.SignforStatusConstant; import org.springblade.common.constant.stockup.StockAssignStatusConstant; @@ -220,13 +88,7 @@ import org.springblade.common.constant.stockup.StockupStatusConstant; import org.springblade.common.enums.BizOperationEnums; import org.springblade.common.enums.PackageTypeEnums; import org.springblade.common.exception.CustomerException; -import org.springblade.common.model.CarStartVO; -import org.springblade.common.model.DistributionLoadVO; -import org.springblade.common.model.DistributionTaskVO; -import org.springblade.common.model.NodeFanoutMsg; -import org.springblade.common.model.PackageData; -import org.springblade.common.model.PlanDriverbindCarVO; -import org.springblade.common.model.ReservationVO; +import org.springblade.common.model.*; import org.springblade.common.model.workNode.FinishDistributionTrainVO; import org.springblade.common.serviceConstant.ServiceConstant; import org.springblade.common.utils.CommonUtil; @@ -263,17 +125,7 @@ import java.time.LocalDate; import java.time.YearMonth; import java.time.format.DateTimeFormatter; import java.time.temporal.ChronoUnit; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Date; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; +import java.util.*; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Function; import java.util.stream.Collectors; @@ -1274,8 +1126,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildNodeFanoutMsgByPackage(deliveryListEntity, pushNodeList); - distributionNodeWorkService.nodeLoading(nodeFanoutMsg, AuthUtil.getUser()); + } if (CollUtil.isNotEmpty(pushList)) { @@ -1325,8 +1176,30 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl pushNodeList){ + // 提供预约单 + Map> collect = pushNodeList.stream().collect(Collectors.groupingBy(DistributionLoadscanEntity::getReservationId)); + if(collect.isEmpty()){ + return ; + } + Set keys = collect.keySet(); + for (Long key : keys) { + List list = collect.get(key); + DistributionReservationEntity reservationEntity = distributionReservationMapper.selectById(key); + NodeFanoutMsg nodeFanoutMsg = buildNodeFanoutMsgByPackageByReservationCode(distributionDeliveryListEntity, list, reservationEntity.getReservationCode()); + distributionNodeWorkService.nodeLoading(nodeFanoutMsg, AuthUtil.getUser()); + } + + } + - private NodeFanoutMsg buildNodeFanoutMsgByPackage(DistributionDeliveryListEntity distributionDeliveryListEntity, List pushNodeList) { + + private NodeFanoutMsg buildNodeFanoutMsgByPackageByReservationCode(DistributionDeliveryListEntity distributionDeliveryListEntity, List pushNodeList,String reservationCode) { NodeFanoutMsg nodeFanoutMsg = new NodeFanoutMsg(); nodeFanoutMsg.setBizOperation(BizOperationEnums.ADD); nodeFanoutMsg.setNode(WorkNodeEnums.DISTRIBUTION_LOADING); @@ -1337,6 +1210,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl planDriverbindCarVOS = buildDeliveryCarDriverInfor(distributionDeliveryListEntity); @@ -1444,7 +1318,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl buildNodeFanoutMsgByStock(DistributionDeliveryListEntity distributionDeliveryListEntity, List ts) { + private NodeFanoutMsg buildNodeFanoutMsgByStock(DistributionDeliveryListEntity distributionDeliveryListEntity, List ts,String reservationCode) { NodeFanoutMsg nodeFanoutMsg = new NodeFanoutMsg(); nodeFanoutMsg.setBizOperation(BizOperationEnums.ADD); nodeFanoutMsg.setNode(WorkNodeEnums.DISTRIBUTION_LOADING); @@ -1456,7 +1330,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl planDriverbindCarVOS = buildDeliveryCarDriverInfor(distributionDeliveryListEntity); String driverName = distributionDeliveryListEntity.getDriverName(); @@ -1514,33 +1388,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl map = new HashMap<>(); - map.put("orderPackageCode", parcelListEntity.getOrderPackageCode()); - map.put("warehouseId", myCurrentWarehouse.getId()); - //包件配送下架 - warehouseUpdownTypeClient.downDeliveryPackage(map); - //维护订单的信息 - distributionStockArticleService.maintenanceOrderInfo(parcelListEntity.getOrderCode(), myCurrentWarehouse.getId()); - //维护预约的信息 - distributionReservationService.maintenanceReservationInfo(reservationEntity.getId()); - //维护配送任务信息 - distributionDeliveryListService.maintenanceDeliveryInfo(distrilbutionloadingscanDTO.getDeliveryId()); - } + private Integer getCarLaodNum(Long deliveryId) { @@ -1561,65 +1410,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImplquery().lambda().eq(DistributionDeliveryListEntity::getId, deliveryId)); - List parcelListEntityList = distributionParcelListService.getBaseMapper().selectList(Wrappers.query().lambda().eq(DistributionParcelListEntity::getStockArticleId, parcelListEntity.getStockArticleId())); - boolean flag = parcelListEntityList.stream().allMatch(p -> p.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.yizhuangche.getValue())); - DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(parcelListEntity.getStockArticleId()); - //维护包件、订单扫描装车状态 - if (flag) { - stockArticleEntity.setOrderStatus(OrderStatusConstant.chuku.getValue()); - } else { - flag = parcelListEntityList.stream().allMatch(p -> p.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.weizhuancghe.getValue())); - if (flag) { - stockArticleEntity.setOrderStatus(OrderStatusConstant.ruku.getValue()); - } else { - stockArticleEntity.setOrderStatus(OrderStatusConstant.bufenchuku.getValue()); - } - } - distributionStockArticleService.updateById(stockArticleEntity); - //维护包件、预约的扫描状态 - //查询出配送任务下的所有包件 - List deliveryParcelListEntityList = distributionDeliveryListMapper.selectPackageListByDeliveryListId(deliveryId); - boolean deliveryLoadingFlag = deliveryParcelListEntityList.stream().allMatch(p -> p.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.yizhuangche.getValue())); - if (deliveryLoadingFlag) { - deliveryListEntity.setDeliveryListLoadingStatus(DeliveryLoadingStatusConstant.yizhuangche.getValue()); - } else { - deliveryLoadingFlag = deliveryParcelListEntityList.stream().allMatch(p -> p.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.weizhuancghe.getValue())); - if (deliveryLoadingFlag) { - deliveryListEntity.setDeliveryListLoadingStatus(DeliveryLoadingStatusConstant.weizhuangche.getValue()); - } else { - deliveryListEntity.setDeliveryListLoadingStatus(DeliveryLoadingStatusConstant.bunfenzhuangche.getValue()); - } - } - distributionDeliveryListMapper.updateById(deliveryListEntity); - List reservationEntityList = distributionDeliveryListMapper.selectReservationByDeliveryListId(deliveryId); - reservationEntityList.forEach(r -> { - //查询预约下的所有包件信息 - List parcelListEntities = distributionReservationMapper.selectPackageListByReservationId(r.getId()); - boolean reservationLoadingFlag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.yizhuangche.getValue())); - if (reservationLoadingFlag) { - r.setLoadingStatus(ReservationLoadingStatusConstant.yizhuangche.getValue()); - } else { - reservationLoadingFlag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.weizhuancghe.getValue())); - if (reservationLoadingFlag) { - r.setLoadingStatus(ReservationLoadingStatusConstant.daizhuangche.getValue()); - } else { - r.setLoadingStatus(ReservationLoadingStatusConstant.bufenzhuangche.getValue()); - } - } - distributionReservationMapper.updateById(r); - }); - } - - @Override @Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class) public R loadingack(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) { @@ -2036,26 +1826,41 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildNodeFanoutMsgByPackage(deliveryList, dingzhis); - distributionNodeWorkService.nodeLoading(nodeFanoutMsg, AuthUtil.getUser()); + sendBuildNodeFanoutMsgByPackage(deliveryList, dingzhis); } + // 发库存 if(Func.isNotEmpty(kucuns)){ - NodeFanoutMsg nodeFanoutMsg = buildNodeFanoutMsgByStock(deliveryList, kucuns); - distributionNodeWorkService.nodeLoading(nodeFanoutMsg, AuthUtil.getUser()); + sendBuildNodeFanoutMsgByStock(deliveryList, kucuns); } + //发零担 if(Func.isNotEmpty(lingdans)){ - NodeFanoutMsg nodeFanoutMsg = buildNodeFanoutMsgByZeroOrder(deliveryList, lingdans); - distributionNodeWorkService.nodeLoading(nodeFanoutMsg, AuthUtil.getUser()); + sendBuildNodeFanoutMsgByZeroOrder(deliveryList,lingdans); } + return Resp.scanSuccess("操作成功", "装车成功"); + } + private void sendBuildNodeFanoutMsgByStock(DistributionDeliveryListEntity distributionDeliveryListEntity, List ts){ + Map> collect = ts.stream().collect(Collectors.groupingBy(DistributionLoadscaninvnEntity::getReservationId)); + + if(collect.isEmpty()){ + return; + } + Set keys = collect.keySet(); + for (Long key : keys) { + List list = collect.get(key); + DistributionReservationEntity reservationEntity = distributionReservationMapper.selectById(key); + + NodeFanoutMsg nodeFanoutMsg = buildNodeFanoutMsgByStock(distributionDeliveryListEntity, list,reservationEntity.getReservationCode()); + distributionNodeWorkService.nodeLoading(nodeFanoutMsg, AuthUtil.getUser()); + } - return Resp.scanSuccess("操作成功", "装车成功"); } + @Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class) @Override public R oneack(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) { @@ -2268,9 +2073,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildNodeFanoutMsgByStock(distributionDeliveryListEntity, ts); - distributionNodeWorkService.nodeLoading(nodeFanoutMsg, AuthUtil.getUser()); + sendBuildNodeFanoutMsgByStock(distributionDeliveryListEntity,ts); String msg = getLoadingMsg(distrilbutionloadingscanDTO); return Resp.scanSuccess("扫描成功", msg); } @@ -6291,8 +6094,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildNodeFanoutMsgByPackage(deliveryListEntity, pushNodeList); - distributionNodeWorkService.abnormalLoading(nodeFanoutMsg, AuthUtil.getUser()); + sendBuildNodeFanoutMsgByPackage(deliveryListEntity, pushNodeList); } return Resp.scanSuccess("操作成功", "异常" + abnormalTotal + "件"); } @@ -6672,15 +6474,30 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildNodeFanoutMsgByZeroOrder(deliveryListEntity, pushNodeList); - distributionNodeWorkService.nodeLoading(nodeFanoutMsg, AuthUtil.getUser()); + sendBuildNodeFanoutMsgByZeroOrder(deliveryListEntity, pushNodeList); } - return Resp.scanSuccess("装车成功", str.toString()); } - private NodeFanoutMsg buildNodeFanoutMsgByZeroOrder(DistributionDeliveryListEntity distributionDeliveryListEntity, List pushNodeList) { + + private void sendBuildNodeFanoutMsgByZeroOrder(DistributionDeliveryListEntity distributionDeliveryListEntity, List pushNodeList){ + Map> collect = pushNodeList.stream().collect(Collectors.groupingBy(DistributionLoadscanEntity::getReservationId)); + + if(collect.isEmpty()){ + return; + } + Set keys = collect.keySet(); + for (Long key : keys) { + List list = collect.get(key); + DistributionReservationEntity reservationEntity = distributionReservationMapper.selectById(key); + NodeFanoutMsg nodeFanoutMsg = buildNodeFanoutMsgByZeroOrderByReservationCode(distributionDeliveryListEntity, list,reservationEntity.getReservationCode()); + distributionNodeWorkService.nodeLoading(nodeFanoutMsg, AuthUtil.getUser()); + } + } + + + private NodeFanoutMsg buildNodeFanoutMsgByZeroOrderByReservationCode(DistributionDeliveryListEntity distributionDeliveryListEntity, List pushNodeList,String reservationCode) { NodeFanoutMsg nodeFanoutMsg = new NodeFanoutMsg(); nodeFanoutMsg.setBizOperation(BizOperationEnums.ADD); nodeFanoutMsg.setNode(WorkNodeEnums.DISTRIBUTION_LOADING); @@ -6689,10 +6506,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl planDriverbindCarVOS = buildDeliveryCarDriverInfor(distributionDeliveryListEntity); String driverName = distributionDeliveryListEntity.getDriverName(); @@ -9423,8 +9238,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildNodeFanoutMsgByStock(deliveryListEntity, ts); - distributionNodeWorkService.nodeLoading(nodeFanoutMsg, AuthUtil.getUser()); + sendBuildNodeFanoutMsgByStock(deliveryListEntity,ts); } break; case 4: @@ -9581,8 +9395,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildNodeFanoutMsgByPackage(deliveryListEntity, pushNodeList); - distributionNodeWorkService.nodeLoading(nodeFanoutMsg, AuthUtil.getUser()); + sendBuildNodeFanoutMsgByPackage(deliveryListEntity, pushNodeList); } //维护订单数量 if (!orderCodes.isEmpty()) { diff --git a/blade-service/logpm-factory-data/logpm-factory-data-base/src/main/resources/logback.xml b/blade-service/logpm-factory-data/logpm-factory-data-base/src/main/resources/logback.xml index 7170050de..bca8681a8 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-base/src/main/resources/logback.xml +++ b/blade-service/logpm-factory-data/logpm-factory-data-base/src/main/resources/logback.xml @@ -2,7 +2,7 @@ logback - + diff --git a/blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/resources/logback.xml b/blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/resources/logback.xml index 7170050de..eba64295f 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/resources/logback.xml +++ b/blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/resources/logback.xml @@ -2,7 +2,7 @@ logback - + diff --git a/blade-service/logpm-factory-data/logpm-factory-data-linsy/src/main/resources/logback.xml b/blade-service/logpm-factory-data/logpm-factory-data-linsy/src/main/resources/logback.xml index 7170050de..dcfc033fe 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-linsy/src/main/resources/logback.xml +++ b/blade-service/logpm-factory-data/logpm-factory-data-linsy/src/main/resources/logback.xml @@ -2,7 +2,7 @@ logback - + diff --git a/blade-service/logpm-factory-data/logpm-factory-data-mengtian/src/main/resources/logback.xml b/blade-service/logpm-factory-data/logpm-factory-data-mengtian/src/main/resources/logback.xml index 7170050de..882a7ade9 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-mengtian/src/main/resources/logback.xml +++ b/blade-service/logpm-factory-data/logpm-factory-data-mengtian/src/main/resources/logback.xml @@ -2,7 +2,7 @@ logback - + diff --git a/blade-service/logpm-factory-data/logpm-factory-data-mwh/src/main/resources/logback.xml b/blade-service/logpm-factory-data/logpm-factory-data-mwh/src/main/resources/logback.xml index 7170050de..16bed9057 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-mwh/src/main/resources/logback.xml +++ b/blade-service/logpm-factory-data/logpm-factory-data-mwh/src/main/resources/logback.xml @@ -2,7 +2,7 @@ logback - + diff --git a/blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/resources/logback.xml b/blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/resources/logback.xml index 7170050de..987a3d537 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/resources/logback.xml +++ b/blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/resources/logback.xml @@ -2,7 +2,7 @@ logback - + diff --git a/blade-service/logpm-factory-data/logpm-factory-data-oupai/src/main/resources/logback.xml b/blade-service/logpm-factory-data/logpm-factory-data-oupai/src/main/resources/logback.xml index 7170050de..533a38efe 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-oupai/src/main/resources/logback.xml +++ b/blade-service/logpm-factory-data/logpm-factory-data-oupai/src/main/resources/logback.xml @@ -2,7 +2,7 @@ logback - + diff --git a/blade-service/logpm-factory-data/logpm-factory-data-pan/src/main/resources/logback.xml b/blade-service/logpm-factory-data/logpm-factory-data-pan/src/main/resources/logback.xml index 7170050de..00670bdf9 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-pan/src/main/resources/logback.xml +++ b/blade-service/logpm-factory-data/logpm-factory-data-pan/src/main/resources/logback.xml @@ -2,7 +2,7 @@ logback - + diff --git a/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/resources/logback.xml b/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/resources/logback.xml index 7170050de..222bcd196 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/resources/logback.xml +++ b/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/resources/logback.xml @@ -2,7 +2,7 @@ logback - + diff --git a/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/resources/logback.xml b/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/resources/logback.xml index 7170050de..b65622b6c 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/resources/logback.xml +++ b/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/resources/logback.xml @@ -2,7 +2,7 @@ logback - + diff --git a/blade-service/logpm-patch/src/main/resources/logback.xml b/blade-service/logpm-patch/src/main/resources/logback.xml index 056bad7fb..2e82e83f8 100644 --- a/blade-service/logpm-patch/src/main/resources/logback.xml +++ b/blade-service/logpm-patch/src/main/resources/logback.xml @@ -2,7 +2,7 @@ logback - + diff --git a/blade-service/logpm-report/src/main/resources/logback.xml b/blade-service/logpm-report/src/main/resources/logback.xml index 7170050de..8a9abba69 100644 --- a/blade-service/logpm-report/src/main/resources/logback.xml +++ b/blade-service/logpm-report/src/main/resources/logback.xml @@ -2,7 +2,7 @@ logback - + diff --git a/blade-service/logpm-statisticsdata/src/main/resources/logback.xml b/blade-service/logpm-statisticsdata/src/main/resources/logback.xml index a77f8e1e2..2cbaf4657 100644 --- a/blade-service/logpm-statisticsdata/src/main/resources/logback.xml +++ b/blade-service/logpm-statisticsdata/src/main/resources/logback.xml @@ -2,7 +2,7 @@ logback - + diff --git a/blade-service/logpm-supervise/src/main/resources/logback.xml b/blade-service/logpm-supervise/src/main/resources/logback.xml index 7170050de..c0bd9bb96 100644 --- a/blade-service/logpm-supervise/src/main/resources/logback.xml +++ b/blade-service/logpm-supervise/src/main/resources/logback.xml @@ -2,7 +2,7 @@ logback - +