Commit eeb5c662 authored by ZWT's avatar ZWT

feat(零碳): 长庆

1.长庆演示首页功能开发,新增采油厂统计信息查询接口,添加线上接口并完成接口冒烟测试;
2.长庆演示首页功能开发,新增线路图查询接口,添加线上接口并完成接口冒烟测试;
3.长庆演示首页功能开发,新增线路详情查询接口,添加线上接口并完成接口冒烟测试;
4.对接第三方接口,完成获取井场日累计数据接口调用,创建数据表,同时生成对应代码,开发定时任务及对外接口,完成第三方数据接入及系统展示功能,添加线上接口文档并完成接口及定时任务冒烟测试;
5.对接第三方接口,完成获取第三方单井平均有功功率接口调用,创建数据表,同时生成对应代码,开发定时任务及对外接口,完成第三方数据接入及系统展示功能,添加线上接口文档并完成接口及定时任务冒烟测试;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent bece0a29
...@@ -20,6 +20,13 @@ public class DynamicQueryBasePowerLinePlantViewOutput { ...@@ -20,6 +20,13 @@ public class DynamicQueryBasePowerLinePlantViewOutput {
@XText("线路ID") @XText("线路ID")
private String lineId; private String lineId;
/**
* 电站名称
*/
@XText("电站名称")
private String stationName;
/** /**
* 装机总量 * 装机总量
*/ */
......
...@@ -5,7 +5,7 @@ import org.springframework.stereotype.Repository; ...@@ -5,7 +5,7 @@ import org.springframework.stereotype.Repository;
import pps.core.prediction.entity.EnergyConsumptionAnalysisEnt; import pps.core.prediction.entity.EnergyConsumptionAnalysisEnt;
/** /**
* 能耗分析表(测试用) * 能耗分析表
* *
* @author ZWT * @author ZWT
* @date 2023/11/23 * @date 2023/11/23
......
...@@ -7,7 +7,7 @@ import pps.core.prediction.entity.EnergyConsumptionAnalysisView; ...@@ -7,7 +7,7 @@ import pps.core.prediction.entity.EnergyConsumptionAnalysisView;
import java.util.List; import java.util.List;
/** /**
* 能耗分析表(测试用) * 能耗分析表
* *
* @author ZWT * @author ZWT
* @date 2023/11/23 * @date 2023/11/23
......
...@@ -582,26 +582,24 @@ public class HomePageService { ...@@ -582,26 +582,24 @@ public class HomePageService {
if (CollUtil.isNotEmpty(plantViewList)) { if (CollUtil.isNotEmpty(plantViewList)) {
areaName = this.getSysAreaPath(context, plantViewList.get(0).getAreaCode()); areaName = this.getSysAreaPath(context, plantViewList.get(0).getAreaCode());
} }
BigDecimal cumulativeProduction = BigDecimal.ZERO; //查平均产液量
try { WellheadDailyProductionSituationMapper mapper = context.getBean(WellheadDailyProductionSituationMapper.class);
//实时站 BigDecimal cumulativeProduction = mapper.selectOne(new QueryWrapper<WellheadDailyProductionSituationEnt>()
String stationResult = ServiceUtil.doPostFormCq(context, .select("IFNULL( AVG( daily_liquid_production ), 0 ) AS daily_liquid_production ")
ThirdPartyApiConstant.CQ_GROUP_REAL_PV_DATA, .lambda()
new HashMap<>(0)); .in(WellheadDailyProductionSituationEnt::getWellNumber, wellheadList.stream()
List<GetCumulativePowerGenerationOutput> stationList = JSON.parseArray(stationResult, GetCumulativePowerGenerationOutput.class); .map(DynamicQueryBasePowerLineWellheadViewOutput::getWellNumber)
if (CollUtil.isNotEmpty(stationList)) { .collect(Collectors.toList()))
Set<String> set = this.getLineList(context, null, null, input.getLineId()).stream() ).getDailyLiquidProduction();
.map(DynamicQueryBasePowerLineOutput::getLineName) //查平均发电量
.collect(Collectors.toSet()); EnergyConsumptionAnalysisMapper analysisMapper = context.getBean(EnergyConsumptionAnalysisMapper.class);
for (GetCumulativePowerGenerationOutput station : stationList) { BigDecimal powerGeneration = analysisMapper.selectOne(new QueryWrapper<EnergyConsumptionAnalysisEnt>()
if (set.contains(station.getStationName())) { .select("IFNULL( AVG( power_generation ), 0 ) AS power_generation ")
cumulativeProduction = cumulativeProduction.add(station.getDailyLiquidProduction()); .lambda()
} .in(EnergyConsumptionAnalysisEnt::getStationName, plantViewList.stream()
} .map(DynamicQueryBasePowerLinePlantViewOutput::getStationName)
} .collect(Collectors.toList()))
} catch (Exception e) { ).getPowerGeneration();
context.getLogger().error(e);
}
return XSingleResult.success(GetLineViewOutput.builder() return XSingleResult.success(GetLineViewOutput.builder()
.wellList(wellheadList) .wellList(wellheadList)
.operatingLoad(operatingLoad) .operatingLoad(operatingLoad)
...@@ -609,7 +607,7 @@ public class HomePageService { ...@@ -609,7 +607,7 @@ public class HomePageService {
.photovoltaicPower(plantViewList.stream() .photovoltaicPower(plantViewList.stream()
.map(DynamicQueryBasePowerLinePlantViewOutput::getTotalPower) .map(DynamicQueryBasePowerLinePlantViewOutput::getTotalPower)
.reduce(BigDecimal.ZERO, BigDecimal::add)) .reduce(BigDecimal.ZERO, BigDecimal::add))
.powerGeneration(BigDecimal.ZERO) .powerGeneration(powerGeneration)
.areaName(areaName) .areaName(areaName)
.build()); .build());
} }
......
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