|
|
@@ -38,6 +38,8 @@ public class QueryFlightDataTrackService { |
|
|
|
if (ObjectUtil.isEmpty(inspection)) { |
|
|
|
throw new ServiceException(ServiceExceptionEnum.TASK_DOES_NOT_EXIST); |
|
|
|
} |
|
|
|
log.info("正在巡检的任务,inspection={}",inspection); |
|
|
|
|
|
|
|
FlightData flightData = new FlightData(); |
|
|
|
BeanUtils.copyProperties(inspectionRequest, flightData); |
|
|
|
flightData.setTenantId(inspection.getTenantId()); |
|
|
@@ -49,9 +51,15 @@ public class QueryFlightDataTrackService { |
|
|
|
flightData.setYsingal(inspectionRequest.getYsingal()); |
|
|
|
flightData.setDistHome(inspectionRequest.getDistHome()); |
|
|
|
|
|
|
|
log.info("云盒遥测数据,flightData={}",flightData); |
|
|
|
|
|
|
|
//将最新一条数据放入缓存,并设置过期时间 |
|
|
|
redisUtils.set(String.valueOf(inspection.getId()), flightData, 10); |
|
|
|
flightDataMapper.insert(flightData); |
|
|
|
int result = flightDataMapper.insert(flightData); |
|
|
|
if(result<=0){ |
|
|
|
return JsonResult.error("遥测数据保存失败"); |
|
|
|
} |
|
|
|
|
|
|
|
return JsonResult.success(OperationEnum.OPERATION_SUCCESS.getMessage()); |
|
|
|
} |
|
|
|
} |