ソースを参照

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");

読み込み中…
キャンセル
保存