Commit 328bbc8c authored by ZWT's avatar ZWT

feat(吉林演示): 松原

1.修改风资源监控页面历史风向统计接口,解决只能统计出一种风向问题,完成接口冒烟测试;
2.修改风资源监控页面风电站运行状态接口,解决没有启动状态时无法查询数据问题,完成接口冒烟测试;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent 5a51027b
...@@ -349,22 +349,22 @@ public class WindPredictionFutureService { ...@@ -349,22 +349,22 @@ public class WindPredictionFutureService {
endTime = DateUtil.endOfYear(now); endTime = DateUtil.endOfYear(now);
} }
//分组查询风向 //分组查询风向
ThirdWindPowerGenerationUpdateMapper futureMapper = context.getBean(ThirdWindPowerGenerationUpdateMapper.class); ThirdWindPowerGenerationMapper futureMapper = context.getBean(ThirdWindPowerGenerationMapper.class);
List<ThirdWindPowerGenerationUpdateEnt> list = futureMapper.selectList(new QueryWrapper<ThirdWindPowerGenerationUpdateEnt>() List<ThirdWindPowerGenerationEnt> list = futureMapper.selectList(new QueryWrapper<ThirdWindPowerGenerationEnt>()
.select("actual_wind_direction", "COUNT( 1 ) AS actual_wind_speed") .select("actual_wind_direction", "COUNT( 1 ) AS actual_wind_speed")
.lambda() .lambda()
.between(ThirdWindPowerGenerationUpdateEnt::getCollectTime, beginTime, endTime) .between(ThirdWindPowerGenerationEnt::getCollectTime, beginTime, endTime)
.in(ThirdWindPowerGenerationUpdateEnt::getStationName, turbineList.stream() .in(ThirdWindPowerGenerationEnt::getStationName, turbineList.stream()
.map(BaseWindTurbineEnt::getStationName) .map(BaseWindTurbineEnt::getStationName)
.collect(Collectors.toList())) .collect(Collectors.toList()))
.groupBy(ThirdWindPowerGenerationUpdateEnt::getActualWindDirection) .groupBy(ThirdWindPowerGenerationEnt::getActualWindDirection)
); );
if (CollUtil.isEmpty(list)) { if (CollUtil.isEmpty(list)) {
return XSingleResult.success(output); return XSingleResult.success(output);
} }
//取总数 //取总数
BigDecimal total = BigDecimal.ZERO; BigDecimal total = BigDecimal.ZERO;
for (ThirdWindPowerGenerationUpdateEnt future : list) { for (ThirdWindPowerGenerationEnt future : list) {
total = total.add(future.getActualWindSpeed()); total = total.add(future.getActualWindSpeed());
switch (future.getActualWindDirection()) { switch (future.getActualWindDirection()) {
case 0: case 0:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment