Commit cc46f16201a8ff258c3a829b5d7b8c9e8487afad
1 parent
cc177aae
tijiao
Showing
1 changed file
with
4 additions
and
4 deletions
src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/datastatistic/BerthsStatisticController.java
@@ -376,17 +376,17 @@ public class BerthsStatisticController extends BizController { | @@ -376,17 +376,17 @@ public class BerthsStatisticController extends BizController { | ||
376 | if (!parkLotMap.containsKey(key)) { | 376 | if (!parkLotMap.containsKey(key)) { |
377 | Map<String, Double> timeAndVal = Maps.newHashMap(); | 377 | Map<String, Double> timeAndVal = Maps.newHashMap(); |
378 | if (ParkConstant.ParkingLotUseStatistic.BerthRatioType.FREE == berthRatio) { | 378 | if (ParkConstant.ParkingLotUseStatistic.BerthRatioType.FREE == berthRatio) { |
379 | - timeAndVal.put(statisEndTime, statisticDTO.getFreeRatio() * 100); | 379 | + timeAndVal.put(statisEndTime, null==statisticDTO.getFreeRatio()? 0: statisticDTO.getFreeRatio()* 100); |
380 | parkLotMap.put(key, timeAndVal); | 380 | parkLotMap.put(key, timeAndVal); |
381 | } else if (ParkConstant.ParkingLotUseStatistic.BerthRatioType.TURNOVER == berthRatio) { | 381 | } else if (ParkConstant.ParkingLotUseStatistic.BerthRatioType.TURNOVER == berthRatio) { |
382 | - timeAndVal.put(statisEndTime, statisticDTO.getTurnoverRatio() ); | 382 | + timeAndVal.put(statisEndTime, null==statisticDTO.getTurnoverRatio()?0:statisticDTO.getTurnoverRatio() ); |
383 | parkLotMap.put(key, timeAndVal); | 383 | parkLotMap.put(key, timeAndVal); |
384 | } | 384 | } |
385 | } else { | 385 | } else { |
386 | if (ParkConstant.ParkingLotUseStatistic.BerthRatioType.FREE == berthRatio) { | 386 | if (ParkConstant.ParkingLotUseStatistic.BerthRatioType.FREE == berthRatio) { |
387 | - parkLotMap.get(key).put(statisEndTime, statisticDTO.getFreeRatio() * 100); | 387 | + parkLotMap.get(key).put(statisEndTime, null==statisticDTO.getFreeRatio()? 0: statisticDTO.getFreeRatio()* 100); |
388 | } else if (ParkConstant.ParkingLotUseStatistic.BerthRatioType.TURNOVER == berthRatio) { | 388 | } else if (ParkConstant.ParkingLotUseStatistic.BerthRatioType.TURNOVER == berthRatio) { |
389 | - parkLotMap.get(key).put(statisEndTime, statisticDTO.getTurnoverRatio() ); | 389 | + parkLotMap.get(key).put(statisEndTime, null==statisticDTO.getTurnoverRatio()?0:statisticDTO.getTurnoverRatio() ); |
390 | } | 390 | } |
391 | } | 391 | } |
392 | 392 |