|
@@ -544,7 +544,7 @@ public class kwfTruckTraceService {
|
|
|
// 使用 Feign 调用查询车辆轨迹列表
|
|
// 使用 Feign 调用查询车辆轨迹列表
|
|
|
log.info("查询任务轨迹列表请求参数: {}", JSON.toJSONString(vehicleDataDTO));
|
|
log.info("查询任务轨迹列表请求参数: {}", JSON.toJSONString(vehicleDataDTO));
|
|
|
BaseIotResult<List<VehicleReturnData>> result = vehicleTraceClient.queryVehicleDataList(vehicleDataDTO);
|
|
BaseIotResult<List<VehicleReturnData>> result = vehicleTraceClient.queryVehicleDataList(vehicleDataDTO);
|
|
|
-
|
|
|
|
|
|
|
+ log.info("查询任务轨迹列表返回数据: {}", JSON.toJSONString(result));
|
|
|
if (result == null || !StringUtils.equals(result.getCode(), "0") || result.getData() == null) {
|
|
if (result == null || !StringUtils.equals(result.getCode(), "0") || result.getData() == null) {
|
|
|
log.warn("查询任务轨迹返回空数据, 运单号: {}", wOrderNo);
|
|
log.warn("查询任务轨迹返回空数据, 运单号: {}", wOrderNo);
|
|
|
return List.of();
|
|
return List.of();
|
|
@@ -582,7 +582,15 @@ public class kwfTruckTraceService {
|
|
|
currentTaskTrace.setLatitude(e.getLatitude());
|
|
currentTaskTrace.setLatitude(e.getLatitude());
|
|
|
currentTaskTrace.setLocationTime(Objects.isNull(e.getTs()) ? "" : DateUtils.format(e.getTs().toLocalDateTime(), DateUtils.DATE_TIME_PATTERN));
|
|
currentTaskTrace.setLocationTime(Objects.isNull(e.getTs()) ? "" : DateUtils.format(e.getTs().toLocalDateTime(), DateUtils.DATE_TIME_PATTERN));
|
|
|
currentTaskTrace.setStatus(e.getStatus());
|
|
currentTaskTrace.setStatus(e.getStatus());
|
|
|
- currentTaskTrace.setStatusDesc(StringUtils.isNotBlank(e.getStatus()) ? VehicleExceptionTypeEnum.getName(Integer.parseInt(e.getStatus())) : "");
|
|
|
|
|
|
|
+ // 处理数据库状态值的兼容逻辑
|
|
|
|
|
+ int status = 0;
|
|
|
|
|
+ try {
|
|
|
|
|
+ status = Integer.parseInt(e.getStatus());
|
|
|
|
|
+ }catch (Exception ex){
|
|
|
|
|
+ log.info("状态码转换异常",ex);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ currentTaskTrace.setStatusDesc(VehicleExceptionTypeEnum.getName(status));
|
|
|
return currentTaskTrace;
|
|
return currentTaskTrace;
|
|
|
}
|
|
}
|
|
|
|
|
|