@@ -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³", | |||
"设备序列号","序号"}; | |||
@@ -49,7 +49,7 @@ public class FlightData extends BaseEntity { | |||
private String altitude; | |||
/** | |||
* 相对高度 | |||
* 海拔高度 | |||
*/ | |||
private String ultrasonic; | |||
@@ -25,9 +25,9 @@ public class AirDataExcelVo { | |||
private String cUtcTime; | |||
/** | |||
* 相对高度 | |||
* 海拔高度 | |||
*/ | |||
@ExcelProperty(value = {"相对高度m"},index = 1) | |||
@ExcelProperty(value = {"海拔高度m"},index = 1) | |||
private String altitude; | |||
/** |
@@ -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) |
@@ -43,7 +43,7 @@ public class QueryFlightDataTrackService { | |||
flightData.setTenantId(inspection.getTenantId()); | |||
flightData.setInspectionId(inspection.getId()); | |||
flightData.setAltitude(null); | |||
//机场传过来的高度是相对高度 | |||
//机场传过来的高度是海拔高度 | |||
flightData.setUltrasonic(inspectionRequest.getAltitude()); | |||
//将最新一条数据放入缓存,并设置过期时间 |