Quellcode durchsuchen

1、相对高度改为海拔高度;2、采样点时间加8 小时;

tags/v1.0.2
wanjing vor 1 Jahr
Ursprung
Commit
6fa22148a2
5 geänderte Dateien mit 14 neuen und 8 gelöschten Zeilen
  1. +2
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/constant/SystemConstant.java
  2. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/FlightData.java
  3. +2
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/airData/AirDataExcelVo.java
  4. +8
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airData/syncdata/SyncAirDataService.java
  5. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/flightdata/query/QueryFlightDataTrackService.java

+ 2
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/constant/SystemConstant.java Datei anzeigen

@@ -10,14 +10,14 @@ public interface SystemConstant {
/**
* 表格表头集
*/
String[] EXCEL_NAME = {"采样点时间","相对高度m","经度",
String[] EXCEL_NAME = {"采样点时间","海拔高度m","经度",
"纬度","温度°C","湿度%","气压Pa","VOCs ppm","SO2 ppd","CO ppm","NO2 ppb",
"o3+NO2 ppm","PM1.0 ug/m3","PM2.5 ug/m3","PM10 ug/m3","设备序列号"};

/**
* 表格表头集1
*/
String[] EXCEL_SECOND_NAME = {"采样点时间","相对高度m","经度",
String[] EXCEL_SECOND_NAME = {"采样点时间","海拔高度m","经度",
"纬度","SO2 μg/m³","CO mg/m³","NO2 μg/m³","O3 μg/m³","VOCS μg/m³","PM2.5 μg/m³","PM10 μg/m³",
"设备序列号","序号"};


+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/FlightData.java Datei anzeigen

@@ -49,7 +49,7 @@ public class FlightData extends BaseEntity {
private String altitude;

/**
* 相对高度
* 海拔高度
*/
private String ultrasonic;


+ 2
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/airData/AirDataExcelVo.java Datei anzeigen

@@ -25,9 +25,9 @@ public class AirDataExcelVo {
private String cUtcTime;

/**
* 相对高度
* 海拔高度
*/
@ExcelProperty(value = {"相对高度m"},index = 1)
@ExcelProperty(value = {"海拔高度m"},index = 1)
private String altitude;

/**

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

@@ -22,6 +22,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

@@ -62,8 +63,13 @@ public class SyncAirDataService {
airData.setHumidity(response.getHumidity()); // 湿度
airData.setHdop(response.getHdop()); // 水平精度因子
airData.setPressure(response.getPressure()); // 大气压
airData.setCUtcTime(DateUtils.convert(DateUtils.YYYY_MM_DD_HH_MM_SS_2, DateUtils.YYYY_MM_DD_HH_MM_SS, response.getUtcTime())); // UTC时间

if (StringUtils.isNotEmpty(response.getUtcTime())) {
String utcTime = DateUtils.convert(DateUtils.YYYY_MM_DD_HH_MM_SS_2, DateUtils.YYYY_MM_DD_HH_MM_SS, response.getUtcTime()); // UTC时间
Date dateTimeStr = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS, utcTime);
Date dateTime = DateUtils.addDateTimeToDate(dateTimeStr, 0, 8, 0, 0);
String result = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, dateTime);
airData.setCUtcTime(result);
}
Map<String, Object> airDataMap = response.getAirData();
String cl2 = this.getValue(airDataMap,"CL2(ppm)"); // 氯气(单位ppm)
String co = this.getValue(airDataMap,"CO(ppm)"); // 一氧化碳(单位ppm)

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/flightdata/query/QueryFlightDataTrackService.java Datei anzeigen

@@ -43,7 +43,7 @@ public class QueryFlightDataTrackService {
flightData.setTenantId(inspection.getTenantId());
flightData.setInspectionId(inspection.getId());
flightData.setAltitude(null);
//机场传过来的高度是相对高度
//机场传过来的高度是海拔高度
flightData.setUltrasonic(inspectionRequest.getAltitude());

//将最新一条数据放入缓存,并设置过期时间

Laden…
Abbrechen
Speichern