瀏覽代碼

Merge branch 'develop' of gitadmin/tuoheng_air_monitor into release

tags/V1.0.1
chengwang 1 年之前
父節點
當前提交
e14d2cadfe
共有 1 個文件被更改,包括 7 次插入2 次删除
  1. +7
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryAirportMsgByIdService.java

+ 7
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryAirportMsgByIdService.java 查看文件

@@ -79,7 +79,7 @@ public class QueryAirportMsgByIdService {
//实时电压值大于现在电压最小值
double vol = (temp - Umin) / (Umax - Umin);
String percent = CommonNumberTypeUtils.getPercentFormat(vol, Integer.MAX_VALUE, 2);
vo.setVoltage(percent);
vo.setVoltage(percent + "%");
}else {
vo.setVoltage(0 + "%");
}
@@ -90,7 +90,12 @@ public class QueryAirportMsgByIdService {
//里程
double mileageTemp = Double.parseDouble(flightData.getMileage()) / 1000;
double mileage = CommonNumberTypeUtils.round(mileageTemp, 2);
vo.setMileage(mileage+ "km");
if(("0%").equals(vo.getVoltage())){
vo.setMileage(0 + "km");
}else {
vo.setMileage(mileage+ "km");
}

//机场距离
double distToHome = CommonNumberTypeUtils.round(Double.parseDouble(flightData.getDistToHome()), 2);
vo.setDistToHome(distToHome + "m");

Loading…
取消
儲存