|
|
|
@ -37,12 +37,95 @@ 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.*; |
|
|
|
|
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.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.feign.ITrunklinePackageTrackLogClient; |
|
|
|
|
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.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.vo.CarsLoadAllOrderVO; |
|
|
|
|
import com.logpm.trunkline.vo.CarsLoadOrderInfoVO; |
|
|
|
|
import com.logpm.trunkline.vo.CarsLoadScanAbnormalVO; |
|
|
|
|
import com.logpm.trunkline.vo.CarsLoadWaybillInfoVO; |
|
|
|
|
import com.logpm.trunkline.vo.CustmoerUnloadNumVO; |
|
|
|
|
import com.logpm.trunkline.vo.GoodsLoadingNumVO; |
|
|
|
|
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.LoadingDetailExportVO; |
|
|
|
|
import com.logpm.trunkline.vo.LoadingListGoodsVO; |
|
|
|
|
import com.logpm.trunkline.vo.LoadingListMainVO; |
|
|
|
|
import com.logpm.trunkline.vo.NodeNumDataVO; |
|
|
|
|
import com.logpm.trunkline.vo.OrderCodeNumVO; |
|
|
|
|
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.TrunklineCarsOrderVO; |
|
|
|
|
import com.logpm.trunkline.vo.TrunklineLoadSignOrderVO; |
|
|
|
|
import com.logpm.trunkline.vo.TrunklineScanZeroDetailVO; |
|
|
|
|
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.ZeroNumVO; |
|
|
|
|
import com.logpm.trunkline.vo.ZeroPackageVO; |
|
|
|
|
import com.logpm.trunkline.vo.ZeroSuppleListVO; |
|
|
|
|
import com.logpm.trunkline.vo.ZeroSuppleVO; |
|
|
|
|
import com.logpm.warehouse.entity.WarehousePackageTrackLogEntity; |
|
|
|
|
import com.logpm.warehouse.entity.WarehouseTrayTypeEntity; |
|
|
|
|
import com.logpm.warehouse.entity.WarehouseWayBillDetail; |
|
|
|
@ -56,7 +139,11 @@ 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.*; |
|
|
|
|
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; |
|
|
|
@ -76,7 +163,18 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
|
import java.math.RoundingMode; |
|
|
|
|
import java.util.*; |
|
|
|
|
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.concurrent.atomic.AtomicReference; |
|
|
|
|
import java.util.function.Function; |
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
@ -2899,7 +2997,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
loadCarsDTO.setArriveTimeStart(CommonUtil.getStartByDateStr(loadCarsDTO.getArriveTimeStartStr())); |
|
|
|
|
loadCarsDTO.setArriveTimeEnd(CommonUtil.getEndByDateStr(loadCarsDTO.getArriveTimeEndStr())); |
|
|
|
|
|
|
|
|
|
//承运时间
|
|
|
|
|
loadCarsDTO.setCarrierTimeStart(CommonUtil.getStartByDateStr(loadCarsDTO.getCarrierTimeStartStr())); |
|
|
|
|
loadCarsDTO.setCarrierTimeEnd(CommonUtil.getEndByDateStr(loadCarsDTO.getCarrierTimeEndStr())); |
|
|
|
|
|
|
|
|
@ -3464,6 +3562,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
Long waybillId = null; |
|
|
|
|
String waybillNo = null; |
|
|
|
|
String orderCode = null; |
|
|
|
|
String destinationWarehouse = null; |
|
|
|
|
String brandName = null; |
|
|
|
|
Integer isData = 1; |
|
|
|
|
Integer isAbnormal = 0; |
|
|
|
@ -3575,6 +3674,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
if (!Objects.isNull(waybillEntity)) { |
|
|
|
|
waybillId = waybillEntity.getId(); |
|
|
|
|
waybillNo = waybillEntity.getWaybillNo(); |
|
|
|
|
destinationWarehouse = waybillEntity.getDestinationWarehouseName(); |
|
|
|
|
} |
|
|
|
|
carsLoadScanEntity.setWaybillId(waybillId); |
|
|
|
|
carsLoadScanEntity.setWaybillNo(waybillNo); |
|
|
|
@ -3616,6 +3716,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
//补全数据信息
|
|
|
|
|
Long packageId = parcelListEntity.getId(); |
|
|
|
|
waybillNo = parcelListEntity.getWaybillNumber(); |
|
|
|
|
destinationWarehouse = parcelListEntity.getAcceptWarehouseName(); |
|
|
|
|
orderCode = parcelListEntity.getOrderCode(); |
|
|
|
|
brandName = parcelListEntity.getBrandName(); |
|
|
|
|
waybillId = parcelListEntity.getWaybillId(); |
|
|
|
@ -3717,16 +3818,21 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
// 推送包件装车数据到工厂
|
|
|
|
|
pushFactoryOrderData(warehouseId, orderPackageCode, orderCode); |
|
|
|
|
try { |
|
|
|
|
JSONObject main = new JSONObject(); |
|
|
|
|
main.put("trainNumber",loadCode); |
|
|
|
|
main.put("waybillNumber",waybillNo); |
|
|
|
|
NodePushMsg nodePushMsg = NodePushMsg.builder() |
|
|
|
|
.operator(AuthUtil.getNickName()) |
|
|
|
|
.operatorTime(new Date()) |
|
|
|
|
.address("在【" + warehouseName + "】出库") |
|
|
|
|
.brand(BrandEnums.getByValue(brandName)) |
|
|
|
|
.node(WorkNodeEnums.INITIAL_WAREHOUSE_LOADING) |
|
|
|
|
.main(JSONUtil.toJsonStr(main)) |
|
|
|
|
.content(Collections.singletonList(PushData.builder() |
|
|
|
|
.packageCode(orderPackageCode) |
|
|
|
|
.orderCode(orderCode) |
|
|
|
|
.warehouseName(warehouseName) |
|
|
|
|
.destinationWarehouse(destinationWarehouse) |
|
|
|
|
.build())) |
|
|
|
|
.build(); |
|
|
|
|
factoryDataMessageSender.sendNodeDataByBrand(nodePushMsg); |
|
|
|
@ -5427,7 +5533,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
if(CollUtil.isNotEmpty(carsLoadScanIdList)){ |
|
|
|
|
List<TrunklineScanZeroDetailVO> zeroDetailVOList = scanZeroDetailService.findListByCarsLoadScanIds(carsLoadScanIdList); |
|
|
|
|
//把zeroDetailVOList所有元素通过id分组
|
|
|
|
|
Map<Long, List<TrunklineScanZeroDetailVO>> zeroDetailVOMap = zeroDetailVOList.stream().collect(Collectors.groupingBy(TrunklineScanZeroDetailVO::getId)); |
|
|
|
|
Map<Long, List<TrunklineScanZeroDetailVO>> zeroDetailVOMap = zeroDetailVOList.stream().collect(Collectors.groupingBy(TrunklineScanZeroDetailVO::getScanId)); |
|
|
|
|
|
|
|
|
|
for (UnloadZeroDTO unloadZeroDTO : unloadZeroList) { |
|
|
|
|
Long carsLoadScanId = unloadZeroDTO.getCarsLoadScanId(); |
|
|
|
@ -5808,6 +5914,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
map.put("messageData", JSONUtil.toJsonStr(orderStatusDTO)); |
|
|
|
|
rabbitTemplate.convertAndSend(RabbitConstant.HWY_ORDER_STATUS_EXCHANGE, RabbitConstant.HWY_ORDER_STATUS_ROUTING, map); |
|
|
|
|
JSONObject main = new JSONObject(); |
|
|
|
|
main.put("trainNumber", entity.getTrainNumber()); |
|
|
|
|
main.put("waybillNumber", entity.getWaybillNumber()); |
|
|
|
|
NodePushMsg nodePushMsg = NodePushMsg.builder() |
|
|
|
|
.operator(AuthUtil.getNickName()) |
|
|
|
|
.operatorTime(new Date()) |
|
|
|
@ -5817,11 +5926,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
.address("在【" + warehouseName + "】入库") |
|
|
|
|
.brand(BrandEnums.getByValue(entity.getBrandName())) |
|
|
|
|
.node(WorkNodeEnums.UNLOAD_INCOMING_WAREHOUSE) |
|
|
|
|
.main(JSONUtil.toJsonStr(main)) |
|
|
|
|
.content(Collections.singletonList(PushData.builder() |
|
|
|
|
.packageCode(entity.getOrderPackageCode()) |
|
|
|
|
.warehouseName(warehouseName) |
|
|
|
|
.waybillNumber(entity.getWaybillNumber()) |
|
|
|
|
.orderCode(entity.getOrderCode()) |
|
|
|
|
.destinationWarehouse(entity.getAcceptWarehouseName()) |
|
|
|
|
.build())) |
|
|
|
|
.build(); |
|
|
|
|
factoryDataMessageSender.sendNodeDataByBrand(nodePushMsg); |
|
|
|
@ -7093,16 +7204,21 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
// 推送包件装车信息到工厂
|
|
|
|
|
pushFactoryOrderData(warehouseId, orderPackageCode, orderCode); |
|
|
|
|
try { |
|
|
|
|
JSONObject main = new JSONObject(); |
|
|
|
|
main.put("trainNumber",carsNo); |
|
|
|
|
main.put("waybillNumber",waybillNo); |
|
|
|
|
NodePushMsg nodePushMsg = NodePushMsg.builder() |
|
|
|
|
.operator(AuthUtil.getNickName()) |
|
|
|
|
.operatorTime(new Date()) |
|
|
|
|
.address("在【" + warehouseName + "】出库") |
|
|
|
|
.brand(BrandEnums.getByValue(parcelListEntity.getBrandName())) |
|
|
|
|
.node(WorkNodeEnums.INITIAL_WAREHOUSE_LOADING) |
|
|
|
|
.main(JSONUtil.toJsonStr(main)) |
|
|
|
|
.content(Collections.singletonList(PushData.builder() |
|
|
|
|
.packageCode(orderPackageCode) |
|
|
|
|
.orderCode(orderCode) |
|
|
|
|
.warehouseName(warehouseName) |
|
|
|
|
.destinationWarehouse(parcelListEntity.getAcceptWarehouseName()) |
|
|
|
|
.build())) |
|
|
|
|
.build(); |
|
|
|
|
factoryDataMessageSender.sendNodeDataByBrand(nodePushMsg); |
|
|
|
@ -9319,6 +9435,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
map.put("messageData", JSONUtil.toJsonStr(orderStatusDTO)); |
|
|
|
|
rabbitTemplate.convertAndSend(RabbitConstant.HWY_ORDER_STATUS_EXCHANGE, RabbitConstant.HWY_ORDER_STATUS_ROUTING, map); |
|
|
|
|
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(orderPackageCode, warehouseId); |
|
|
|
|
JSONObject main = new JSONObject(); |
|
|
|
|
main.put("trainNumber", parcelListEntity.getTrainNumber()); |
|
|
|
|
main.put("waybillNumber", parcelListEntity.getWaybillNumber()); |
|
|
|
|
NodePushMsg nodePushMsg = NodePushMsg.builder() |
|
|
|
|
.operator(AuthUtil.getNickName()) |
|
|
|
|
.operatorTime(new Date()) |
|
|
|
@ -9327,10 +9446,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
.endWarehouse(ObjectUtil.isNotEmpty(parcelListEntity) ? parcelListEntity.getAcceptWarehouseName():"") |
|
|
|
|
.address("在【" + warehouseName + "】入库") |
|
|
|
|
.brand(BrandEnums.getByValue(distributionParcelListEntity.getBrandName())) |
|
|
|
|
.main(JSONUtil.toJsonStr(main)) |
|
|
|
|
.node(WorkNodeEnums.UNLOAD_INCOMING_WAREHOUSE) |
|
|
|
|
.content(Collections.singletonList(PushData.builder() |
|
|
|
|
.packageCode(orderPackageCode) |
|
|
|
|
.warehouseName(warehouseName) |
|
|
|
|
.destinationWarehouse(ObjectUtil.isNotEmpty(parcelListEntity) ? parcelListEntity.getAcceptWarehouseName():"") |
|
|
|
|
.orderCode(orderCode) |
|
|
|
|
.build())) |
|
|
|
|
.build(); |
|
|
|
@ -10001,6 +10122,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
map.put("messageData", JSONUtil.toJsonStr(orderStatusDTO)); |
|
|
|
|
rabbitTemplate.convertAndSend(RabbitConstant.HWY_ORDER_STATUS_EXCHANGE, RabbitConstant.HWY_ORDER_STATUS_ROUTING, map); |
|
|
|
|
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(orderPackageCode, warehouseId); |
|
|
|
|
JSONObject main = new JSONObject(); |
|
|
|
|
main.put("trainNumber", parcelListEntity.getTrainNumber()); |
|
|
|
|
main.put("waybillNumber", parcelListEntity.getWaybillNumber()); |
|
|
|
|
NodePushMsg nodePushMsg = NodePushMsg.builder() |
|
|
|
|
.operator(AuthUtil.getNickName()) |
|
|
|
|
.operatorTime(new Date()) |
|
|
|
@ -10013,6 +10137,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
.content(Collections.singletonList(PushData.builder() |
|
|
|
|
.packageCode(orderPackageCode) |
|
|
|
|
.warehouseName(warehouseName) |
|
|
|
|
.destinationWarehouse(ObjectUtil.isNotEmpty(parcelListEntity) ? parcelListEntity.getAcceptWarehouseName():"") |
|
|
|
|
.orderCode(orderCode) |
|
|
|
|
.build())) |
|
|
|
|
.build(); |
|
|
|
|