Browse Source

#充电桩修改

zhongwei
yang_shj 11 months ago
parent
commit
89ec14c572
  1. 6
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HomeServiceImpl.java

6
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HomeServiceImpl.java

@ -153,13 +153,15 @@ public class HomeServiceImpl implements HomeService {
count.setServeType(serve); count.setServeType(serve);
if(HomePageConstant.CHARGE.equals(type) && "2".equals(serve)){ if(HomePageConstant.CHARGE.equals(type) && "2".equals(serve)){
TargetVo target = (TargetVo) redisTemplate.opsForValue().get(charge); TargetVo target = (TargetVo) redisTemplate.opsForValue().get(charge);
if(ObjectUtil.isNotEmpty(target)){ if(ObjectUtil.isEmpty(target)){
TargetVo charge = this.chargeTarget(); TargetVo charge = this.chargeTarget();
if(ObjectUtil.isNotEmpty(charge)){ if(ObjectUtil.isNotEmpty(charge)){
count.setCount(Long.valueOf(charge.getCharge())); count.setCount(Long.valueOf(charge.getCharge()));
}else{ }else{
count.setCount(92L); count.setCount(113L);
} }
}else{
count.setCount(Long.valueOf(target.getCharge()));
} }
}else if(HomePageConstant.WATER_CONSERVANCY.equals(type) && "2".equals(serve)){ }else if(HomePageConstant.WATER_CONSERVANCY.equals(type) && "2".equals(serve)){
count.setCount(stations.stream().filter(station->serve.equals(station.getServeType()) && HomePageConstant.waterList.contains(station.getType())).count()); count.setCount(stations.stream().filter(station->serve.equals(station.getServeType()) && HomePageConstant.waterList.contains(station.getType())).count());

Loading…
Cancel
Save