|
|
|
@ -20,7 +20,6 @@ import com.hnac.hzims.operational.station.entity.HzimsAnalyzeModelStationEntity;
|
|
|
|
|
import com.hnac.hzims.operational.station.entity.StationEntity; |
|
|
|
|
import com.hnac.hzims.operational.station.service.IHzimsAnalyzeModelStationService; |
|
|
|
|
import com.hnac.hzims.operational.station.service.IStationService; |
|
|
|
|
import com.hnac.hzims.operational.station.vo.HzimsStationCountVo; |
|
|
|
|
import com.hnac.hzinfo.datasearch.analyse.vo.AnalyseDataTaosVO; |
|
|
|
|
import com.hnac.hzinfo.datasearch.analyse.vo.AnalyzeDataConditionVO; |
|
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
@ -88,8 +87,11 @@ public class HzimsDataServiceImpl implements HzimsDataService {
|
|
|
|
|
@Value("${hzims.operation.save.station.url}") |
|
|
|
|
public String STATION_URL; |
|
|
|
|
|
|
|
|
|
private final static String charge = "hzims:operation:key:charge"; |
|
|
|
|
|
|
|
|
|
private final static String conver_power_key = "hzims:operation:conver:power:"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final static String conver_weather_key = "hzims:operation:conver:weather:"; |
|
|
|
|
|
|
|
|
|
private final static String recent_year_power_data = "hzims:operation:key:power:data"; |
|
|
|
@ -136,17 +138,33 @@ public class HzimsDataServiceImpl implements HzimsDataService {
|
|
|
|
|
return this.sendMessage(JSONObject.toJSONBytes(list),AREA_URL); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 获取站点统计数据 |
|
|
|
|
* 站点数量统计 |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public boolean saveStation() { |
|
|
|
|
List<HzimsStationCountVo> list = this.stationService.getStationCount(); |
|
|
|
|
if(CollectionUtil.isEmpty(list)){ |
|
|
|
|
return false; |
|
|
|
|
public List<StationNumberVo> stationNumber() { |
|
|
|
|
List<StationNumberVo> numbers = new ArrayList<>(); |
|
|
|
|
List<StationEntity> stations = stationService.list(Wrappers.<StationEntity>lambdaQuery(). |
|
|
|
|
in(StationEntity::getType,Arrays.asList(0,1,5,8)) |
|
|
|
|
); |
|
|
|
|
if(!CollectionUtil.isEmpty(stations)){ |
|
|
|
|
stations.stream().collect(Collectors.groupingBy(StationEntity::getType)).forEach((key, value) -> { |
|
|
|
|
StationNumberVo number = new StationNumberVo(); |
|
|
|
|
number.setType(key); |
|
|
|
|
number.setCount(value.size()); |
|
|
|
|
numbers.add(number); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
TargetVo target = (TargetVo) redisTemplate.opsForValue().get(charge); |
|
|
|
|
if(!ObjectUtil.isEmpty(target)){ |
|
|
|
|
StationNumberVo number = new StationNumberVo(); |
|
|
|
|
number.setType(7); |
|
|
|
|
number.setCount(target.getCharge()); |
|
|
|
|
numbers.add(number); |
|
|
|
|
} |
|
|
|
|
return this.sendMessage(JSONObject.toJSONBytes(list),STATION_URL); |
|
|
|
|
return numbers; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|