Commit 203cbc92 authored by ZWT's avatar ZWT

feat(零碳): 长庆

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

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent 2c27e58e
......@@ -293,13 +293,13 @@ public class HomePageService {
.collect(Collectors.groupingBy(DynamicQueryBasePowerLineOutput::getOuId));
stationList = new ArrayList<>(4);
for (Map.Entry<String, List<DynamicQueryBasePowerLineOutput>> entry : listMap.entrySet()) {
List<String> lineIdList = entry.getValue().stream()
.map(DynamicQueryBasePowerLineOutput::getId)
List<String> lineNameList = entry.getValue().stream()
.map(DynamicQueryBasePowerLineOutput::getLineName)
.collect(Collectors.toList());
EnergyConsumptionAnalysisEnt ent = mapper.selectOne(new QueryWrapper<EnergyConsumptionAnalysisEnt>()
.select("IFNULL( SUM( power_consumption ), 0 ) AS power_consumption")
.lambda()
.in(EnergyConsumptionAnalysisEnt::getLineId, lineIdList)
.in(EnergyConsumptionAnalysisEnt::getStationName, lineNameList)
.eq(EnergyConsumptionAnalysisEnt::getDataDate, startTime)
);
stationList.add(GetStationPowerConsumption.builder()
......@@ -309,11 +309,13 @@ public class HomePageService {
powerConsumption = powerConsumption.add(ent.getPowerConsumption());
}
} else {
List<String> lineIdList = this.getBasePowerLineListByOuIdList(context, CollUtil.list(false, stationId)).stream().map(DynamicQueryBasePowerLineOutput::getId).collect(Collectors.toList());
List<String> lineNameList = this.getBasePowerLineListByOuIdList(context, CollUtil.list(false, stationId)).stream()
.map(DynamicQueryBasePowerLineOutput::getLineName)
.collect(Collectors.toList());
List<EnergyConsumptionAnalysisEnt> list = mapper.selectList(new QueryWrapper<EnergyConsumptionAnalysisEnt>()
.select("IFNULL( SUM( power_consumption ), 0 ) AS power_consumption", "station_name")
.lambda()
.in(EnergyConsumptionAnalysisEnt::getLineId, lineIdList)
.in(EnergyConsumptionAnalysisEnt::getStationName, lineNameList)
.eq(EnergyConsumptionAnalysisEnt::getDataDate, startTime)
.groupBy(EnergyConsumptionAnalysisEnt::getStationName)
);
......
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