Browse Source

Merge branch 'dev' into pre-production

master
zhaoqiaobo 9 months ago
parent
commit
472c9f4e5d
  1. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java
  2. 45
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

3
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java

@ -18,7 +18,6 @@ import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.IncomingTypeEnum; import org.springblade.common.constant.IncomingTypeEnum;
import org.springblade.common.constant.RabbitConstant; import org.springblade.common.constant.RabbitConstant;
import org.springblade.common.constant.WorkNodeEnums; import org.springblade.common.constant.WorkNodeEnums;
import org.springblade.common.utils.CommonUtil;
import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.Func;
@ -139,7 +138,7 @@ public class InComingServiceImpl implements IInComingService {
// 通过包件id 查询包件 // 通过包件id 查询包件
orderStatusDTO.setUnitNo(packageCode); orderStatusDTO.setUnitNo(packageCode);
orderStatusDTO.setOrderNo(advanceDetailEntity.getOrderCode()); orderStatusDTO.setOrderNo(advanceDetailEntity.getOrderCode());
orderStatusDTO.setStatus("4"); orderStatusDTO.setStatus("1");
orderStatusDTO.setOperationTime(DateUtil.now()); orderStatusDTO.setOperationTime(DateUtil.now());
orderStatusDTO.setCurrentWarehouse(warehouseId.toString()); orderStatusDTO.setCurrentWarehouse(warehouseId.toString());
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();

45
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -3820,6 +3820,25 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
//直接新增的包件 //直接新增的包件
distributionParcelListClient.addBatch(newParcelListEntities); distributionParcelListClient.addBatch(newParcelListEntities);
if(CollUtil.isNotEmpty(newParcelListEntities)){
for (DistributionParcelListEntity entity : newParcelListEntities) {
try {
// 发送入库消息
OrderStatusDTO orderStatusDTO = new OrderStatusDTO();
// 通过包件id 查询包件
orderStatusDTO.setUnitNo(entity.getOrderPackageCode());
orderStatusDTO.setOrderNo(entity.getOrderCode());
orderStatusDTO.setStatus("4");
orderStatusDTO.setOperationTime(DateUtil.now());
orderStatusDTO.setCurrentWarehouse(warehouseId.toString());
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);
}catch (Exception e){
log.error("推送卸车失败{}",e);
}
}
}
trunklineCarsLoadScanService.updateBatchById(updateScanEntityList); trunklineCarsLoadScanService.updateBatchById(updateScanEntityList);
@ -5446,6 +5465,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
Long trayId = null; Long trayId = null;
String trayName = null; String trayName = null;
String trayCode = null; String trayCode = null;
String orderCode = null;
//判断包件是否已入库 //判断包件是否已入库
DistributionParcelListEntity distributionParcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(orderPackageCode, warehouseId); DistributionParcelListEntity distributionParcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(orderPackageCode, warehouseId);
@ -5512,7 +5532,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
} else { } else {
String waybillNumber = parcelListEntity.getWaybillNumber(); String waybillNumber = parcelListEntity.getWaybillNumber();
String orderCode = parcelListEntity.getOrderCode(); orderCode = parcelListEntity.getOrderCode();
Long wid = parcelListEntity.getWarehouseId(); Long wid = parcelListEntity.getWarehouseId();
String wName = parcelListEntity.getWarehouse(); String wName = parcelListEntity.getWarehouse();
Long pacakageId = parcelListEntity.getId(); Long pacakageId = parcelListEntity.getId();
@ -5656,7 +5676,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
Long finalNodeId = carsLoadScanEntity.getFinalNodeId(); Long finalNodeId = carsLoadScanEntity.getFinalNodeId();
Long waybillId = carsLoadScanEntity.getWaybillId(); Long waybillId = carsLoadScanEntity.getWaybillId();
String waybillNo = carsLoadScanEntity.getWaybillNo(); String waybillNo = carsLoadScanEntity.getWaybillNo();
String orderCode = carsLoadScanEntity.getOrderCode(); orderCode = carsLoadScanEntity.getOrderCode();
Long loadScanId = carsLoadScanEntity.getId(); Long loadScanId = carsLoadScanEntity.getId();
Long fromWarehouseId = carsLoadScanEntity.getFromWarehouseId(); Long fromWarehouseId = carsLoadScanEntity.getFromWarehouseId();
Integer isData = carsLoadScanEntity.getIsData(); Integer isData = carsLoadScanEntity.getIsData();
@ -5771,7 +5791,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
TrunklineAdvanceDetailEntity advanceDetailEntity = trunklineAdvanceDetailService.findEntityByOrderPackageCode(orderPackageCode); TrunklineAdvanceDetailEntity advanceDetailEntity = trunklineAdvanceDetailService.findEntityByOrderPackageCode(orderPackageCode);
if (!Objects.isNull(advanceDetailEntity)) { if (!Objects.isNull(advanceDetailEntity)) {
String packageStatus = advanceDetailEntity.getPackageStatus(); String packageStatus = advanceDetailEntity.getPackageStatus();
String orderCode1 = advanceDetailEntity.getOrderCode(); orderCode = advanceDetailEntity.getOrderCode();
String waybillNo1 = advanceDetailEntity.getWaybillNo(); String waybillNo1 = advanceDetailEntity.getWaybillNo();
if ("0".equals(packageStatus)) { if ("0".equals(packageStatus)) {
//未入库 //未入库
@ -5780,7 +5800,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
inComingDTO.setWarehouseId(warehouseId); inComingDTO.setWarehouseId(warehouseId);
inComingService.incomingPackage(inComingDTO); inComingService.incomingPackage(inComingDTO);
carsLoadScanEntity.setOrderCode(orderCode1); carsLoadScanEntity.setOrderCode(orderCode);
carsLoadScanEntity.setWaybillNo(waybillNo1); carsLoadScanEntity.setWaybillNo(waybillNo1);
carsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName()); carsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName());
carsLoadScanEntity.setUnloadTime(new Date()); carsLoadScanEntity.setUnloadTime(new Date());
@ -5827,6 +5847,23 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
orderPackageCodes.add(orderPackageCode); orderPackageCodes.add(orderPackageCode);
String content = "包件在 " + warehouseName + "卸车,卸车方式:" + IncomingTypeEnum.getValue(incomingType); 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); packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(), AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getNickName(), orderPackageCodes, warehouseId, warehouseName, WorkNodeEnums.UNLOAD_INCOMING_WAREHOUSE.getCode(), content);
try {
if(StrUtil.isNotEmpty(orderCode)){
// 发送入库消息
OrderStatusDTO orderStatusDTO = new OrderStatusDTO();
// 通过包件id 查询包件
orderStatusDTO.setUnitNo(orderPackageCode);
orderStatusDTO.setOrderNo(orderCode);
orderStatusDTO.setStatus("4");
orderStatusDTO.setOperationTime(DateUtil.now());
orderStatusDTO.setCurrentWarehouse(warehouseId.toString());
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);
}
} catch (Exception e) {
log.error("入库推送失败:{}", e);
}
} catch (Exception e) { } catch (Exception e) {
log.warn("#########3卸车存入日志失败"); log.warn("#########3卸车存入日志失败");
} }

Loading…
Cancel
Save