Commit 3aa16167 authored by ZWT's avatar ZWT

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

[
1.统计分析-井组监控页功能开发,开发井组生产详情接口,完成接口冒烟测试并编写线上接口文档生成接口用例;
2.统计分析-井组监控页功能开发,开发井口实时信息接口,完成接口冒烟测试并编写线上接口文档生成接口用例;
3.统计分析-井组监控页功能开发,开发光伏电站发电详情接口,完成接口冒烟测试并编写线上接口文档生成接口用例;
4.统计分析-能耗分析页功能开发,开发今日/昨日/同期电量统计接口,完成接口冒烟测试并编写线上接口文档生成接口用例;
]
parent da3c4c38
......@@ -79,7 +79,7 @@ public class EnergyConsumptionAnalysisService {
* @return {@link XListResult }<{@link PowerStatisticsOutput }>
*/
@XText("能耗分析--今日/昨日/同期电量统计")
@XApiGet
@XApiGet(anonymous = true)
public XListResult<PowerStatisticsOutput> powerStatistics(XContext context, GetEnergyConsumptionAnalysisInput input) {
DynamicQueryBasePowerLinePlantInput plantInput = new DynamicQueryBasePowerLinePlantInput();
String stationName = input.getStationName();
......@@ -101,6 +101,7 @@ public class EnergyConsumptionAnalysisService {
.stationNameList(plantList.stream()
.map(DynamicQueryBasePowerLinePlantViewOutput::getStationName)
.collect(Collectors.toList()))
.systemSource(ServiceUtil.getOilFieldCode(context))
.build());
outputs = XCopyUtils.copyNewList(viewList, PowerStatisticsOutput.class);
} else {
......
......@@ -92,11 +92,12 @@
FROM third_daily_accumulation_update
WHERE
DATE ( create_date) = #{today}
AND system_source = #{systemSource}
AND station_name IN
<foreach collection="stationNameList" open="(" close=")" separator="," item="item">
#{item}
</foreach>
UNION
UNION ALL
SELECT IFNULL(SUM(photovoltaic_power), 0) AS photovoltaic_power,
IFNULL(SUM(daily_electricity_consumption), 0) AS daily_electricity_consumption,
IFNULL(SUM(in_place_consumption), 0) AS in_place_consumption,
......@@ -104,11 +105,12 @@
FROM third_daily_accumulation_update
WHERE
DATE ( create_date ) = #{yesterday}
AND system_source = #{systemSource}
AND station_name IN
<foreach collection="stationNameList" open="(" close=")" separator="," item="item">
#{item}
</foreach>
UNION
UNION ALL
SELECT IFNULL(SUM(photovoltaic_power), 0) AS photovoltaic_power,
IFNULL(SUM(daily_electricity_consumption), 0) AS daily_electricity_consumption,
IFNULL(SUM(in_place_consumption), 0) AS in_place_consumption,
......@@ -116,6 +118,7 @@
FROM third_daily_accumulation_update
WHERE
DATE ( create_date ) = #{lastYear}
AND system_source = #{systemSource}
AND station_name IN
<foreach collection="stationNameList" open="(" close=")" separator="," item="item">
#{item}
......
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