diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/dto/UpdatePackageDTO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/dto/UpdatePackageDTO.java new file mode 100644 index 000000000..45b58cfac --- /dev/null +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/dto/UpdatePackageDTO.java @@ -0,0 +1,17 @@ +package com.logpm.distribution.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +@Data +public class UpdatePackageDTO implements Serializable { + + private List orderPackageCodes; + + private Long warehouseId; + + private String packageStatus; + +} diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java index cf83f0164..f6163bc71 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java @@ -19,6 +19,7 @@ package com.logpm.distribution.feign; import com.alibaba.fastjson.JSONObject; import com.logpm.distribution.dto.FindParamterDTO; import com.logpm.distribution.dto.OrderPackageDTO; +import com.logpm.distribution.dto.UpdatePackageDTO; import com.logpm.distribution.entity.DistributionParcelListEntity; import com.logpm.distribution.vo.DistributionParcelListVO; import com.logpm.distribution.vo.UpdateOrderDTO; @@ -193,7 +194,7 @@ public interface IDistributionParcelListClient { List findAllStockListByOrderPackageCode(String orderPackageCode); @PostMapping(API_PREFIX + "/updatePackageStatus") - void updatePackageStatus(@RequestParam List orderPackageCodes, @RequestParam Long warehouseId, @RequestParam String packageStatus); + void updatePackageStatus(@RequestBody UpdatePackageDTO updatePackageDTO); @PostMapping(API_PREFIX + "/updateList") void updateList(@RequestBody List updateParcelList); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java index d9cc09f20..aa4887bae 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java @@ -27,6 +27,7 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.logpm.distribution.dto.FindParamterDTO; import com.logpm.distribution.dto.OrderPackageDTO; +import com.logpm.distribution.dto.UpdatePackageDTO; import com.logpm.distribution.entity.DistributionParcelListEntity; import com.logpm.distribution.entity.DistributionParcelNumberEntity; import com.logpm.distribution.entity.DistributionStockArticleEntity; @@ -376,13 +377,14 @@ public class DistributionParcelListClient implements IDistributionParcelListClie } @Override - public void updatePackageStatus(List orderPackageCodes, Long warehouseId, String packageStatus) { + public void updatePackageStatus(UpdatePackageDTO updatePackageDTO) { + + List orderPackageCodes = updatePackageDTO.getOrderPackageCodes(); + Long warehouseId = updatePackageDTO.getWarehouseId(); + String packageStatus = updatePackageDTO.getPackageStatus(); + + distributionParcelListService.updatePackageStatus(orderPackageCodes, warehouseId, packageStatus); - //把orderPackageCodes每500条进行分组 - List> orderPackageCodeList = CollUtil.split(orderPackageCodes, 500); - orderPackageCodeList.forEach(orderPackageCodeList1 -> { - distributionParcelListService.updatePackageStatus(orderPackageCodeList1, warehouseId, packageStatus); - }); List list = distributionParcelListService.findListByOrderPackageCode(orderPackageCodes, warehouseId); //把list中的orderCode放入一个set diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java index ea23548c5..64d108e9e 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java @@ -1,6 +1,7 @@ package com.logpm.trunkline.service.impl; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.collection.ListUtil; import cn.hutool.core.date.DateUtil; import cn.hutool.core.exceptions.ExceptionUtil; import cn.hutool.core.util.IdUtil; @@ -9,6 +10,7 @@ import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import cn.hutool.json.JSONUtil; import com.alibaba.fastjson.JSONObject; +import com.alibaba.nacos.shaded.com.google.common.collect.Lists; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -23,6 +25,7 @@ import com.logpm.basicdata.feign.IBasicdataDriverArteryClient; import com.logpm.basicdata.feign.IBasicdataTrayClient; import com.logpm.basicdata.feign.IBasicdataWarehouseClient; import com.logpm.distribution.dto.FindParamterDTO; +import com.logpm.distribution.dto.UpdatePackageDTO; import com.logpm.distribution.entity.DistributionParcelListEntity; import com.logpm.distribution.entity.DistributionParcelNumberEntity; import com.logpm.distribution.entity.DistributionStockArticleEntity; @@ -37,61 +40,11 @@ import com.logpm.factorydata.util.FactoryDataMessageSender; import com.logpm.factorydata.vo.NodePushMsg; import com.logpm.factorydata.vo.PushData; import com.logpm.trunkline.bean.Resp; -import com.logpm.trunkline.dto.BatchUnloadDTO; -import com.logpm.trunkline.dto.InComingDTO; -import com.logpm.trunkline.dto.LoadCarsDTO; -import com.logpm.trunkline.dto.LoadScanBrandDTO; -import com.logpm.trunkline.dto.LoadingPackageDTO; -import com.logpm.trunkline.dto.LoadingZeroDTO; -import com.logpm.trunkline.dto.OrderStatusDTO; -import com.logpm.trunkline.dto.ProductInfoDTO; -import com.logpm.trunkline.dto.TrunklineCarsLoadDTO; -import com.logpm.trunkline.dto.TrunklineCarsLoadLineDTO; -import com.logpm.trunkline.dto.TrunklineCarsOrderDTO; -import com.logpm.trunkline.dto.UnloadPackageDTO; -import com.logpm.trunkline.dto.UnloadZeroDTO; -import com.logpm.trunkline.dto.WaybillLogDTO; -import com.logpm.trunkline.dto.ZeroPackageDTO; -import com.logpm.trunkline.entity.TrunklineAdvanceDetailEntity; -import com.logpm.trunkline.entity.TrunklineCarsLoadContractEntity; -import com.logpm.trunkline.entity.TrunklineCarsLoadEntity; -import com.logpm.trunkline.entity.TrunklineCarsLoadFinanceEntity; -import com.logpm.trunkline.entity.TrunklineCarsLoadLineEntity; -import com.logpm.trunkline.entity.TrunklineCarsLoadLinePhotoEntity; -import com.logpm.trunkline.entity.TrunklineCarsLoadLogEntity; -import com.logpm.trunkline.entity.TrunklineCarsLoadScanEntity; -import com.logpm.trunkline.entity.TrunklineCarsOrderEntity; -import com.logpm.trunkline.entity.TrunklineCarsUnloadLogEntity; -import com.logpm.trunkline.entity.TrunklineCostShareRecordEntity; -import com.logpm.trunkline.entity.TrunklineLoadSignOrderEntity; -import com.logpm.trunkline.entity.TrunklineLoadSignPhotoEntity; -import com.logpm.trunkline.entity.TrunklineScanZeroDetailEntity; -import com.logpm.trunkline.entity.TrunklineWaybillOrderEntity; +import com.logpm.trunkline.dto.*; +import com.logpm.trunkline.entity.*; import com.logpm.trunkline.feign.ITrunklinePackageTrackLogClient; import com.logpm.trunkline.mapper.TrunklineCarsLoadMapper; -import com.logpm.trunkline.service.ICarsLoadAsyncService; -import com.logpm.trunkline.service.IInComingService; -import com.logpm.trunkline.service.IOpenOrderAsyncService; -import com.logpm.trunkline.service.IPackageTrackLogAsyncService; -import com.logpm.trunkline.service.ITrunklineAdvanceDetailService; -import com.logpm.trunkline.service.ITrunklineCarsLoadContractService; -import com.logpm.trunkline.service.ITrunklineCarsLoadFinanceService; -import com.logpm.trunkline.service.ITrunklineCarsLoadLinePhotoService; -import com.logpm.trunkline.service.ITrunklineCarsLoadLineService; -import com.logpm.trunkline.service.ITrunklineCarsLoadLogService; -import com.logpm.trunkline.service.ITrunklineCarsLoadScanService; -import com.logpm.trunkline.service.ITrunklineCarsLoadService; -import com.logpm.trunkline.service.ITrunklineCarsLoadingLogService; -import com.logpm.trunkline.service.ITrunklineCarsOrderService; -import com.logpm.trunkline.service.ITrunklineCarsSignLogService; -import com.logpm.trunkline.service.ITrunklineCarsUnloadLogService; -import com.logpm.trunkline.service.ITrunklineCostShareRecordService; -import com.logpm.trunkline.service.ITrunklineLoadSignOrderService; -import com.logpm.trunkline.service.ITrunklineLoadSignPhotoService; -import com.logpm.trunkline.service.ITrunklineScanZeroDetailService; -import com.logpm.trunkline.service.ITrunklineWaybillOrderService; -import com.logpm.trunkline.service.ITrunklineWaybillPackageService; -import com.logpm.trunkline.service.ITrunklineWaybillTrackService; +import com.logpm.trunkline.service.*; import com.logpm.trunkline.vo.*; import com.logpm.warehouse.entity.WarehousePackageTrackLogEntity; import com.logpm.warehouse.entity.WarehouseTrayTypeEntity; @@ -106,11 +59,7 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang.StringUtils; import org.springblade.common.annotations.RepeatSubmit; -import org.springblade.common.constant.CodeNumConstant; -import org.springblade.common.constant.DictBizConstant; -import org.springblade.common.constant.IncomingTypeEnum; -import org.springblade.common.constant.RabbitConstant; -import org.springblade.common.constant.WorkNodeEnums; +import org.springblade.common.constant.*; import org.springblade.common.constant.carsload.CarsLoadLogTypeConstant; import org.springblade.common.exception.CustomerException; import org.springblade.common.utils.CommonUtil; @@ -130,18 +79,7 @@ import org.springframework.transaction.annotation.Transactional; import java.math.BigDecimal; import java.math.RoundingMode; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -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.TreeSet; +import java.util.*; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Function; import java.util.stream.Collectors; @@ -7220,7 +7158,15 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl> partition = Lists.partition(orderPackageCodes, 500); + partition.forEach(list -> { + UpdatePackageDTO updatePackageDTO = new UpdatePackageDTO(); + updatePackageDTO.setOrderPackageCodes(list); + updatePackageDTO.setWarehouseId(warehouseId); + updatePackageDTO.setPackageStatus("70"); + distributionParcelListClient.updatePackageStatus(updatePackageDTO); + }); }catch (Exception e){ log.error("更新状态失败",e); throw new CustomerException("更新状态失败"); @@ -7345,6 +7291,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl loadScanIds, Long warehouseId) { @@ -7405,7 +7352,15 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl> partition = ListUtil.partition(orderPackageCodes, 500); + partition.forEach(list -> { + UpdatePackageDTO updatePackageDTO = new UpdatePackageDTO(); + updatePackageDTO.setOrderPackageCodes(list); + updatePackageDTO.setWarehouseId(warehouseId); + updatePackageDTO.setPackageStatus("70"); + distributionParcelListClient.updatePackageStatus(updatePackageDTO); + }); waybillPackageService.updatePackageStatus(orderPackageCodes, WorkNodeEnums.SIGN_TRIPARTITE_TRANSFER_DEPART.getCode(),warehouseId, null);