|
|
|
@ -367,8 +367,14 @@ public class HomePageServiceImpl implements IHomePageService {
|
|
|
|
|
stationCountVo.setStationTypeName(DictCache.getValue("stationType", item)); |
|
|
|
|
stationCountVo.setCount(0); |
|
|
|
|
if(HomePageConstant.CHARGE.equals(item) && HomePageConstant.HYDROPOWER_SERVETYPE.equals(serveType)){ |
|
|
|
|
String chargeCount = (String) redisTemplate.opsForValue().get(CHARGE_SUM); |
|
|
|
|
stationCountVo.setCount(Integer.valueOf(chargeCount)); |
|
|
|
|
ChargeVo charge = (ChargeVo) redisTemplate.opsForValue().get(CHARGE_SUM); |
|
|
|
|
if(StringUtil.isEmpty(charge)){ |
|
|
|
|
ChargeVo chargeVo = new ChargeVo(); |
|
|
|
|
this.getCharge(chargeVo); |
|
|
|
|
stationCountVo.setCount(chargeVo.getCount()); |
|
|
|
|
}else{ |
|
|
|
|
stationCountVo.setCount(charge.getCount()); |
|
|
|
|
} |
|
|
|
|
list.add(stationCountVo); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
@ -1010,7 +1016,7 @@ public class HomePageServiceImpl implements IHomePageService {
|
|
|
|
|
chargeVo.setChargeDegrees(data.get("todayDegree").toString()); |
|
|
|
|
chargeVo.setIncome(data.get("income").toString()); |
|
|
|
|
chargeVo.setTotalChargeDegrees(data.get("kilowatt").toString()); |
|
|
|
|
redisTemplate.opsForValue().set(CHARGE_SUM,data.get("stationNum").toString()); |
|
|
|
|
redisTemplate.opsForValue().set(CHARGE_SUM,chargeVo); |
|
|
|
|
} catch (Exception ex) { |
|
|
|
|
chargeVo.setOrder("0"); |
|
|
|
|
chargeVo.setChargeDegrees("0"); |
|
|
|
|