diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileStationInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileStationInfoServiceImpl.java index 68f439bb9..39b651e2b 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileStationInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileStationInfoServiceImpl.java @@ -1105,9 +1105,10 @@ public class PileStationInfoServiceImpl implements PileStationInfoService { } // 用户选中某日期 if (dateTime != null) { - String orderNumRateGrowthRate = ""; + String orderNumRateGrowthRate = "0%"; String format = ""; - if (StringUtils.equals(Constants.ONE, type)) { + if (StringUtils.equals(Constants.ONE, type) || + StringUtils.equals(Constants.TWO, type)) { // 7天 format = DateUtils.YYYY_MM_DD; }else { @@ -1124,6 +1125,8 @@ public class PileStationInfoServiceImpl implements PileStationInfoService { if (yesterdayOrderNum.compareTo(BigDecimal.ZERO) != 0) { BigDecimal orderNumRate = todayOrderNum.subtract(yesterdayOrderNum).divide(yesterdayOrderNum, 2, BigDecimal.ROUND_HALF_UP); orderNumRateGrowthRate = orderNumRate.multiply(new BigDecimal("100")) + "%"; + }else { + orderNumRateGrowthRate = todayOrderNum.multiply(new BigDecimal("100")) + "%"; } vo.setOrderAmountGrowthRate(orderNumRateGrowthRate); }