Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gf_back
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tianchao
gf_back
Commits
82928ff6
Commit
82928ff6
authored
Apr 01, 2024
by
ZWT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(零碳): 长庆
1.长庆演示首页功能开发,新增采油厂统计信息查询接口,添加线上接口并完成接口冒烟测试; BREAKING CHANGE: 无 Closes 无 [skip ci]
parent
def77ba8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
97 additions
and
0 deletions
+97
-0
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/enums/BusinessError.java
...rc/main/java/pps/core/prediction/enums/BusinessError.java
+1
-0
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/service/HomePageService.java
...ain/java/pps/core/prediction/service/HomePageService.java
+52
-0
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/service/data/home_page/GetOilExtractionPlantOutput.java
...n/service/data/home_page/GetOilExtractionPlantOutput.java
+44
-0
No files found.
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/enums/BusinessError.java
View file @
82928ff6
...
...
@@ -13,6 +13,7 @@ public enum BusinessError implements XError {
DateTypeError
(
2200
,
"日期类型错误"
),
TheStartEndDateIsMissing
(
2201
,
"缺少开始结束日期"
),
GetSanDieLoginInfoError
(
2202
,
"获取三叠登录信息失败"
),
MissingoilExtractionPlantID
(
2203
,
"缺少采油厂ID"
),
;
private
int
code
;
...
...
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/service/HomePageService.java
View file @
82928ff6
...
...
@@ -21,10 +21,12 @@ import pps.cloud.base.service.data.base_wellhead.DynamicQueryBaseWellheadOutput;
import
pps.cloud.system.service.SysOrganizationCloudService
;
import
pps.cloud.system.service.data.GetAllOuListByOuIdInput
;
import
pps.cloud.system.service.data.GetSysOrganizationViewOutput
;
import
pps.core.common.constant.BusinessConstant
;
import
pps.core.prediction.constant.ThirdPartyApiConstant
;
import
pps.core.prediction.entity.EnergyConsumptionAnalysisEnt
;
import
pps.core.prediction.entity.PredictedPowerView
;
import
pps.core.prediction.entity.ThirdActivePowerDailyUpdateView
;
import
pps.core.prediction.enums.BusinessError
;
import
pps.core.prediction.mapper.EnergyConsumptionAnalysisMapper
;
import
pps.core.prediction.mapper.PredictedPowerViewMapper
;
import
pps.core.prediction.mapper.ThirdActivePowerDailyUpdateViewMapper
;
...
...
@@ -39,6 +41,7 @@ import xstartup.annotation.XText;
import
xstartup.base.XContext
;
import
xstartup.data.XListResult
;
import
xstartup.data.XSingleResult
;
import
xstartup.feature.api.annotation.XApiAnonymous
;
import
xstartup.feature.api.annotation.XApiGet
;
import
java.math.BigDecimal
;
...
...
@@ -398,6 +401,55 @@ public class HomePageService {
.
build
());
}
/**
* 采油厂详情
*
* @param context 上下文
* @param input 输入
* @return {@link XSingleResult}<{@link GetOilExtractionPlantOutput}>
*/
@XApiAnonymous
@XText
(
"首页模块--采油厂详情"
)
@XApiGet
public
XSingleResult
<
GetOilExtractionPlantOutput
>
getOilExtractionPlantInfo
(
XContext
context
,
GetStationViewInput
input
)
{
String
stationId
=
input
.
getStationId
();
if
(
CharSequenceUtil
.
isBlank
(
stationId
))
{
return
XSingleResult
.
error
(
context
,
BusinessError
.
MissingoilExtractionPlantID
);
}
Integer
intervalWellNumber
=
0
;
Integer
continuousWellNumber
=
0
;
BigDecimal
operatingLoad
=
BigDecimal
.
ZERO
;
//井口统计
List
<
DynamicQueryBaseWellheadOutput
>
wellList
=
this
.
getWellList
(
context
,
stationId
);
for
(
DynamicQueryBaseWellheadOutput
well
:
wellList
)
{
if
(
CharSequenceUtil
.
equals
(
BusinessConstant
.
CONTINUOUS_PUMPING_WELL
,
well
.
getRunTypeKey
()))
{
continuousWellNumber
++;
}
else
{
intervalWellNumber
++;
}
operatingLoad
=
operatingLoad
.
add
(
well
.
getRatedPower
());
}
//线路统计
List
<
DynamicQueryBasePowerLineOutput
>
lineList
=
this
.
getLineList
(
context
,
stationId
,
"10"
);
//光伏电站
List
<
GetBasePhotovoltaicPlantCloudOutput
>
plantList
=
this
.
getPlantList
(
context
,
stationId
);
//储能电站
List
<
DynamicQueryBaseEnergyStorageDeviceOutput
>
storageList
=
this
.
getStorageList
(
context
,
stationId
);
return
XSingleResult
.
success
(
GetOilExtractionPlantOutput
.
builder
()
.
wellNumber
(
wellList
.
size
())
.
intervalWellNumber
(
intervalWellNumber
)
.
continuousWellNumber
(
continuousWellNumber
)
.
operatingLoad
(
operatingLoad
)
.
lineNumber
(
lineList
.
size
())
.
photovoltaicPower
(
plantList
.
stream
()
.
map
(
GetBasePhotovoltaicPlantCloudOutput:
:
getTotalPower
)
.
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
))
.
storagePower
(
storageList
.
stream
()
.
map
(
DynamicQueryBaseEnergyStorageDeviceOutput:
:
getApparatusCapacity
)
.
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
))
.
build
());
}
/*------------------------------------------------- private ---------------------------------------------------------*/
/**
...
...
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/service/data/home_page/GetOilExtractionPlantOutput.java
0 → 100644
View file @
82928ff6
package
pps.core.prediction.service.data.home_page
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
xstartup.annotation.XText
;
import
java.math.BigDecimal
;
/**
* 获取采油厂信息
*
* @author ZWT
* @date 2024/04/01
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public
class
GetOilExtractionPlantOutput
{
@XText
(
"井口数量"
)
private
Integer
wellNumber
;
@XText
(
"间抽井数量"
)
private
Integer
intervalWellNumber
;
@XText
(
"连抽井数量"
)
private
Integer
continuousWellNumber
;
@XText
(
"累计额定功率"
)
private
BigDecimal
operatingLoad
;
@XText
(
"线路数量"
)
private
Integer
lineNumber
;
@XText
(
"光伏装机总量"
)
private
BigDecimal
photovoltaicPower
;
@XText
(
"储能装机总量"
)
private
BigDecimal
storagePower
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment