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
5bb3e18c
Commit
5bb3e18c
authored
Mar 25, 2024
by
ZWT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(零碳): 长庆
1.长庆演示首页功能开发,新增查询井场/场站列表接口,添加接口文档并完成接口冒烟测试; BREAKING CHANGE: 无 Closes 无 [skip ci]
parent
cbe80241
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
159 additions
and
1 deletion
+159
-1
C02-system/pps-cloud-system/src/main/java/pps/cloud/system/service/SysOrganizationCloudService.java
...pps/cloud/system/service/SysOrganizationCloudService.java
+3
-1
C02-system/pps-core-system/src/main/java/pps/core/system/service/SysOrganizationCloudServiceImpl.java
.../core/system/service/SysOrganizationCloudServiceImpl.java
+12
-0
C09-base/pps-cloud-base/src/main/java/pps/cloud/base/service/data/base_photovoltaic_plant/GetBasePhotovoltaicPlantCloudInput.java
...hotovoltaic_plant/GetBasePhotovoltaicPlantCloudInput.java
+3
-0
C09-base/pps-cloud-base/src/main/java/pps/cloud/base/service/data/base_photovoltaic_plant/GetBasePhotovoltaicPlantCloudOutput.java
...otovoltaic_plant/GetBasePhotovoltaicPlantCloudOutput.java
+9
-0
C09-base/pps-core-base/src/main/java/pps/core/base/service/BasePhotovoltaicPlantCloudServiceImpl.java
...e/base/service/BasePhotovoltaicPlantCloudServiceImpl.java
+3
-0
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/service/HomePageService.java
...ain/java/pps/core/prediction/service/HomePageService.java
+78
-0
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/service/data/home_page/GetStationViewInput.java
...rediction/service/data/home_page/GetStationViewInput.java
+17
-0
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/service/data/home_page/GetStationViewOutput.java
...ediction/service/data/home_page/GetStationViewOutput.java
+34
-0
No files found.
C02-system/pps-cloud-system/src/main/java/pps/cloud/system/service/SysOrganizationCloudService.java
View file @
5bb3e18c
...
@@ -73,7 +73,7 @@ public interface SysOrganizationCloudService {
...
@@ -73,7 +73,7 @@ public interface SysOrganizationCloudService {
XListResult
<
GetSysOrganizationViewOutput
>
getOrganizationBySubOuIds
(
XContext
context
,
GetSysOrganizationViewInput
input
);
XListResult
<
GetSysOrganizationViewOutput
>
getOrganizationBySubOuIds
(
XContext
context
,
GetSysOrganizationViewInput
input
);
@XText
(
"根据用户id查询地区公司"
)
@XText
(
"根据用户id查询地区公司"
)
XListResult
<
GetSysOrganizationViewOutput
>
selectRegionFirmByUserId
(
XContext
context
,
SelectRegionFirmInput
input
);
XListResult
<
GetSysOrganizationViewOutput
>
selectRegionFirmByUserId
(
XContext
context
,
SelectRegionFirmInput
input
);
@XText
(
"根据父级id查询儿子级--最后一级查的是场站"
)
@XText
(
"根据父级id查询儿子级--最后一级查的是场站"
)
XListResult
<
GetSysOrganizationViewOutput
>
queryOuInfoOrStationByParentOuId
(
XContext
context
);
XListResult
<
GetSysOrganizationViewOutput
>
queryOuInfoOrStationByParentOuId
(
XContext
context
);
...
@@ -84,5 +84,7 @@ public interface SysOrganizationCloudService {
...
@@ -84,5 +84,7 @@ public interface SysOrganizationCloudService {
@XText
(
"根据组织机构id获取所有的子级组织机构列表"
)
@XText
(
"根据组织机构id获取所有的子级组织机构列表"
)
XListResult
<
GetSysOrganizationViewOutput
>
getAllListByOuId
(
XContext
context
,
GetAllOuListByOuIdInput
input
);
XListResult
<
GetSysOrganizationViewOutput
>
getAllListByOuId
(
XContext
context
,
GetAllOuListByOuIdInput
input
);
@XText
(
"查采油厂列表"
)
XListResult
<
GetSysOrganizationViewOutput
>
getPlantList
(
XContext
context
);
}
}
C02-system/pps-core-system/src/main/java/pps/core/system/service/SysOrganizationCloudServiceImpl.java
View file @
5bb3e18c
...
@@ -8,6 +8,7 @@ import org.springframework.util.CollectionUtils;
...
@@ -8,6 +8,7 @@ import org.springframework.util.CollectionUtils;
import
pps.cloud.system.enums.OuLevelDic
;
import
pps.cloud.system.enums.OuLevelDic
;
import
pps.cloud.system.service.SysOrganizationCloudService
;
import
pps.cloud.system.service.SysOrganizationCloudService
;
import
pps.cloud.system.service.data.*
;
import
pps.cloud.system.service.data.*
;
import
pps.core.common.constant.BusinessConstant
;
import
pps.core.common.session.PpsUserSession
;
import
pps.core.common.session.PpsUserSession
;
import
pps.core.system.constant.SysOrganizationCode
;
import
pps.core.system.constant.SysOrganizationCode
;
import
pps.core.system.entity.*
;
import
pps.core.system.entity.*
;
...
@@ -395,4 +396,15 @@ public class SysOrganizationCloudServiceImpl implements SysOrganizationCloudServ
...
@@ -395,4 +396,15 @@ public class SysOrganizationCloudServiceImpl implements SysOrganizationCloudServ
List
<
GetSysOrganizationViewOutput
>
viewList
=
XCopyUtils
.
copyNewList
(
list
,
GetSysOrganizationViewOutput
.
class
);
List
<
GetSysOrganizationViewOutput
>
viewList
=
XCopyUtils
.
copyNewList
(
list
,
GetSysOrganizationViewOutput
.
class
);
return
XListResult
.
success
(
viewList
);
return
XListResult
.
success
(
viewList
);
}
}
@Override
public
XListResult
<
GetSysOrganizationViewOutput
>
getPlantList
(
XContext
context
)
{
SysOrganizationMapper
mapper
=
context
.
getBean
(
SysOrganizationMapper
.
class
);
List
<
SysOrganizationEnt
>
plant
=
mapper
.
selectList
(
new
LambdaQueryWrapper
<
SysOrganizationEnt
>()
.
eq
(
SysOrganizationEnt:
:
getIsDeleted
,
BusinessConstant
.
ONE
)
.
eq
(
SysOrganizationEnt:
:
getOuLevel
,
"PLANT"
)
.
orderByAsc
(
SysOrganizationEnt:
:
getCreateTime
)
);
return
XListResult
.
success
(
XCopyUtils
.
copyNewList
(
plant
,
GetSysOrganizationViewOutput
.
class
));
}
}
}
C09-base/pps-cloud-base/src/main/java/pps/cloud/base/service/data/base_photovoltaic_plant/GetBasePhotovoltaicPlantCloudInput.java
View file @
5bb3e18c
...
@@ -28,6 +28,9 @@ public class GetBasePhotovoltaicPlantCloudInput {
...
@@ -28,6 +28,9 @@ public class GetBasePhotovoltaicPlantCloudInput {
@XText
(
"电站ID集合"
)
@XText
(
"电站ID集合"
)
private
List
<
String
>
plantIds
;
private
List
<
String
>
plantIds
;
@XText
(
"组织ID"
)
private
String
ouId
;
@XText
(
"组织ID集合"
)
@XText
(
"组织ID集合"
)
private
List
<
String
>
ouIds
;
private
List
<
String
>
ouIds
;
}
}
C09-base/pps-cloud-base/src/main/java/pps/cloud/base/service/data/base_photovoltaic_plant/GetBasePhotovoltaicPlantCloudOutput.java
View file @
5bb3e18c
...
@@ -70,4 +70,13 @@ public class GetBasePhotovoltaicPlantCloudOutput {
...
@@ -70,4 +70,13 @@ public class GetBasePhotovoltaicPlantCloudOutput {
@XText
(
"所属省份"
)
@XText
(
"所属省份"
)
private
String
provinceCode
;
private
String
provinceCode
;
@XText
(
"经度(°)"
)
private
BigDecimal
longitude
;
@XText
(
"纬度(°)"
)
private
BigDecimal
latitude
;
@XText
(
"高程(m)"
)
private
BigDecimal
elevation
;
}
}
C09-base/pps-core-base/src/main/java/pps/core/base/service/BasePhotovoltaicPlantCloudServiceImpl.java
View file @
5bb3e18c
package
pps.core.base.service
;
package
pps.core.base.service
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.text.CharSequenceUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
pps.cloud.base.service.BasePhotovoltaicPlantCloudService
;
import
pps.cloud.base.service.BasePhotovoltaicPlantCloudService
;
import
pps.cloud.base.service.data.base_photovoltaic_plant.GetBasePhotovoltaicPlantCloudInput
;
import
pps.cloud.base.service.data.base_photovoltaic_plant.GetBasePhotovoltaicPlantCloudInput
;
...
@@ -34,10 +35,12 @@ public class BasePhotovoltaicPlantCloudServiceImpl implements BasePhotovoltaicPl
...
@@ -34,10 +35,12 @@ public class BasePhotovoltaicPlantCloudServiceImpl implements BasePhotovoltaicPl
*/
*/
@Override
@Override
public
XListResult
<
GetBasePhotovoltaicPlantCloudOutput
>
getBasePhotovoltaicPlantList
(
XContext
context
,
GetBasePhotovoltaicPlantCloudInput
input
)
{
public
XListResult
<
GetBasePhotovoltaicPlantCloudOutput
>
getBasePhotovoltaicPlantList
(
XContext
context
,
GetBasePhotovoltaicPlantCloudInput
input
)
{
String
ouId
=
input
.
getOuId
();
List
<
String
>
plantIds
=
input
.
getPlantIds
();
List
<
String
>
plantIds
=
input
.
getPlantIds
();
BasePhotovoltaicPlantMapper
mapper
=
context
.
getBean
(
BasePhotovoltaicPlantMapper
.
class
);
BasePhotovoltaicPlantMapper
mapper
=
context
.
getBean
(
BasePhotovoltaicPlantMapper
.
class
);
List
<
BasePhotovoltaicPlantEnt
>
list
=
mapper
.
selectList
(
new
LambdaQueryWrapper
<
BasePhotovoltaicPlantEnt
>()
List
<
BasePhotovoltaicPlantEnt
>
list
=
mapper
.
selectList
(
new
LambdaQueryWrapper
<
BasePhotovoltaicPlantEnt
>()
.
eq
(
BaseModel:
:
getIsDeleted
,
BusinessConstant
.
ONE
)
.
eq
(
BaseModel:
:
getIsDeleted
,
BusinessConstant
.
ONE
)
.
eq
(
CharSequenceUtil
.
isNotBlank
(
ouId
),
BasePhotovoltaicPlantEnt:
:
getOuId
,
ouId
)
.
in
(
CollUtil
.
isNotEmpty
(
plantIds
),
BaseModel:
:
getId
,
plantIds
)
.
in
(
CollUtil
.
isNotEmpty
(
plantIds
),
BaseModel:
:
getId
,
plantIds
)
);
);
List
<
GetBasePhotovoltaicPlantCloudOutput
>
outPuts
=
XCopyUtils
.
copyNewList
(
list
,
GetBasePhotovoltaicPlantCloudOutput
.
class
);
List
<
GetBasePhotovoltaicPlantCloudOutput
>
outPuts
=
XCopyUtils
.
copyNewList
(
list
,
GetBasePhotovoltaicPlantCloudOutput
.
class
);
...
...
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/service/HomePageService.java
0 → 100644
View file @
5bb3e18c
package
pps.core.prediction.service
;
import
cn.hutool.core.text.CharSequenceUtil
;
import
pps.cloud.base.service.BasePhotovoltaicPlantCloudService
;
import
pps.cloud.base.service.data.base_photovoltaic_plant.GetBasePhotovoltaicPlantCloudInput
;
import
pps.cloud.base.service.data.base_photovoltaic_plant.GetBasePhotovoltaicPlantCloudOutput
;
import
pps.cloud.system.service.SysOrganizationCloudService
;
import
pps.cloud.system.service.data.GetSysOrganizationViewOutput
;
import
pps.core.prediction.service.data.home_page.GetStationViewInput
;
import
pps.core.prediction.service.data.home_page.GetStationViewOutput
;
import
xstartup.annotation.XService
;
import
xstartup.annotation.XText
;
import
xstartup.base.XContext
;
import
xstartup.data.XListResult
;
import
xstartup.feature.api.annotation.XApiAnonymous
;
import
xstartup.feature.api.annotation.XApiGet
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 首页
*
* @author ZWT
* @date 2024/03/25 17:54
*/
@XText
(
"首页模块"
)
@XService
public
class
HomePageService
{
/**
* 首页模块--井场列表
*
* @param context 上下文
* @param input 输入
* @return {@link XListResult}<{@link GetStationViewOutput}>
*/
@XApiAnonymous
@XText
(
"首页模块--井场列表"
)
@XApiGet
public
XListResult
<
GetStationViewOutput
>
getStationList
(
XContext
context
,
GetStationViewInput
input
)
{
List
<
GetStationViewOutput
>
outputs
;
String
stationId
=
input
.
getStationId
();
if
(
CharSequenceUtil
.
isBlank
(
stationId
))
{
//查组织
SysOrganizationCloudService
service
=
context
.
getBean
(
SysOrganizationCloudService
.
class
);
XListResult
<
GetSysOrganizationViewOutput
>
result
=
service
.
getPlantList
(
context
);
result
.
throwIfFail
();
outputs
=
new
ArrayList
<>(
result
.
getResult
().
size
());
result
.
getResult
().
forEach
(
item
->
{
GetStationViewOutput
output
=
new
GetStationViewOutput
();
output
.
setStationId
(
item
.
getId
());
output
.
setStationName
(
item
.
getOuName
());
outputs
.
add
(
output
);
});
}
else
{
//查电站
BasePhotovoltaicPlantCloudService
service
=
context
.
getBean
(
BasePhotovoltaicPlantCloudService
.
class
);
XListResult
<
GetBasePhotovoltaicPlantCloudOutput
>
result
=
service
.
getBasePhotovoltaicPlantList
(
context
,
GetBasePhotovoltaicPlantCloudInput
.
builder
()
.
ouId
(
stationId
)
.
build
());
result
.
throwIfFail
();
outputs
=
new
ArrayList
<>(
result
.
getResult
().
size
());
result
.
getResult
().
forEach
(
item
->
{
GetStationViewOutput
output
=
new
GetStationViewOutput
();
output
.
setStationId
(
item
.
getId
());
output
.
setStationName
(
item
.
getStationName
());
outputs
.
add
(
GetStationViewOutput
.
builder
()
.
stationId
(
item
.
getId
())
.
stationName
(
item
.
getStationName
())
.
longitude
(
item
.
getLongitude
())
.
latitude
(
item
.
getLatitude
())
.
build
());
});
}
return
XListResult
.
success
(
outputs
);
}
}
\ No newline at end of file
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/service/data/home_page/GetStationViewInput.java
0 → 100644
View file @
5bb3e18c
package
pps.core.prediction.service.data.home_page
;
import
lombok.Data
;
import
xstartup.annotation.XText
;
/**
* 电站组织入参
*
* @author ZWT
* @date 2024/03/25 19:42
*/
@Data
public
class
GetStationViewInput
{
@XText
(
"站ID"
)
private
String
stationId
;
}
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/service/data/home_page/GetStationViewOutput.java
0 → 100644
View file @
5bb3e18c
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/03/25 19:40
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public
class
GetStationViewOutput
{
@XText
(
"站ID"
)
private
String
stationId
;
@XText
(
"站名称"
)
private
String
stationName
;
@XText
(
"经度(°)"
)
private
BigDecimal
longitude
;
@XText
(
"纬度(°)"
)
private
BigDecimal
latitude
;
}
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