|
|
|
@ -27,69 +27,11 @@ import com.logpm.factorydata.enums.NodeEnums;
|
|
|
|
|
import com.logpm.factorydata.util.FactoryDataMessageSender; |
|
|
|
|
import com.logpm.factorydata.vo.NodePushMsg; |
|
|
|
|
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.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.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.TrunklineCarsLoadLogEntity; |
|
|
|
|
import com.logpm.trunkline.entity.TrunklineCarsLoadScanEntity; |
|
|
|
|
import com.logpm.trunkline.entity.TrunklineCarsOrderEntity; |
|
|
|
|
import com.logpm.trunkline.entity.TrunklineCostShareRecordEntity; |
|
|
|
|
import com.logpm.trunkline.entity.TrunklineLoadSignOrderEntity; |
|
|
|
|
import com.logpm.trunkline.dto.*; |
|
|
|
|
import com.logpm.trunkline.entity.*; |
|
|
|
|
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.ITrunklineAdvanceDetailService; |
|
|
|
|
import com.logpm.trunkline.service.ITrunklineCarsLoadContractService; |
|
|
|
|
import com.logpm.trunkline.service.ITrunklineCarsLoadFinanceService; |
|
|
|
|
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.ITrunklineWaybillOrderService; |
|
|
|
|
import com.logpm.trunkline.vo.CarsLoadAllOrderVO; |
|
|
|
|
import com.logpm.trunkline.vo.CarsLoadOrderInfoVO; |
|
|
|
|
import com.logpm.trunkline.vo.CarsLoadWaybillInfoVO; |
|
|
|
|
import com.logpm.trunkline.vo.HasNotFinalNodeIdDataVO; |
|
|
|
|
import com.logpm.trunkline.vo.LoadScanFinalNodeIdVO; |
|
|
|
|
import com.logpm.trunkline.vo.LoadScanOrderVO; |
|
|
|
|
import com.logpm.trunkline.vo.LoadZeroListVO; |
|
|
|
|
import com.logpm.trunkline.vo.LoadingListGoodsVO; |
|
|
|
|
import com.logpm.trunkline.vo.LoadingListMainVO; |
|
|
|
|
import com.logpm.trunkline.vo.NodeNumDataVO; |
|
|
|
|
import com.logpm.trunkline.vo.OrderScanDetailVO; |
|
|
|
|
import com.logpm.trunkline.vo.SignOrderDetailVO; |
|
|
|
|
import com.logpm.trunkline.vo.SignPackageVO; |
|
|
|
|
import com.logpm.trunkline.vo.SignScanOrderVO; |
|
|
|
|
import com.logpm.trunkline.vo.TripartiteTransferVO; |
|
|
|
|
import com.logpm.trunkline.vo.TrunklineCarsLoadLoadingListVO; |
|
|
|
|
import com.logpm.trunkline.vo.TrunklineCarsLoadScanVO; |
|
|
|
|
import com.logpm.trunkline.vo.TrunklineCarsLoadVO; |
|
|
|
|
import com.logpm.trunkline.vo.TrunklineLoadSignOrderVO; |
|
|
|
|
import com.logpm.trunkline.vo.UnloadPackageVO; |
|
|
|
|
import com.logpm.trunkline.vo.UnloadScanOrderVO; |
|
|
|
|
import com.logpm.trunkline.vo.UnloadZeroVO; |
|
|
|
|
import com.logpm.trunkline.vo.ZeroSuppleVO; |
|
|
|
|
import com.logpm.trunkline.service.*; |
|
|
|
|
import com.logpm.trunkline.vo.*; |
|
|
|
|
import com.logpm.warehouse.entity.WarehouseWayBillDetail; |
|
|
|
|
import com.logpm.warehouse.entity.WarehouseWaybillEntity; |
|
|
|
|
import com.logpm.warehouse.feign.IWarehouseTrayTypeClient; |
|
|
|
@ -99,9 +41,7 @@ import com.logpm.warehouse.feign.IWarehouseWaybillDetailClient;
|
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.apache.commons.lang.StringEscapeUtils; |
|
|
|
|
import org.springblade.common.constant.CodeNumConstant; |
|
|
|
|
import org.springblade.common.constant.DictBizConstant; |
|
|
|
|
import org.springblade.common.constant.RabbitConstant; |
|
|
|
|
import org.springblade.common.constant.*; |
|
|
|
|
import org.springblade.common.constant.carsload.CarsLoadLogTypeConstant; |
|
|
|
|
import org.springblade.common.exception.CustomerException; |
|
|
|
|
import org.springblade.common.utils.CommonUtil; |
|
|
|
@ -119,14 +59,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.Date; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
import java.util.Objects; |
|
|
|
|
import java.util.Set; |
|
|
|
|
import java.util.TreeSet; |
|
|
|
|
import java.util.*; |
|
|
|
|
|
|
|
|
|
@Slf4j |
|
|
|
|
@Service |
|
|
|
@ -164,6 +97,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
private final ITrunklineCostShareRecordService trunklineCostShareRecordService; |
|
|
|
|
private final IAftersalesAbnormalRecordClient abnormalRecordClient; |
|
|
|
|
private final FactoryDataMessageSender factoryDataMessageSender; |
|
|
|
|
private final IPackageTrackLogAsyncService packageTrackLogAsyncService; |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public IPage<TrunklineCarsLoadVO> loadCarsPageList(LoadCarsDTO loadCarsDTO) { |
|
|
|
@ -215,6 +149,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
Long warehouseId = loadCarsDTO.getWarehouseId(); |
|
|
|
|
String fullLoadRate = loadCarsDTO.getFullLoadRate(); |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
|
if(Objects.isNull(warehouseEntity)){ |
|
|
|
|
log.warn("#############startCarByLoadId: 仓库信息不存在 warehouseId={}", warehouseId); |
|
|
|
|
throw new CustomerException(400, "仓库信息不存在"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//先查询车辆配载计划
|
|
|
|
|
TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId); |
|
|
|
|
if (Objects.isNull(carsLoadEntity)) { |
|
|
|
@ -280,6 +220,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
openOrderAsyncService.saveStartCarLog(carsLoadLineEntity, AuthUtil.getNickName(), AuthUtil.getUserId()); |
|
|
|
|
|
|
|
|
|
List<String> orderPackageCodes = trunklineCarsLoadScanService.findPackageListByLoadId(loadId); |
|
|
|
|
|
|
|
|
|
String content = "包件在 "+warehouseEntity.getName()+"起始仓发车"; |
|
|
|
|
packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseEntity.getName(), WorkNodeEnums.INITIAL_WAREHOUSE_DEPART.getCode(),content ); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.warn("############startCarByLoadId: 存入日志失败"); |
|
|
|
@ -357,6 +301,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
carsLoadAsyncService.saveLog(carsLoadEntity, currentCarsLoadLineEntity, CarsLoadLogTypeConstant.NET_START_CARS_LOAD.getValue(), AuthUtil.getNickName(), AuthUtil.getUserId()); |
|
|
|
|
|
|
|
|
|
openOrderAsyncService.saveStartCarLog(currentCarsLoadLineEntity, AuthUtil.getNickName(), AuthUtil.getUserId()); |
|
|
|
|
|
|
|
|
|
List<String> orderPackageCodes = trunklineCarsLoadScanService.findPackageListByLoadId(loadId); |
|
|
|
|
|
|
|
|
|
String content = "包件在 "+warehouseEntity.getName()+"网点发车"; |
|
|
|
|
packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseEntity.getName(), WorkNodeEnums.TRANSFER_WAREHOUSE_DEPART.getCode(),content ); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.warn("############startCarByLoadId: 存入日志失败"); |
|
|
|
|
} |
|
|
|
@ -377,7 +326,6 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
// 发送消息推送工厂数据
|
|
|
|
|
try { |
|
|
|
|
// 查询详细地址为仓库的地址
|
|
|
|
|
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(nowWarehouseId); |
|
|
|
|
String warehouseAddress = null; |
|
|
|
|
if (ObjectUtil.isNotEmpty(warehouseEntity)) { |
|
|
|
|
warehouseAddress = "从【" + warehouseEntity.getName() + "】发出"; |
|
|
|
@ -454,6 +402,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
Long loadId = loadCarsDTO.getLoadId(); |
|
|
|
|
Long warehouseId = loadCarsDTO.getWarehouseId(); |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
|
if(Objects.isNull(warehouseEntity)){ |
|
|
|
|
log.warn("#############arriveCarByLoadId: 仓库信息不存在 warehouseId={}", warehouseId); |
|
|
|
|
throw new CustomerException(400, "仓库信息不存在"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId); |
|
|
|
|
if (Objects.isNull(carsLoadEntity)) { |
|
|
|
|
log.warn("#############arriveCarByLoadId: 配载计划不存在 loadId={}", loadId); |
|
|
|
@ -504,15 +458,17 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
nextCarsLoadLineEntity.setArriveUserId(AuthUtil.getUserId()); |
|
|
|
|
nextCarsLoadLineEntity.setArriveUserName(AuthUtil.getUserName()); |
|
|
|
|
trunklineCarsLoadLineService.updateById(nextCarsLoadLineEntity); |
|
|
|
|
|
|
|
|
|
Integer workNode = null; |
|
|
|
|
if (!nodeId.equals(endNodeId)) { |
|
|
|
|
carsLoadEntity.setLoadStatus("20"); |
|
|
|
|
carsLoadEntity.setArriveTime(date); |
|
|
|
|
carsLoadEntity.setNowWarehouseId(warehouseId); |
|
|
|
|
workNode = WorkNodeEnums.NET_ARRIVE_CAR.getCode(); |
|
|
|
|
} else { |
|
|
|
|
carsLoadEntity.setLoadStatus("40"); |
|
|
|
|
carsLoadEntity.setArriveTime(date); |
|
|
|
|
carsLoadEntity.setNowWarehouseId(warehouseId); |
|
|
|
|
workNode = WorkNodeEnums.FINAL_NET_ARRIVE_CAR.getCode(); |
|
|
|
|
} |
|
|
|
|
updateById(carsLoadEntity); |
|
|
|
|
|
|
|
|
@ -525,6 +481,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
carsLoadAsyncService.saveLog(carsLoadEntity, carsLoadLineEntity, CarsLoadLogTypeConstant.END_ARRIVE_CARS_LOAD.getValue(), AuthUtil.getNickName(), AuthUtil.getUserId()); |
|
|
|
|
} |
|
|
|
|
openOrderAsyncService.saveArriveCarLog(carsLoadLineEntity, AuthUtil.getNickName(), AuthUtil.getUserId()); |
|
|
|
|
|
|
|
|
|
List<String> orderPackageCodes = trunklineCarsLoadScanService.findPackageListByLoadId(loadId); |
|
|
|
|
|
|
|
|
|
String content = "包件在 "+warehouseEntity.getName()+"到车"; |
|
|
|
|
packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseEntity.getName(), workNode,content ); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.warn("#############arriveCarByLoadId: 存入日志失败"); |
|
|
|
|
} |
|
|
|
@ -538,6 +500,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
Integer startCarType = loadCarsDTO.getStartCarType(); |
|
|
|
|
Long warehouseId = loadCarsDTO.getWarehouseId(); |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
|
if(Objects.isNull(warehouseEntity)){ |
|
|
|
|
log.warn("#############cancelStartCarByLoadId: 仓库信息不存在 warehouseId={}", warehouseId); |
|
|
|
|
throw new CustomerException(400, "仓库信息不存在"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//先查询车辆配载计划
|
|
|
|
|
TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId); |
|
|
|
|
if (Objects.isNull(carsLoadEntity)) { |
|
|
|
@ -599,6 +567,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
try { |
|
|
|
|
carsLoadAsyncService.saveLog(carsLoadEntity, currentCarsLoadLineEntity, CarsLoadLogTypeConstant.CANCEL_FIRST_START_CARS_LOAD.getValue(), AuthUtil.getNickName(), AuthUtil.getUserId()); |
|
|
|
|
openOrderAsyncService.saveCancelStartCarLog(currentCarsLoadLineEntity, AuthUtil.getNickName(), AuthUtil.getUserId()); |
|
|
|
|
List<String> orderPackageCodes = trunklineCarsLoadScanService.findPackageListByLoadId(loadId); |
|
|
|
|
|
|
|
|
|
String content = "包件在 "+warehouseEntity.getName()+"始发仓取消发车"; |
|
|
|
|
packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseEntity.getName(), WorkNodeEnums.CANCEL_INITIAL_WAREHOUSE_DEPART.getCode(),content ); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.warn("#############cancelStartCarByLoadId: 存入日志失败"); |
|
|
|
|
} |
|
|
|
@ -618,6 +590,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
try { |
|
|
|
|
carsLoadAsyncService.saveLog(carsLoadEntity, currentCarsLoadLineEntity, CarsLoadLogTypeConstant.CANCEL_NET_START_CARS_LOAD.getValue(), AuthUtil.getNickName(), AuthUtil.getUserId()); |
|
|
|
|
openOrderAsyncService.saveCancelStartCarLog(currentCarsLoadLineEntity, AuthUtil.getNickName(), AuthUtil.getUserId()); |
|
|
|
|
List<String> orderPackageCodes = trunklineCarsLoadScanService.findPackageListByLoadId(loadId); |
|
|
|
|
|
|
|
|
|
String content = "包件在 "+warehouseEntity.getName()+"网点取消发车"; |
|
|
|
|
packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseEntity.getName(), WorkNodeEnums.CANEL_TRANSFER_WAREHOUSE_DEPART.getCode(),content ); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.warn("#############cancelStartCarByLoadId: 存入日志失败"); |
|
|
|
|
} |
|
|
|
@ -703,6 +680,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
log.info("############cancelArriveCarByLoadId: 取消到车"); |
|
|
|
|
Long loadId = loadCarsDTO.getLoadId(); |
|
|
|
|
Long warehouseId = loadCarsDTO.getWarehouseId(); |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
|
if(Objects.isNull(warehouseEntity)){ |
|
|
|
|
log.warn("#############cancelArriveCarByLoadId: 仓库信息不存在 warehouseId={}", warehouseId); |
|
|
|
|
throw new CustomerException(400, "仓库信息不存在"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//先查询车辆配载计划
|
|
|
|
|
TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId); |
|
|
|
|
if (Objects.isNull(carsLoadEntity)) { |
|
|
|
@ -765,10 +749,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
currentCarsLoadLineEntity.setArriveUserName(null); |
|
|
|
|
trunklineCarsLoadLineService.updateById(currentCarsLoadLineEntity); |
|
|
|
|
|
|
|
|
|
Integer workNode = null; |
|
|
|
|
if (startNodeId.equals(aheadNodeId)) { |
|
|
|
|
carsLoadEntity.setLoadStatus("10"); |
|
|
|
|
workNode = WorkNodeEnums.CANCEL_NET_ARRIVE_CAR.getCode(); |
|
|
|
|
} else { |
|
|
|
|
carsLoadEntity.setLoadStatus("30"); |
|
|
|
|
workNode = WorkNodeEnums.CANCEL_FINAL_NET_ARRIVE_CAR.getCode(); |
|
|
|
|
} |
|
|
|
|
carsLoadEntity.setNowWarehouseId(aheadNodeId); |
|
|
|
|
carsLoadEntity.setArriveTime(aheadCarsLoadLineEntity.getArriveDate()); |
|
|
|
@ -788,6 +775,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
carsLoadAsyncService.saveLog(carsLoadEntity, currentCarsLoadLineEntity, CarsLoadLogTypeConstant.CANCEL_NET_ARRIVE_CARS_LOAD.getValue(), AuthUtil.getNickName(), AuthUtil.getUserId()); |
|
|
|
|
} |
|
|
|
|
openOrderAsyncService.saveCancelArriveCarLog(currentCarsLoadLineEntity, AuthUtil.getNickName(), AuthUtil.getUserId()); |
|
|
|
|
List<String> orderPackageCodes = trunklineCarsLoadScanService.findPackageListByLoadId(loadId); |
|
|
|
|
|
|
|
|
|
String content = "包件在 "+warehouseId+"取消到车"; |
|
|
|
|
packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseEntity.getName(), workNode,content ); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.warn("#############cancelArriveCarByLoadId: 存入日志失败"); |
|
|
|
|
} |
|
|
|
@ -821,6 +812,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
Long loadId = loadCarsDTO.getLoadId(); |
|
|
|
|
Long warehouseId = loadCarsDTO.getWarehouseId(); |
|
|
|
|
Integer unloadType = loadCarsDTO.getUnloadType(); |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
|
if(Objects.isNull(warehouseEntity)){ |
|
|
|
|
log.warn("#############unloadByLoadId: 仓库信息不存在 warehouseId={}", warehouseId); |
|
|
|
|
throw new CustomerException(400, "仓库信息不存在"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//先查询车辆配载计划
|
|
|
|
|
TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId); |
|
|
|
|
if (Objects.isNull(carsLoadEntity)) { |
|
|
|
@ -880,6 +878,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
try { |
|
|
|
|
carsLoadAsyncService.saveLog(carsLoadEntity, currentCarsLoadLineEntity, CarsLoadLogTypeConstant.NET_UNLOAD_CARS_LOAD.getValue(), AuthUtil.getNickName(), AuthUtil.getUserId()); |
|
|
|
|
openOrderAsyncService.saveUnloadStartCarLog(currentCarsLoadLineEntity, AuthUtil.getNickName(), AuthUtil.getUserId()); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.warn("#############unloadByLoadId: 存入日志失败"); |
|
|
|
|
} |
|
|
|
@ -919,6 +918,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
//无装车记录异常日志记录
|
|
|
|
|
try { |
|
|
|
|
carsLoadAsyncService.abnormalListUnloadCheckByLoadIdAndWarehouseId(loadId, warehouseId, currentCarsLoadLineEntity.getNodeName(), AuthUtil.getTenantId(), AuthUtil.getUserId(), AuthUtil.getNickName(), Func.firstLong(AuthUtil.getDeptId())); |
|
|
|
|
List<String> orderPackageCodes = trunklineCarsLoadScanService.findUnloadByLoadIdAndWarehouseId(loadId,warehouseId); |
|
|
|
|
|
|
|
|
|
String content = "包件在 "+warehouseEntity.getName()+"卸车确认"; |
|
|
|
|
packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseEntity.getName(), node.getCode(),content ); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.warn("###############unloadPackage: 存入异常列表记录失败"); |
|
|
|
|
} |
|
|
|
@ -939,7 +943,6 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
// 查询详细地址为仓库的地址
|
|
|
|
|
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(nowWarehouseId); |
|
|
|
|
String warehouseAddress = null; |
|
|
|
|
if (ObjectUtil.isNotEmpty(warehouseEntity)) { |
|
|
|
|
warehouseAddress = "到达【" + warehouseEntity.getName() + "】"; |
|
|
|
@ -1659,6 +1662,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
@Override |
|
|
|
|
public R startCars(Long loadId, Long warehouseId) { |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
|
if(Objects.isNull(warehouseEntity)){ |
|
|
|
|
log.warn("#############startCars: 仓库信息不存在 warehouseId={}", warehouseId); |
|
|
|
|
return R.fail(400, "仓库信息不存在"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//先查询车辆配载计划
|
|
|
|
|
TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId); |
|
|
|
|
if (Objects.isNull(carsLoadEntity)) { |
|
|
|
@ -1699,6 +1708,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
trunklineCarsLoadLogService.saveLog(carsLoadEntity, carsLoadLineEntity, CarsLoadLogTypeConstant.FIRST_START_CARS_LOAD.getValue()); |
|
|
|
|
|
|
|
|
|
List<String> orderPackageCodes = trunklineCarsLoadScanService.findPackageListByLoadId(loadId); |
|
|
|
|
|
|
|
|
|
String content = "包件在 "+warehouseEntity.getName()+"三方中转发车"; |
|
|
|
|
packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseEntity.getName(), WorkNodeEnums.TRIPARTITE_TRANSFER_DEPART.getCode(),content ); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.warn("#############startCarByLoadId: 存入日志失败"); |
|
|
|
|
} |
|
|
|
@ -1706,7 +1721,6 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
try { |
|
|
|
|
List<LoadScanBrandDTO> brands = this.baseMapper.fingPackageCodeByLoadId(loadId); |
|
|
|
|
// 查询详细地址为仓库的地址
|
|
|
|
|
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(nowWarehouseId); |
|
|
|
|
String warehouseAddress = null; |
|
|
|
|
if (ObjectUtil.isNotEmpty(warehouseEntity)) { |
|
|
|
|
warehouseAddress = "从【" + warehouseEntity.getName() + "】发出"; |
|
|
|
@ -1722,6 +1736,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R cancelStartCars(Long loadId, Long warehouseId) { |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
|
if(Objects.isNull(warehouseEntity)){ |
|
|
|
|
log.warn("#############cancelStartCars: 仓库信息不存在 warehouseId={}", warehouseId); |
|
|
|
|
throw new CustomerException(400, "仓库信息不存在"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//先查询车辆配载计划
|
|
|
|
|
TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId); |
|
|
|
|
if (Objects.isNull(carsLoadEntity)) { |
|
|
|
@ -1767,6 +1788,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
trunklineCarsLoadLogService.saveLog(carsLoadEntity, currentCarsLoadLineEntity, CarsLoadLogTypeConstant.CANCEL_FIRST_START_CARS_LOAD.getValue()); |
|
|
|
|
List<String> orderPackageCodes = trunklineCarsLoadScanService.findPackageListByLoadId(loadId); |
|
|
|
|
|
|
|
|
|
String content = "包件在 "+warehouseEntity.getName()+"三方中转取消发车"; |
|
|
|
|
packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseEntity.getName(), WorkNodeEnums.CANCEL_TRIPARTITE_TRANSFER_DEPART.getCode(),content ); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.warn("#############startCarByLoadId: 存入日志失败"); |
|
|
|
|
} |
|
|
|
@ -1776,6 +1802,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R arriveCars(Long loadId, Long warehouseId, String arriveDateStr) { |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
|
if(Objects.isNull(warehouseEntity)){ |
|
|
|
|
log.warn("#############arriveCars: 仓库信息不存在 warehouseId={}", warehouseId); |
|
|
|
|
throw new CustomerException(400, "仓库信息不存在"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//先查询车辆配载计划
|
|
|
|
|
TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId); |
|
|
|
|
if (Objects.isNull(carsLoadEntity)) { |
|
|
|
@ -1817,6 +1850,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
trunklineCarsLoadLogService.saveLog(carsLoadEntity, carsLoadLineEntity, CarsLoadLogTypeConstant.END_ARRIVE_CARS_LOAD.getValue()); |
|
|
|
|
List<String> orderPackageCodes = trunklineCarsLoadScanService.findPackageListByLoadId(loadId); |
|
|
|
|
|
|
|
|
|
String content = "包件在 "+warehouseEntity.getName()+"三方中转到达"; |
|
|
|
|
packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseEntity.getName(), WorkNodeEnums.ARRICE_TRIPARTITE_TRANSFER_DEPART.getCode(),content ); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.warn("#############startCarByLoadId: 存入日志失败"); |
|
|
|
|
} |
|
|
|
@ -1826,6 +1864,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R signCars(Long loadId, Long warehouseId) { |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
|
if(Objects.isNull(warehouseEntity)){ |
|
|
|
|
log.warn("#############signCars: 仓库信息不存在 warehouseId={}", warehouseId); |
|
|
|
|
throw new CustomerException(400, "仓库信息不存在"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//先查询车辆配载计划
|
|
|
|
|
TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId); |
|
|
|
|
if (Objects.isNull(carsLoadEntity)) { |
|
|
|
@ -1846,7 +1891,17 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
carsLoadEntity.setSignTime(new Date()); |
|
|
|
|
updateById(carsLoadEntity); |
|
|
|
|
|
|
|
|
|
//TODO 装车扫描表状态要改成签收
|
|
|
|
|
trunklineCarsLoadScanService.updateScanStatusByLoadId(loadId,"3"); |
|
|
|
|
|
|
|
|
|
try{ |
|
|
|
|
List<String> orderPackageCodes = trunklineCarsLoadScanService.findSignListOrderPackageCodes(loadId); |
|
|
|
|
|
|
|
|
|
String content = "包件在"+warehouseEntity.getName()+"被三方中转整车签收"; |
|
|
|
|
packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseEntity.getName(), WorkNodeEnums.SIGN_TRIPARTITE_TRANSFER_DEPART.getCode(),content); |
|
|
|
|
}catch (Exception e){ |
|
|
|
|
log.warn("###########存入日志失败"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return R.success("签收成功"); |
|
|
|
|
} |
|
|
|
@ -1935,6 +1990,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
Integer isAbnormal = 0; |
|
|
|
|
Long trayId = null; |
|
|
|
|
String trayName = null; |
|
|
|
|
String fromWarehouseName = null; |
|
|
|
|
Long fromWarehouseId = null; |
|
|
|
|
Long loadScanId = null; |
|
|
|
|
|
|
|
|
@ -2016,6 +2072,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
String waybillNumber = otherParcelListEntity.getWaybillNumber(); |
|
|
|
|
fromWarehouseId = otherParcelListEntity.getWarehouseId(); |
|
|
|
|
orderCode = otherParcelListEntity.getOrderCode(); |
|
|
|
|
BasicdataWarehouseEntity fromWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(fromWarehouseId); |
|
|
|
|
if(!Objects.isNull(fromWarehouseEntity)){ |
|
|
|
|
fromWarehouseName = fromWarehouseEntity.getName(); |
|
|
|
|
} |
|
|
|
|
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNumber); |
|
|
|
|
if (Objects.isNull(waybillEntity)) { |
|
|
|
|
log.warn("##################loadingScan: 运单信息不存在 waybillNumber={}", waybillNumber); |
|
|
|
@ -2057,6 +2117,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
waybillNo = parcelListEntity.getWaybillNumber(); |
|
|
|
|
orderCode = parcelListEntity.getOrderCode(); |
|
|
|
|
fromWarehouseId = parcelListEntity.getWarehouseId(); |
|
|
|
|
BasicdataWarehouseEntity fromWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(fromWarehouseId); |
|
|
|
|
if(!Objects.isNull(fromWarehouseEntity)){ |
|
|
|
|
fromWarehouseName = fromWarehouseEntity.getName(); |
|
|
|
|
} |
|
|
|
|
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNo); |
|
|
|
|
if (Objects.isNull(waybillEntity)) { |
|
|
|
|
log.warn("##################loadingScan: 运单信息不存在 waybillNo={}", waybillNo); |
|
|
|
@ -2118,6 +2182,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
carsLoadScanEntity.setLoadingUserName(AuthUtil.getNickName()); |
|
|
|
|
trunklineCarsLoadScanService.save(carsLoadScanEntity); |
|
|
|
|
loadScanId = carsLoadScanEntity.getId(); |
|
|
|
|
|
|
|
|
|
List<String> orderPackageCodes = new ArrayList<>(); |
|
|
|
|
orderPackageCodes.add(orderPackageCode); |
|
|
|
|
String content = "包件在 "+warehouseName+"装车,配载计划目的仓 "+carsLoadScanEntity.getFinalNodeName()+",数据来源仓库 "+fromWarehouseName; |
|
|
|
|
packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseName, WorkNodeEnums.INITIAL_WAREHOUSE_LOADING.getCode(),content ); |
|
|
|
|
|
|
|
|
|
trunklineCarsLoadingLogService.savaLoadingLog(warehouseId, warehouseName, loadId, loadCode, waybillId, waybillNo, orderCode, orderPackageCode, 1, |
|
|
|
|
1, isData, isAbnormal, trayId, trayCode, trayName, fromWarehouseId, loadScanId, remark); |
|
|
|
|
updateNumByLoadId(loadId); |
|
|
|
@ -3416,6 +3486,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
Long warehouseId = signOrderEntity.getWarehouseId(); |
|
|
|
|
String marketName = signOrderEntity.getMallName(); |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
|
if(Objects.isNull(warehouseEntity)){ |
|
|
|
|
log.warn("##############signScanPackageCode: 仓库信息不存在 warehouseId={}", warehouseId); |
|
|
|
|
return R.fail(405, "仓库信息不存在"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId); |
|
|
|
|
if (Objects.isNull(carsLoadEntity)) { |
|
|
|
|
log.warn("##############signScanPackageCode: 配载计划不存在 loadId={}", loadId); |
|
|
|
@ -3556,6 +3632,16 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
//重新计算签收单的数量
|
|
|
|
|
updateSignOrderNumBySignOrderId(signOrderId); |
|
|
|
|
|
|
|
|
|
try{ |
|
|
|
|
List<String> orderPackageCodes = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
orderPackageCodes.add(orderPackageCode); |
|
|
|
|
String content = "包件在 "+warehouseEntity.getName()+"直发商家签收"; |
|
|
|
|
packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseEntity.getName(), WorkNodeEnums.SIGN_DIRECT_SHIPPER.getCode(),content ); |
|
|
|
|
}catch (Exception e){ |
|
|
|
|
log.warn("###########存入日志信息失败"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return R.success("签收成功"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3871,8 +3957,29 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R signLoadScanByIds(List<Long> loadScanIds) { |
|
|
|
|
public R signLoadScanByIds(List<Long> loadScanIds,Long warehouseId) { |
|
|
|
|
|
|
|
|
|
if(loadScanIds.isEmpty()){ |
|
|
|
|
log.warn("############signLoadScanByIds: 数据id为空 loadScanIds={}",loadScanIds); |
|
|
|
|
return R.fail(405,"数据id为空"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
|
if(Objects.isNull(warehouseEntity)){ |
|
|
|
|
log.warn("############signLoadScanByIds: 仓库信息不存在 warehouseId={}",warehouseId); |
|
|
|
|
return R.fail(405,"仓库信息不存在"); |
|
|
|
|
} |
|
|
|
|
trunklineCarsLoadScanService.updateScanStatus(loadScanIds, "3"); |
|
|
|
|
|
|
|
|
|
try{ |
|
|
|
|
List<String> orderPackageCodes = trunklineCarsLoadScanService.findSignListOrderPackageCodesByIds(loadScanIds); |
|
|
|
|
|
|
|
|
|
String content = "包件在"+warehouseEntity.getName()+"被三方中转签收"; |
|
|
|
|
packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseEntity.getName(), WorkNodeEnums.SIGN_TRIPARTITE_TRANSFER_DEPART.getCode(),content); |
|
|
|
|
}catch (Exception e){ |
|
|
|
|
log.warn("###########存入日志失败"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return R.success("签收成功"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -4267,6 +4374,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
Integer isData = carsLoadScanEntity.getIsData(); |
|
|
|
|
if (isData == 1) { |
|
|
|
|
updateNumByLoadId(loadId); |
|
|
|
|
String warehouseName = carsLoadScanEntity.getWarehouseName(); |
|
|
|
|
Integer isAbnormal = carsLoadScanEntity.getLoadingAbnormal(); |
|
|
|
|
Integer num = carsLoadScanEntity.getNum(); |
|
|
|
|
Long trayId = carsLoadScanEntity.getTrayId(); |
|
|
|
@ -4276,6 +4384,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
String scanCode = carsLoadScanEntity.getScanCode(); |
|
|
|
|
Integer type = carsLoadScanEntity.getType(); |
|
|
|
|
Long fromWarehouseId = carsLoadScanEntity.getFromWarehouseId(); |
|
|
|
|
String fromWarehouseName = null; |
|
|
|
|
BasicdataWarehouseEntity fromWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(fromWarehouseId); |
|
|
|
|
if(!Objects.isNull(fromWarehouseEntity)){ |
|
|
|
|
fromWarehouseName = fromWarehouseEntity.getName(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode, fromWarehouseId); |
|
|
|
|
if (Objects.isNull(stockArticleEntity)) { |
|
|
|
@ -4301,10 +4414,17 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
} else { |
|
|
|
|
parcelListEntity.setIsTransfer(1); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
distributionParcelListClient.update(parcelListEntity); |
|
|
|
|
if (StringUtil.isNotBlank(trayCode)) { |
|
|
|
|
updownTypeClient.downPackageOrDelTray(scanCode, warehouseId, "包件下架解托"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
List<String> orderPackageCodes = new ArrayList<>(); |
|
|
|
|
orderPackageCodes.add(scanCode); |
|
|
|
|
String content = "包件在 "+warehouseName+"取消装车,配载计划目的仓 "+carsLoadScanEntity.getFinalNodeName(); |
|
|
|
|
packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseName, WorkNodeEnums.CANCEL_INITIAL_WAREHOUSE_LOADING.getCode(),content ); |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
if (StringUtil.isNotBlank(trayCode)) { |
|
|
|
|
trayTypeClient.deleteZeroOrderByTrayCode(orderCode, trayCode, warehouseId, "零担解托"); |
|
|
|
@ -4761,6 +4881,16 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
} |
|
|
|
|
updateNumByLoadId(loadId); |
|
|
|
|
|
|
|
|
|
try{ |
|
|
|
|
List<String> orderPackageCodes = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
orderPackageCodes.add(orderPackageCode); |
|
|
|
|
String content = "包件在 "+warehouseName+"卸车,卸车方式:"+ IncomingTypeEnum.getValue(incomingType); |
|
|
|
|
packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(),AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),orderPackageCodes,warehouseId,warehouseName, WorkNodeEnums.UNLOAD_INCOMING_WAREHOUSE.getCode(),content ); |
|
|
|
|
}catch (Exception e){ |
|
|
|
|
log.warn("#########3卸车存入日志失败"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return R.success("卸车成功"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|