Kaynağa Gözat

Merge branch 'develop' of gitadmin/tuoheng_freeway into release

tags/v1.2.0^2
chengwang 1 yıl önce
ebeveyn
işleme
157f17a49f
2 değiştirilmiş dosya ile 11 ekleme ve 6 silme
  1. +9
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/flightdata/query/QueryFlightDataTrackService.java
  2. +2
    -5
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/GetDroneDataByIdService.java

+ 9
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/flightdata/query/QueryFlightDataTrackService.java Dosyayı Görüntüle

@@ -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());
}
}

+ 2
- 5
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/GetDroneDataByIdService.java Dosyayı Görüntüle

@@ -20,10 +20,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;

/**
* @Author ChengWang
@@ -66,7 +63,7 @@ public class GetDroneDataByIdService {
map.put("inspectionId",inspection.getId());
map.put("tenantId",tenantId);
List<FlightData> flightDataList = flightDataMapper.selectListByInspection(map);
if(CollectionUtils.isEmpty(flightDataList)){
if(CollectionUtils.isEmpty(flightDataList) || flightDataList.size() == 0){
log.info("获取无人机数据信息,数据为空");
JsonResult.success("数据为空");
}

Yükleniyor…
İptal
Kaydet