|
|
|
@ -29,11 +29,73 @@ import com.logpm.factorydata.enums.BrandEnums;
|
|
|
|
|
import com.logpm.factorydata.util.FactoryDataMessageSender; |
|
|
|
|
import com.logpm.factorydata.vo.NodePushMsg; |
|
|
|
|
import com.logpm.trunkline.bean.Resp; |
|
|
|
|
import com.logpm.trunkline.dto.*; |
|
|
|
|
import com.logpm.trunkline.entity.*; |
|
|
|
|
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.entity.TrunklineLoadSignPhotoEntity; |
|
|
|
|
import com.logpm.trunkline.mapper.TrunklineCarsLoadMapper; |
|
|
|
|
import com.logpm.trunkline.service.*; |
|
|
|
|
import com.logpm.trunkline.vo.*; |
|
|
|
|
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.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.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.WaybillCarsLoadVO; |
|
|
|
|
import com.logpm.trunkline.vo.ZeroSuppleVO; |
|
|
|
|
import com.logpm.warehouse.entity.WarehouseWayBillDetail; |
|
|
|
|
import com.logpm.warehouse.entity.WarehouseWaybillEntity; |
|
|
|
|
import com.logpm.warehouse.feign.IWarehouseTrayTypeClient; |
|
|
|
@ -43,7 +105,11 @@ 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.*; |
|
|
|
|
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.carsload.CarsLoadLogTypeConstant; |
|
|
|
|
import org.springblade.common.exception.CustomerException; |
|
|
|
|
import org.springblade.common.utils.CommonUtil; |
|
|
|
@ -62,7 +128,14 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
|
import java.util.*; |
|
|
|
|
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; |
|
|
|
|
|
|
|
|
|
@Slf4j |
|
|
|
|
@Service |
|
|
|
@ -156,7 +229,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
String fullLoadRate = loadCarsDTO.getFullLoadRate(); |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
|
if(Objects.isNull(warehouseEntity)){ |
|
|
|
|
if (Objects.isNull(warehouseEntity)) { |
|
|
|
|
log.warn("#############startCarByLoadId: 仓库信息不存在 warehouseId={}", warehouseId); |
|
|
|
|
throw new CustomerException(400, "仓库信息不存在"); |
|
|
|
|
} |
|
|
|
@ -227,8 +300,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
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 ); |
|
|
|
|
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: 存入日志失败"); |
|
|
|
@ -305,8 +378,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
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 ); |
|
|
|
|
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: 存入日志失败"); |
|
|
|
|
} |
|
|
|
@ -394,20 +467,20 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
String warehouseCode = basicdataWarehouseEntity.getWarehouseCode(); |
|
|
|
|
|
|
|
|
|
TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId); |
|
|
|
|
if(Objects.isNull(carsLoadEntity)){ |
|
|
|
|
if (Objects.isNull(carsLoadEntity)) { |
|
|
|
|
log.warn("################createCustomerSignOrder: 配载计划不存在 loadId={}", loadId); |
|
|
|
|
throw new CustomerException(405, "配载计划不存在"); |
|
|
|
|
} |
|
|
|
|
Long driverId = carsLoadEntity.getDriverId(); |
|
|
|
|
Long driverUserId = null; |
|
|
|
|
BasicdataDriverArteryEntity driverArtery = driverArteryClient.getDriverArtery(driverId); |
|
|
|
|
if(!Objects.isNull(driverArtery) && !Objects.isNull(driverArtery.getUserId())){ |
|
|
|
|
if (!Objects.isNull(driverArtery) && !Objects.isNull(driverArtery.getUserId())) { |
|
|
|
|
driverUserId = driverArtery.getUserId(); |
|
|
|
|
} |
|
|
|
|
Long assistantId = carsLoadEntity.getAssistantId(); |
|
|
|
|
Long assistantUserId = null; |
|
|
|
|
BasicdataDriverArteryEntity assistantArtery = driverArteryClient.getDriverArtery(assistantId); |
|
|
|
|
if(!Objects.isNull(assistantArtery) && !Objects.isNull(assistantArtery.getUserId())){ |
|
|
|
|
if (!Objects.isNull(assistantArtery) && !Objects.isNull(assistantArtery.getUserId())) { |
|
|
|
|
assistantUserId = assistantArtery.getUserId(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -449,7 +522,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
Long warehouseId = loadCarsDTO.getWarehouseId(); |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
|
if(Objects.isNull(warehouseEntity)){ |
|
|
|
|
if (Objects.isNull(warehouseEntity)) { |
|
|
|
|
log.warn("#############arriveCarByLoadId: 仓库信息不存在 warehouseId={}", warehouseId); |
|
|
|
|
throw new CustomerException(400, "仓库信息不存在"); |
|
|
|
|
} |
|
|
|
@ -530,8 +603,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
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 ); |
|
|
|
|
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: 存入日志失败"); |
|
|
|
@ -547,7 +620,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
Long warehouseId = loadCarsDTO.getWarehouseId(); |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
|
if(Objects.isNull(warehouseEntity)){ |
|
|
|
|
if (Objects.isNull(warehouseEntity)) { |
|
|
|
|
log.warn("#############cancelStartCarByLoadId: 仓库信息不存在 warehouseId={}", warehouseId); |
|
|
|
|
throw new CustomerException(400, "仓库信息不存在"); |
|
|
|
|
} |
|
|
|
@ -615,8 +688,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
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 ); |
|
|
|
|
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: 存入日志失败"); |
|
|
|
|
} |
|
|
|
@ -638,8 +711,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
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 ); |
|
|
|
|
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: 存入日志失败"); |
|
|
|
@ -713,7 +786,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
//逻辑删除装车扫描表的数据
|
|
|
|
|
List<Long> carsLoadScanIdList = trunklineCarsLoadScanService.findAllIdListByLoadId(loadId); |
|
|
|
|
|
|
|
|
|
removeCarsLoadScan(StringUtil.join(carsLoadScanIdList, ","),warehouseId); |
|
|
|
|
removeCarsLoadScan(StringUtil.join(carsLoadScanIdList, ","), warehouseId); |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
trunklineCarsLoadLogService.saveLog(carsLoadEntity, currentCarsLoadLineEntity, CarsLoadLogTypeConstant.CANCEL_CARS_LOAD.getValue()); |
|
|
|
@ -730,7 +803,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
Long warehouseId = loadCarsDTO.getWarehouseId(); |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
|
if(Objects.isNull(warehouseEntity)){ |
|
|
|
|
if (Objects.isNull(warehouseEntity)) { |
|
|
|
|
log.warn("#############cancelArriveCarByLoadId: 仓库信息不存在 warehouseId={}", warehouseId); |
|
|
|
|
throw new CustomerException(400, "仓库信息不存在"); |
|
|
|
|
} |
|
|
|
@ -825,8 +898,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
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 ); |
|
|
|
|
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: 存入日志失败"); |
|
|
|
|
} |
|
|
|
@ -862,7 +935,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
Integer unloadType = loadCarsDTO.getUnloadType(); |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
|
if(Objects.isNull(warehouseEntity)){ |
|
|
|
|
if (Objects.isNull(warehouseEntity)) { |
|
|
|
|
log.warn("#############unloadByLoadId: 仓库信息不存在 warehouseId={}", warehouseId); |
|
|
|
|
throw new CustomerException(400, "仓库信息不存在"); |
|
|
|
|
} |
|
|
|
@ -969,10 +1042,10 @@ 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); |
|
|
|
|
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 ); |
|
|
|
|
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: 存入异常列表记录失败"); |
|
|
|
@ -1709,7 +1782,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
public R startCars(Long loadId, Long warehouseId) { |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
|
if(Objects.isNull(warehouseEntity)){ |
|
|
|
|
if (Objects.isNull(warehouseEntity)) { |
|
|
|
|
log.warn("#############startCars: 仓库信息不存在 warehouseId={}", warehouseId); |
|
|
|
|
return R.fail(400, "仓库信息不存在"); |
|
|
|
|
} |
|
|
|
@ -1757,8 +1830,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
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 ); |
|
|
|
|
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: 存入日志失败"); |
|
|
|
@ -1779,7 +1852,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
public R cancelStartCars(Long loadId, Long warehouseId) { |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
|
if(Objects.isNull(warehouseEntity)){ |
|
|
|
|
if (Objects.isNull(warehouseEntity)) { |
|
|
|
|
log.warn("#############cancelStartCars: 仓库信息不存在 warehouseId={}", warehouseId); |
|
|
|
|
throw new CustomerException(400, "仓库信息不存在"); |
|
|
|
|
} |
|
|
|
@ -1831,8 +1904,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
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 ); |
|
|
|
|
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: 存入日志失败"); |
|
|
|
@ -1845,7 +1918,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
public R arriveCars(Long loadId, Long warehouseId, String arriveDateStr) { |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
|
if(Objects.isNull(warehouseEntity)){ |
|
|
|
|
if (Objects.isNull(warehouseEntity)) { |
|
|
|
|
log.warn("#############arriveCars: 仓库信息不存在 warehouseId={}", warehouseId); |
|
|
|
|
throw new CustomerException(400, "仓库信息不存在"); |
|
|
|
|
} |
|
|
|
@ -1893,8 +1966,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
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 ); |
|
|
|
|
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: 存入日志失败"); |
|
|
|
@ -1907,7 +1980,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
public R signCars(Long loadId, Long warehouseId) { |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
|
if(Objects.isNull(warehouseEntity)){ |
|
|
|
|
if (Objects.isNull(warehouseEntity)) { |
|
|
|
|
log.warn("#############signCars: 仓库信息不存在 warehouseId={}", warehouseId); |
|
|
|
|
throw new CustomerException(400, "仓库信息不存在"); |
|
|
|
|
} |
|
|
|
@ -1932,14 +2005,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
carsLoadEntity.setSignTime(new Date()); |
|
|
|
|
updateById(carsLoadEntity); |
|
|
|
|
|
|
|
|
|
trunklineCarsLoadScanService.updateScanStatusByLoadId(loadId,"3"); |
|
|
|
|
trunklineCarsLoadScanService.updateScanStatusByLoadId(loadId, "3"); |
|
|
|
|
|
|
|
|
|
try{ |
|
|
|
|
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){ |
|
|
|
|
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("###########存入日志失败"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -2024,10 +2097,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
TrunklineCarsLoadScanEntity isExit = trunklineCarsLoadScanService.findEntityByOrderPackageCodeAndScanStatus(orderPackageCode, "1"); |
|
|
|
|
if(!Objects.isNull(isExit)){ |
|
|
|
|
if (!Objects.isNull(isExit)) { |
|
|
|
|
String loadCode = isExit.getLoadCode(); |
|
|
|
|
log.warn("##################loadingScan: 包件已经装车 orderPackageCode={}", orderPackageCode); |
|
|
|
|
return R.fail(405, "包件已经装车到"+loadCode); |
|
|
|
|
return R.fail(405, "包件已经装车到" + loadCode); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String loadCode = carsLoadEntity.getCarsNo(); |
|
|
|
@ -2121,7 +2194,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
fromWarehouseId = otherParcelListEntity.getWarehouseId(); |
|
|
|
|
orderCode = otherParcelListEntity.getOrderCode(); |
|
|
|
|
BasicdataWarehouseEntity fromWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(fromWarehouseId); |
|
|
|
|
if(!Objects.isNull(fromWarehouseEntity)){ |
|
|
|
|
if (!Objects.isNull(fromWarehouseEntity)) { |
|
|
|
|
fromWarehouseName = fromWarehouseEntity.getName(); |
|
|
|
|
} |
|
|
|
|
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNumber); |
|
|
|
@ -2164,7 +2237,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
orderCode = parcelListEntity.getOrderCode(); |
|
|
|
|
fromWarehouseId = parcelListEntity.getWarehouseId(); |
|
|
|
|
BasicdataWarehouseEntity fromWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(fromWarehouseId); |
|
|
|
|
if(!Objects.isNull(fromWarehouseEntity)){ |
|
|
|
|
if (!Objects.isNull(fromWarehouseEntity)) { |
|
|
|
|
fromWarehouseName = fromWarehouseEntity.getName(); |
|
|
|
|
} |
|
|
|
|
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNo); |
|
|
|
@ -2230,8 +2303,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
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 ); |
|
|
|
|
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); |
|
|
|
@ -3537,7 +3610,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
String marketName = signOrderEntity.getMallName(); |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
|
if(Objects.isNull(warehouseEntity)){ |
|
|
|
|
if (Objects.isNull(warehouseEntity)) { |
|
|
|
|
log.warn("##############signScanPackageCode: 仓库信息不存在 warehouseId={}", warehouseId); |
|
|
|
|
return R.fail(405, "仓库信息不存在"); |
|
|
|
|
} |
|
|
|
@ -3682,16 +3755,34 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
//重新计算签收单的数量
|
|
|
|
|
updateSignOrderNumBySignOrderId(signOrderId); |
|
|
|
|
|
|
|
|
|
try{ |
|
|
|
|
List<String> orderPackageCodes = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
List<String> orderPackageCodes = new ArrayList<>(); |
|
|
|
|
try { |
|
|
|
|
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){ |
|
|
|
|
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("###########存入日志信息失败"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 推送签收数据给工厂
|
|
|
|
|
try { |
|
|
|
|
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(orderPackageCode, warehouseId); |
|
|
|
|
if (ObjectUtil.isNotEmpty(parcelListEntity)) { |
|
|
|
|
List<Object> contents = new ArrayList<>(); |
|
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
|
jsonObject.put("packageCode", orderPackageCode); |
|
|
|
|
contents.add(jsonObject); |
|
|
|
|
NodePushMsg msg = new NodePushMsg(); |
|
|
|
|
msg.setNode(WorkNodeEnums.CLERK_REVIEW); |
|
|
|
|
msg.setBrand(BrandEnums.getByValue(parcelListEntity.getBrandName())); |
|
|
|
|
msg.setOperator(AuthUtil.getNickName()); |
|
|
|
|
msg.setOperatorTime(new Date()); |
|
|
|
|
msg.setContent(contents); |
|
|
|
|
log.info("推送工厂数据:{}", JSONUtil.toJsonStr(msg)); |
|
|
|
|
factoryDataMessageSender.sendNodeDataByBrand(msg); |
|
|
|
|
} |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("推送签收数据给工厂失败 {}", e); |
|
|
|
|
} |
|
|
|
|
return R.success("签收成功"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -4007,26 +4098,26 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R signLoadScanByIds(List<Long> loadScanIds,Long warehouseId) { |
|
|
|
|
public R signLoadScanByIds(List<Long> loadScanIds, Long warehouseId) { |
|
|
|
|
|
|
|
|
|
if(loadScanIds.isEmpty()){ |
|
|
|
|
log.warn("############signLoadScanByIds: 数据id为空 loadScanIds={}",loadScanIds); |
|
|
|
|
return R.fail(405,"数据id为空"); |
|
|
|
|
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,"仓库信息不存在"); |
|
|
|
|
if (Objects.isNull(warehouseEntity)) { |
|
|
|
|
log.warn("############signLoadScanByIds: 仓库信息不存在 warehouseId={}", warehouseId); |
|
|
|
|
return R.fail(405, "仓库信息不存在"); |
|
|
|
|
} |
|
|
|
|
trunklineCarsLoadScanService.updateScanStatus(loadScanIds, "3"); |
|
|
|
|
|
|
|
|
|
try{ |
|
|
|
|
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){ |
|
|
|
|
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("###########存入日志失败"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -4248,7 +4339,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
return R.success("添加成功"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// @Retryable(value = CustomerException.class, maxAttempts = 3, backoff = @Backoff(value = 3000, multiplier = 1.5))
|
|
|
|
|
// @Retryable(value = CustomerException.class, maxAttempts = 3, backoff = @Backoff(value = 3000, multiplier = 1.5))
|
|
|
|
|
@Override |
|
|
|
|
public void sendRabbitMessageLoadScanData(String jsonMsg) { |
|
|
|
|
String queue = RabbitConstant.INCOMING_TO_LOAD_QUEUE; |
|
|
|
@ -4310,14 +4401,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
String routing = RabbitConstant.OPEN_ORDER_LOAD_SCAN_ROUTING; |
|
|
|
|
|
|
|
|
|
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillId(waybillId); |
|
|
|
|
if(Objects.isNull(waybillEntity)){ |
|
|
|
|
log.warn("#############sendRabbitMessageOpenOrder: 运单信息不存在 waybillId={}",waybillId); |
|
|
|
|
if (Objects.isNull(waybillEntity)) { |
|
|
|
|
log.warn("#############sendRabbitMessageOpenOrder: 运单信息不存在 waybillId={}", waybillId); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
|
jsonObject.put("waybillId",waybillId); |
|
|
|
|
jsonObject.put("waybillNo",waybillEntity.getWaybillNo()); |
|
|
|
|
jsonObject.put("advanceIds",advanceIds); |
|
|
|
|
jsonObject.put("waybillId", waybillId); |
|
|
|
|
jsonObject.put("waybillNo", waybillEntity.getWaybillNo()); |
|
|
|
|
jsonObject.put("advanceIds", advanceIds); |
|
|
|
|
String jsonMsg = jsonObject.toJSONString(); |
|
|
|
|
|
|
|
|
|
String msgId = IdUtil.simpleUUID(); |
|
|
|
@ -4587,7 +4678,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
Long fromWarehouseId = carsLoadScanEntity.getFromWarehouseId(); |
|
|
|
|
String fromWarehouseName = null; |
|
|
|
|
BasicdataWarehouseEntity fromWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(fromWarehouseId); |
|
|
|
|
if(!Objects.isNull(fromWarehouseEntity)){ |
|
|
|
|
if (!Objects.isNull(fromWarehouseEntity)) { |
|
|
|
|
fromWarehouseName = fromWarehouseEntity.getName(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -4623,8 +4714,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
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 ); |
|
|
|
|
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)) { |
|
|
|
@ -5082,13 +5173,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
} |
|
|
|
|
updateNumByLoadId(loadId); |
|
|
|
|
|
|
|
|
|
try{ |
|
|
|
|
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){ |
|
|
|
|
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卸车存入日志失败"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -5152,12 +5243,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
if (enterNun > num) { |
|
|
|
|
log.warn("#############unloadZero: 零担信息卸车数量大于装车件数 enterNun={} num={}", enterNun, num); |
|
|
|
|
return R.fail(405, "零担信息卸车数量大于装车件数"); |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
Integer difficute = num - enterNun; |
|
|
|
|
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode, fromWarehouseId); |
|
|
|
|
Long orderId = stockArticleEntity.getId(); |
|
|
|
|
distributionStockArticleClient.addHandQuantity(orderId,difficute); |
|
|
|
|
distributionStockArticleClient.addHandQuantity(orderId, difficute); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
carsLoadScanEntity.setUnloadNum(enterNun); |
|
|
|
|