Commit cc46a3c6 authored by tangwei's avatar tangwei

修改bug

parent 44eea8b3
......@@ -475,10 +475,13 @@ public class JpStationController extends BaseController {
JpStationDto jpStation = jpStationMapper.getCountJpStationdata(reviewDto);
List<Map<String, Object>> powerRatio = new ArrayList<>();
Map<String, Object> map = new HashMap<>();
if(jpStation==null){
jpStation = new JpStationDto();
}
if (jpStation != null && jpStation.getRealTimePower() != null && jpStation.getRatedPower() != null && jpStation.getRatedPower() > 0) {
map.put("value", String.format("%.4f", jpStation.getRealTimePower() / (jpStation.getCapacity() * FDXSS)));
} else {
jpStation = new JpStationDto();
map.put("value", 0);
}
powerRatio.add(map);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment