Browse Source

feat(all): 修改推送消息失败问题

dist.1.3.0
zhaoqiaobo 11 months ago
parent
commit
67c353e372
  1. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java
  2. 36
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

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

@ -138,7 +138,7 @@ public class InComingServiceImpl implements IInComingService {
// 通过包件id 查询包件
orderStatusDTO.setUnitNo(packageCode);
orderStatusDTO.setOrderNo(advanceDetailEntity.getOrderCode());
orderStatusDTO.setStatus("4");
orderStatusDTO.setStatus("1");
orderStatusDTO.setOperationTime(DateUtil.now());
orderStatusDTO.setCurrentWarehouse(warehouseId.toString());
Map<String, Object> map = new HashMap<>();

36
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);
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);
@ -5828,6 +5847,23 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
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);
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) {
log.warn("#########3卸车存入日志失败");
}

Loading…
Cancel
Save