Commit 28c42800 authored by ZWT's avatar ZWT

feat(零碳): 长庆

1.修复登录页面登录接口验证码输入后不需要验证直接能登录的问题;
2.长庆演示,首页展示大屏功能修改,修改线路详情接口,增加查询日平均用电量逻辑,同时重构查询日产液量和日发电量逻辑,更新接口文档并完成接口冒烟测试,同时生成用例;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent e1be55d7
......@@ -108,11 +108,13 @@
<artifactId>xmlworker</artifactId>
<version>5.4.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/cn.hutool/hutool-all -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.7.12</version>
<version>5.8.27</version>
</dependency>
<dependency>
<groupId>gui.ava</groupId>
<artifactId>html2image</artifactId>
......
package pps.core.space.service;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.text.CharSequenceUtil;
......@@ -16,6 +17,8 @@ import pps.cloud.base.service.data.base_power_line_plant.DynamicQueryBasePowerLi
import pps.cloud.base.service.data.base_power_line_plant.DynamicQueryBasePowerLinePlantViewOutput;
import pps.cloud.base.service.data.base_price_strategy_detail.GetBasePriceStrategyDetailInput;
import pps.cloud.base.service.data.base_price_strategy_detail.GetBasePriceStrategyDetailOutput;
import pps.cloud.prediction.service.data.plant_predicted_power_data.DynamicQueryPlantPredictedPowerInput;
import pps.cloud.prediction.service.data.plant_predicted_power_data.DynamicQueryPlantPredictedPowerOutput;
import pps.core.common.constant.BusinessConstant;
import pps.core.common.entity.BaseModel;
import pps.core.space.entity.*;
......@@ -98,8 +101,9 @@ public class SpaceOptimizeShortPeriodService extends SpaceOptimizeBaseService {
.build());
linePlantResult.throwIfFail();
//取当前时间
DateTime date = DateUtil.beginOfDay(DateTime.now());
int month = date.monthBaseOne();
DateTime startDate = DateUtil.beginOfDay(DateTime.now());
DateTime optimizeDate = DateUtil.offsetDay(startDate, 1);
int month = startDate.monthBaseOne();
//查市电峰谷
IBasePriceStrategyCloudService strategyCloudService = context.getBean(IBasePriceStrategyCloudService.class);
XListResult<GetBasePriceStrategyDetailOutput> strategyResult = strategyCloudService.queryStrategyDetailList(context, GetBasePriceStrategyDetailInput.builder()
......@@ -119,9 +123,19 @@ public class SpaceOptimizeShortPeriodService extends SpaceOptimizeBaseService {
//峰谷策略ID/峰谷策略LIST Map
Map<String, List<GetBasePriceStrategyDetailOutput>> strategyMap = strategyResult.getResult().stream()
.collect(Collectors.groupingBy(GetBasePriceStrategyDetailOutput::getStrategyId));
//初始化时间轴
List<DateTime> rangeToList = DateUtil.rangeToList(DateUtil.offsetDay(BusinessConstant.DATE_FLAG, -1), BusinessConstant.DATE_FLAG, DateField.MINUTE, 15);
//遍历
for (SpaceInstitutionDetailEnt detail : detailEntList) {
List<DynamicQueryPlantPredictedPowerOutput> powerList = this.getAveragePowerGenerationListByPlantIds(context, DynamicQueryPlantPredictedPowerInput.builder()
.plantIds(plantIdsMap.get(detail.getLineId()))
.startTime(startDate.toString(BusinessConstant.DATE_FORMAT_DAY))
.endTime(optimizeDate.toString(BusinessConstant.DATE_FORMAT_DAY))
.dateType(BusinessConstant.ONE)
.build());
if (CollUtil.isEmpty(powerList)) {
continue;
}
}
return XServiceResult.OK;
}
......
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