|
|
|
@ -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<TrunklineCarsL
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
try{ |
|
|
|
|
distributionParcelListClient.updatePackageStatus(orderPackageCodes, warehouseId, "60"); |
|
|
|
|
|
|
|
|
|
List<List<String>> 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<TrunklineCarsL
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
@Override |
|
|
|
|
public R signLoadScanByIds(List<Long> loadScanIds, Long warehouseId) { |
|
|
|
|
|
|
|
|
@ -7405,7 +7352,15 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
updateById(carsLoadEntity); |
|
|
|
|
|
|
|
|
|
//包件签收状态修改
|
|
|
|
|
distributionParcelListClient.updatePackageStatus(orderPackageCodes, warehouseId, "70"); |
|
|
|
|
//把orderPackageCodes每500条拆分
|
|
|
|
|
List<List<String>> 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); |
|
|
|
|
|
|
|
|
|