Quellcode durchsuchen

大气数据入库方法回调

tags/V1.0.1^2
chengwang vor 1 Jahr
Ursprung
Commit
9234190855
1 geänderte Dateien mit 15 neuen und 12 gelöschten Zeilen
  1. +15
    -12
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airData/syncdata/SyncAirDataService.java

+ 15
- 12
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airData/syncdata/SyncAirDataService.java Datei anzeigen

@@ -135,29 +135,32 @@ public class SyncAirDataService {
log.info("灵嗅设备推送数据,serial为空");
return JsonResult.error("灵嗅设备推送数据,serial为空");
}
Inspection inspection = this.getInspection(response.getSerial());
Inspection inspection = inspectionMapper.selectOne(Wrappers.<Inspection>lambdaQuery()
.eq(Inspection::getMark, 1)
.eq(Inspection::getEquipmentMountCode, response.getSerial())
.eq(Inspection::getStatus, 10)
.orderByDesc(Inspection::getCreateTime));
log.info("查询的正在飞行的巡检任务,inspection={}",inspection);
//Inspection inspection = this.getInspection(response.getSerial());
if (ObjectUtil.isNull(inspection)) {
log.info("没有正在飞行的任务,无法关联推送的灵嗅数据,serial={}", response.getSerial());
return JsonResult.error("没有正在飞行的任务");
}
return JsonResult.success();
return JsonResult.success(inspection);
}

private Inspection getInspection(String serial) {
Inspection inspection = inspectionMapper.selectOne(Wrappers.<Inspection>lambdaQuery()
.eq(Inspection::getMark, 1)
.eq(Inspection::getEquipmentMountCode, serial)
.eq(Inspection::getStatus, 10));
// private Inspection getInspection(String serial) {
//
// Inspection inspection = inspectionMapper.selectOne(new LambdaQueryWrapper<Inspection>()
// .eq(Inspection::getEquipmentMountCode, serial)
// .eq(Inspection::getStatus, InspectionStatusEnum.IN_FLIGHT.getCode())
// .eq(Inspection::getMark, MarkEnum.VALID.getCode())
// .orderByDesc(Inspection::getCreateTime));
if (ObjectUtil.isNull(inspection)) {
return null;
}
return inspection;
}
// if (ObjectUtil.isNull(inspection)) {
// return null;
// }
// return inspection;
// }

private String getValue(Map<String, Object> airDataMap, String key) {
if (airDataMap.containsKey(key)) {

Laden…
Abbrechen
Speichern