Commit 36a3c0c7 authored by ZWT's avatar ZWT

feat[零碳项目]: 松原演示

[
1.统计分析-井组监控页功能开发,开发井组生产详情接口,完成接口冒烟测试并编写线上接口文档生成接口用例;
2.统计分析-井组监控页功能开发,开发井口实时信息接口,完成接口冒烟测试并编写线上接口文档生成接口用例;
3.统计分析-井组监控页功能开发,开发光伏电站发电详情接口,完成接口冒烟测试并编写线上接口文档生成接口用例;
4.统计分析-能耗分析页功能开发,开发今日/昨日/同期电量统计接口,完成接口冒烟测试并编写线上接口文档生成接口用例;
5.统计分析-能耗分析页功能开发,开发光伏发电趋势统计接口,完成接口冒烟测试并编写线上接口文档生成接口用例;
6.统计分析-能耗分析页功能开发,开发用能分析统计接口,完成接口冒烟测试并编写线上接口文档生成接口用例;
7.统计分析-能耗分析页功能开发,开发光伏/市电用电占比趋势分析接口,完成接口冒烟测试并编写线上接口文档生成接口用例;
8.统计分析-能耗分析页功能开发,开发峰谷能耗对比分析接口,完成接口冒烟测试并编写线上接口文档生成接口用例;
]
parent d2adb329
......@@ -7,6 +7,7 @@ import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.text.CharSequenceUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.RandomUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import pps.cloud.base.service.IBasePowerLineCloudService;
......@@ -1051,8 +1052,43 @@ public class EnergyConsumptionAnalysisService {
/*------------------------------ 能耗分析(松原) ------------------------------*/
/**
* 能耗分析(松原)--峰谷能耗对比分析
*
* @param context 上下文
* @param input 输入
* @return {@link XListResult }<{@link GetEnergyComparisonAnalysisOutput }>
*/
@XText("能耗分析--峰谷能耗对比分析")
@XApiGet
public XListResult<GetEnergyComparisonAnalysisOutput> energyComparisonAnalysis(XContext context, QueryEnergyConsumptionAnalysisInput input) {
DynamicQueryBasePowerLineWellheadInput wellheadInput = new DynamicQueryBasePowerLineWellheadInput();
DynamicQueryBasePowerLinePlantInput plantInput = new DynamicQueryBasePowerLinePlantInput();
String stationName = input.getStationName();
if (CharSequenceUtil.isNotBlank(stationName)) {
wellheadInput.setLineName(stationName);
plantInput.setLineName(stationName);
} else {
List<String> orgIds = this.getOrgIdsByPath(context, input.getOuId());
wellheadInput.setOuIds(orgIds);
plantInput.setOuIds(orgIds);
}
input.getBetweenDate();
//封装数据
List<DateTime> rangeToList = DateUtil.rangeToList(input.getStartTime(), input.getEndTime(), DateField.HOUR_OF_DAY);
List<GetEnergyComparisonAnalysisOutput> outputs = new ArrayList<>(rangeToList.size());
for (DateTime dateTime : rangeToList) {
outputs.add(GetEnergyComparisonAnalysisOutput.builder()
.dateFormat(dateTime.toString())
.electricityFees(RandomUtil.randomBigDecimal(BusinessConstant.BIG_DECIMAL_60, BusinessConstant.BIG_DECIMAL_10000).setScale(2, RoundingMode.HALF_UP))
.valleyElectricPower(RandomUtil.randomBigDecimal(BusinessConstant.BIG_DECIMAL_60, BusinessConstant.BIG_DECIMAL_10000).setScale(2, RoundingMode.HALF_UP))
.ordinaryElectricPower(RandomUtil.randomBigDecimal(BusinessConstant.BIG_DECIMAL_60, BusinessConstant.BIG_DECIMAL_10000).setScale(2, RoundingMode.HALF_UP))
.highElectricPower(RandomUtil.randomBigDecimal(BusinessConstant.BIG_DECIMAL_60, BusinessConstant.BIG_DECIMAL_10000).setScale(2, RoundingMode.HALF_UP))
.peakElectricPower(RandomUtil.randomBigDecimal(BusinessConstant.BIG_DECIMAL_60, BusinessConstant.BIG_DECIMAL_10000).setScale(2, RoundingMode.HALF_UP))
.build());
}
return XListResult.success(outputs);
}
/*-----------------------------------private-----------------------------------*/
......
package pps.core.prediction.service.data.energy_consumption_analysis;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import xstartup.annotation.XText;
import java.math.BigDecimal;
/**
* 峰谷能耗对比分析
*
* @author ZWT
* @date 2024/07/26
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class GetEnergyComparisonAnalysisOutput {
@XText("日期")
private String dateFormat;
@XText("电费(元)")
private BigDecimal electricityFees;
@XText("谷电用电量(kWh)")
private BigDecimal valleyElectricPower;
@XText("平电用电量(kWh)")
private BigDecimal ordinaryElectricPower;
@XText("高峰用电量(kWh)")
private BigDecimal highElectricPower;
@XText("尖峰用电量(kWh)")
private BigDecimal peakElectricPower;
}
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