Commit 49772abe authored by ZWT's avatar ZWT

feat(吉林演示): 松原

1.修改系统首页大屏总览接口,增加区分组织机构逻辑,完成接口冒烟测试;
2.修改系统首页获取井场列表接口,增加区分组织机构逻辑,完成接口冒烟测试;
3.修改系统首页井场功能下钻后提示报错问题,修改用电功率数据获取逻辑,修复报错问题;
4.修改输电线路分页列表查询接口,增加查询条件,在查询父线路列表时只查询10千伏线路,修改线上接口文档同时完成接口冒烟测试;
5.修改系统首页井场实时监控接口,增加区分组织机构逻辑,完成接口冒烟测试;
6.修改系统首页用能分析接口,增加区分组织机构逻辑,完成接口冒烟测试;
7.修改系统首页井场用能分析(双坐标轴)接口,增加区分组织机构逻辑,完成接口冒烟测试;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent ba856407
...@@ -126,9 +126,7 @@ public class HomePageService { ...@@ -126,9 +126,7 @@ public class HomePageService {
stationId = context.getSession(PpsUserSession.class).getOuId(); stationId = context.getSession(PpsUserSession.class).getOuId();
} }
List<String> ouIds = ServiceUtil.getOrgIdsByPath(context, stationId); List<String> ouIds = ServiceUtil.getOrgIdsByPath(context, stationId);
plantList = this.getPlantList(context, GetBasePhotovoltaicPlantCloudInput.builder() plantList = this.getPlantList(context, ouIds);
.ouIds(ouIds)
.build());
switch (ServiceUtil.getOilFieldCode(context)) { switch (ServiceUtil.getOilFieldCode(context)) {
case BusinessConstant.ENV_CQ: case BusinessConstant.ENV_CQ:
switch (stationId) { switch (stationId) {
...@@ -168,9 +166,7 @@ public class HomePageService { ...@@ -168,9 +166,7 @@ public class HomePageService {
photovoltaicPower = BigDecimal.ZERO; photovoltaicPower = BigDecimal.ZERO;
storagePower = BigDecimal.ZERO; storagePower = BigDecimal.ZERO;
} }
List<DynamicQueryBaseWellheadOutput> wellList = this.getWellList(context, DynamicQueryBaseWellheadInput.builder() List<DynamicQueryBaseWellheadOutput> wellList = this.getWellList(context, ouIds);
.ouIds(ouIds)
.build());
List<DynamicQueryBasePowerLineOutput> lineList = ServiceUtil.getPowerLineList(context, DynamicQueryBasePowerLineInput.builder() List<DynamicQueryBasePowerLineOutput> lineList = ServiceUtil.getPowerLineList(context, DynamicQueryBasePowerLineInput.builder()
.lineTypeKey("10") .lineTypeKey("10")
.ouIdList(ouIds) .ouIdList(ouIds)
...@@ -210,9 +206,7 @@ public class HomePageService { ...@@ -210,9 +206,7 @@ public class HomePageService {
switch (oilFieldCode) { switch (oilFieldCode) {
case BusinessConstant.ENV_CQ: case BusinessConstant.ENV_CQ:
//实时站 //实时站
Set<String> set = this.getPlantList(context, GetBasePhotovoltaicPlantCloudInput.builder() Set<String> set = this.getPlantList(context, ouIds).stream()
.ouIds(ouIds)
.build()).stream()
.map(GetBasePhotovoltaicPlantCloudOutput::getStationName) .map(GetBasePhotovoltaicPlantCloudOutput::getStationName)
.collect(Collectors.toSet()); .collect(Collectors.toSet());
ThirdDailyAccumulationUpdateMapper mapper = context.getBean(ThirdDailyAccumulationUpdateMapper.class); ThirdDailyAccumulationUpdateMapper mapper = context.getBean(ThirdDailyAccumulationUpdateMapper.class);
...@@ -236,9 +230,7 @@ public class HomePageService { ...@@ -236,9 +230,7 @@ public class HomePageService {
} }
//实时井口 //实时井口
int openWellNumber = 0, stopWellNumber = 0, openJCNumber = 0, openLCNumber = 0, stopJCNumber = 0, stopLCNumber = 0; int openWellNumber = 0, stopWellNumber = 0, openJCNumber = 0, openLCNumber = 0, stopJCNumber = 0, stopLCNumber = 0;
List<DynamicQueryBaseWellheadOutput> list = this.getWellList(context, DynamicQueryBaseWellheadInput.builder() List<DynamicQueryBaseWellheadOutput> list = this.getWellList(context, ouIds);
.ouIds(ouIds)
.build());
Map<String, String> collect = list.stream() Map<String, String> collect = list.stream()
.collect(Collectors.toMap(DynamicQueryBaseWellheadOutput::getWellNumber, DynamicQueryBaseWellheadOutput::getRunTypeKey)); .collect(Collectors.toMap(DynamicQueryBaseWellheadOutput::getWellNumber, DynamicQueryBaseWellheadOutput::getRunTypeKey));
ThirdCurrentWellConditionMapper wellMapper = context.getBean(ThirdCurrentWellConditionMapper.class); ThirdCurrentWellConditionMapper wellMapper = context.getBean(ThirdCurrentWellConditionMapper.class);
...@@ -297,13 +289,9 @@ public class HomePageService { ...@@ -297,13 +289,9 @@ public class HomePageService {
} }
List<String> ouIds = ServiceUtil.getOrgIdsByPath(context, stationId); List<String> ouIds = ServiceUtil.getOrgIdsByPath(context, stationId);
//查组织下所有井 //查组织下所有井
List<DynamicQueryBaseWellheadOutput> wellList = this.getWellList(context, DynamicQueryBaseWellheadInput.builder() List<DynamicQueryBaseWellheadOutput> wellList = this.getWellList(context, ouIds);
.ouIds(ouIds)
.build());
//查组织下所有电站 //查组织下所有电站
List<GetBasePhotovoltaicPlantCloudOutput> plantList = this.getPlantList(context, GetBasePhotovoltaicPlantCloudInput.builder() List<GetBasePhotovoltaicPlantCloudOutput> plantList = this.getPlantList(context, ouIds);
.ouIds(ouIds)
.build());
//查前七日用能分析 //查前七日用能分析
DateTime endTime = DateUtil.beginOfDay(DateUtil.date()); DateTime endTime = DateUtil.beginOfDay(DateUtil.date());
DateTime startTime = DateUtil.offsetDay(endTime, -7); DateTime startTime = DateUtil.offsetDay(endTime, -7);
...@@ -374,10 +362,14 @@ public class HomePageService { ...@@ -374,10 +362,14 @@ public class HomePageService {
@XApiGet @XApiGet
public XSingleResult<GetPowerAnalyseTrendOutput> getPowerAnalyseTrend(XContext context, GetStationViewInput input) { public XSingleResult<GetPowerAnalyseTrendOutput> getPowerAnalyseTrend(XContext context, GetStationViewInput input) {
String stationId = input.getStationId(); String stationId = input.getStationId();
if (CharSequenceUtil.isBlank(stationId)) {
stationId = context.getSession(PpsUserSession.class).getOuId();
}
List<String> ouIds = ServiceUtil.getOrgIdsByPath(context, stationId);
//查组织下所有井 //查组织下所有井
List<DynamicQueryBaseWellheadOutput> wellList = this.getWellList(context, stationId); List<DynamicQueryBaseWellheadOutput> wellList = this.getWellList(context, ouIds);
//查组织下所有电站 //查组织下所有电站
List<GetBasePhotovoltaicPlantCloudOutput> plantList = this.getPlantList(context, stationId, null); List<GetBasePhotovoltaicPlantCloudOutput> plantList = this.getPlantList(context, ouIds);
//查前七日用能分析 //查前七日用能分析
DateTime endTime = DateUtil.beginOfDay(DateUtil.date()); DateTime endTime = DateUtil.beginOfDay(DateUtil.date());
DateTime startTime = DateUtil.offsetDay(endTime, -7); DateTime startTime = DateUtil.offsetDay(endTime, -7);
...@@ -987,12 +979,14 @@ public class HomePageService { ...@@ -987,12 +979,14 @@ public class HomePageService {
* 获取井口列表 * 获取井口列表
* *
* @param context 上下文 * @param context 上下文
* @param input 输入 * @param ouIds ou-ids
* @return {@link List }<{@link DynamicQueryBaseWellheadOutput }> * @return {@link List }<{@link DynamicQueryBaseWellheadOutput }>
*/ */
private List<DynamicQueryBaseWellheadOutput> getWellList(XContext context, DynamicQueryBaseWellheadInput input) { private List<DynamicQueryBaseWellheadOutput> getWellList(XContext context, List<String> ouIds) {
IBaseWellheadCloudService service = context.getBean(IBaseWellheadCloudService.class); IBaseWellheadCloudService service = context.getBean(IBaseWellheadCloudService.class);
XListResult<DynamicQueryBaseWellheadOutput> result = service.queryBaseWellheadListByParam(context, input); XListResult<DynamicQueryBaseWellheadOutput> result = service.queryBaseWellheadListByParam(context, DynamicQueryBaseWellheadInput.builder()
.ouIds(ouIds)
.build());
result.throwIfFail(); result.throwIfFail();
return result.getResult(); return result.getResult();
} }
...@@ -1001,12 +995,14 @@ public class HomePageService { ...@@ -1001,12 +995,14 @@ public class HomePageService {
* 光伏电站列表 * 光伏电站列表
* *
* @param context 上下文 * @param context 上下文
* @param input 输入 * @param ouIds ou-ids
* @return {@link List }<{@link GetBasePhotovoltaicPlantCloudOutput }> * @return {@link List }<{@link GetBasePhotovoltaicPlantCloudOutput }>
*/ */
private List<GetBasePhotovoltaicPlantCloudOutput> getPlantList(XContext context, GetBasePhotovoltaicPlantCloudInput input) { private List<GetBasePhotovoltaicPlantCloudOutput> getPlantList(XContext context, List<String> ouIds) {
BasePhotovoltaicPlantCloudService service = context.getBean(BasePhotovoltaicPlantCloudService.class); BasePhotovoltaicPlantCloudService service = context.getBean(BasePhotovoltaicPlantCloudService.class);
XListResult<GetBasePhotovoltaicPlantCloudOutput> result = service.getBasePhotovoltaicPlantList(context, input); XListResult<GetBasePhotovoltaicPlantCloudOutput> result = service.getBasePhotovoltaicPlantList(context, GetBasePhotovoltaicPlantCloudInput.builder()
.ouIds(ouIds)
.build());
result.throwIfFail(); result.throwIfFail();
return result.getResult(); return result.getResult();
} }
......
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