Procházet zdrojové kódy

Merge branch 'develop' of gitadmin/tuoheng_air_monitor into release

tags/V1.0.1
chengwang před 1 rokem
rodič
revize
ddcecf16a4
1 změnil soubory, kde provedl 13 přidání a 15 odebrání
  1. +13
    -15
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airData/syncdata/SyncAirDataService.java

+ 13
- 15
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airData/syncdata/SyncAirDataService.java Zobrazit soubor

@@ -146,28 +146,26 @@ public class SyncAirDataService {
.eq(Inspection::getStatus, InspectionStatusEnum.IN_FLIGHT.getCode())
.orderByDesc(Inspection::getCreateTime)
.last(" limit 1"));
if(CollectionUtil.isEmpty(inspectionList) || inspectionList.size() == 0){
return JsonResult.error("未查询出最新的一条人工执飞任务");
}
Inspection inspection = inspectionList.get(0);
if (ObjectUtil.isNotNull(inspection)) {
log.info("正在飞行的飞手任务,inspection={}",inspection);
}else if(ObjectUtil.isNull(inspection)){
Inspection inspection = null;
if (CollectionUtil.isNotEmpty(inspectionList) || inspectionList.size() != 0) {
inspection = inspectionList.get(0);
log.info("正在飞行的飞手任务,inspection={}", inspection);
} else if (inspection == null) {
//再查询最新的一条任务
inspectionList = inspectionMapper.selectList(Wrappers.<Inspection>lambdaQuery()
inspectionList = inspectionMapper.selectList(Wrappers.<Inspection>lambdaQuery()
.eq(Inspection::getMark, 1)
.eq(Inspection::getStatus, InspectionStatusEnum.IN_FLIGHT.getCode())
.orderByDesc(Inspection::getCreateTime)
.last(" limit 1"));
if(CollectionUtil.isEmpty(inspectionList) || inspectionList.size() == 0){
return JsonResult.error("未查询出最新的一条机场巡检任务");
if (CollectionUtil.isNotEmpty(inspectionList) || inspectionList.size() != 0) {
inspection = inspectionList.get(0);
log.info("正在飞行的巡检任务,inspection={}", inspection);
} else {
log.info("没有正在飞行的任务,无法关联推送的灵嗅数据,serial={}", response.getSerial());
return JsonResult.error("没有正在飞行的任务");
}
inspection = inspectionList.get(0);
}else {
log.info("没有正在飞行的任务,无法关联推送的灵嗅数据,serial={}", response.getSerial());
return JsonResult.error("没有正在飞行的任务");
}

}
return JsonResult.success(inspection);
}


Načítá se…
Zrušit
Uložit