Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
1633c285
Commit
1633c285
authored
Apr 23, 2024
by
朱晨阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加经销商电站数据统计接口
parent
4867725e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
57 additions
and
15 deletions
+57
-15
PowerStationStatistics.java
...amos/boot/module/hygf/api/dto/PowerStationStatistics.java
+2
-2
JpStationMapper.java
...oin/amos/boot/module/hygf/api/mapper/JpStationMapper.java
+5
-1
IJpStationService.java
.../amos/boot/module/hygf/api/service/IJpStationService.java
+2
-0
JpStationMapper.xml
...f-api/src/main/resources/mapper/mysql/JpStationMapper.xml
+0
-0
JpStationController.java
.../boot/module/hygf/biz/controller/JpStationController.java
+18
-9
JpStationServiceImpl.java
...ot/module/hygf/biz/service/impl/JpStationServiceImpl.java
+30
-3
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/PowerStationStatistics.java
View file @
1633c285
...
...
@@ -13,8 +13,8 @@ import lombok.Data;
*/
@Data
public
class
PowerStationStatistics
{
private
String
regionCompanyName
;
// 区域公司
private
String
regionCompanyOrgCode
;
// 区域公司orgC
ode
private
String
name
;
// 区域公司/经销商名称
private
String
code
;
// 区域公司/经销商c
ode
private
Integer
powerStationNumber
;
// 电站总数
private
Double
totalCapacity
;
// 装机容量
private
Double
totalDayGenerate
;
// 日发电量
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/JpStationMapper.java
View file @
1633c285
...
...
@@ -69,5 +69,9 @@ public interface JpStationMapper extends BaseMapper<JpStation> {
List
<
PowerStationStatistics
>
getRegionPage
(
String
regionName
);
PowerStationStatistics
getRegionStatistics
(
String
orgCode
);
PowerStationStatistics
getRegionStatistics
(
String
code
);
List
<
PowerStationStatistics
>
getDealerPage
(
String
regionCompanyOrgCode
,
String
dealerName
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/service/IJpStationService.java
View file @
1633c285
...
...
@@ -37,4 +37,6 @@ public interface IJpStationService {
Map
<
String
,
List
<
Object
>>
getPowerqxnew
(
String
date
,
JpStationDto
reviewDto
);
Page
<
PowerStationStatistics
>
getRegionStatistics
(
Integer
current
,
Integer
size
,
String
regionName
);
Page
<
PowerStationStatistics
>
getDealerStatistics
(
Integer
current
,
Integer
size
,
String
regionCompanyOrgCode
,
String
dealerName
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/JpStationMapper.xml
View file @
1633c285
This diff is collapsed.
Click to expand it.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/JpStationController.java
View file @
1633c285
...
...
@@ -181,8 +181,7 @@ public class JpStationController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/queryPage"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站列表"
,
notes
=
"场站列表"
)
public
ResponseModel
<
Page
<
JpStationDto
>>
queryForDealerReviewPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
JpStationDto
reviewDto
)
{
public
ResponseModel
<
Page
<
JpStationDto
>>
queryForDealerReviewPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
JpStationDto
reviewDto
)
{
List
<
JpPersonStation
>
pPersonStation
=
null
;
if
(
reviewDto
.
getName
()
!=
null
&&
!
""
.
equals
(
reviewDto
.
getName
()))
{
...
...
@@ -731,8 +730,7 @@ public class JpStationController extends BaseController {
@GetMapping
(
value
=
"/queryPagenew"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站列表"
,
notes
=
"场站列表"
)
@UserLimits
public
ResponseModel
<
Page
<
JpStationDto
>>
queryPagenew
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
JpStationDto
reviewDto
)
{
public
ResponseModel
<
Page
<
JpStationDto
>>
queryPagenew
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
JpStationDto
reviewDto
)
{
Page
<
JpStationDto
>
page
=
jpStationServiceImpl
.
queryForJpStationPagenew
(
current
,
size
,
reviewDto
);
return
ResponseHelper
.
buildResponse
(
page
);
}
...
...
@@ -740,8 +738,7 @@ public class JpStationController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/queryReport"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"场站报表"
,
notes
=
"场站报表"
)
public
ResponseModel
<
Page
<
JpStationDto
>>
queryReport
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestBody
JpStationDto
reviewDto
,
@RequestParam
(
value
=
"type"
)
String
type
)
{
public
ResponseModel
<
Page
<
JpStationDto
>>
queryReport
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestBody
JpStationDto
reviewDto
,
@RequestParam
(
value
=
"type"
)
String
type
)
{
Page
<
JpStationDto
>
page
=
jpStationServiceImpl
.
queryReport
(
current
,
size
,
reviewDto
,
type
);
...
...
@@ -792,10 +789,22 @@ public class JpStationController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询当前登录人权限区域公司统计数据"
,
notes
=
"查询当前登录人权限区域公司统计数据"
)
@GetMapping
(
value
=
"/getRegionStatistics"
)
// @UserLimits
public
ResponseModel
<
Page
<
PowerStationStatistics
>>
getRegionStatistics
(
@RequestParam
(
defaultValue
=
"1"
)
Integer
current
,
@RequestParam
(
defaultValue
=
"10"
)
Integer
size
,
String
regionName
)
{
public
ResponseModel
<
Page
<
PowerStationStatistics
>>
getRegionStatistics
(
@RequestParam
(
defaultValue
=
"1"
)
Integer
current
,
@RequestParam
(
defaultValue
=
"10"
)
Integer
size
,
@RequestParam
(
required
=
false
)
String
regionName
)
{
Page
<
PowerStationStatistics
>
region
StatisticsData
=
jpStationServiceImpl
.
getRegionStatistics
(
current
,
size
,
regionName
);
Page
<
PowerStationStatistics
>
poser
StatisticsData
=
jpStationServiceImpl
.
getRegionStatistics
(
current
,
size
,
regionName
);
return
ResponseHelper
.
buildResponse
(
regionStatisticsData
);
return
ResponseHelper
.
buildResponse
(
poserStatisticsData
);
}
//查询经销商统计数据(根据区域公司orgCode)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询经销商统计数据"
,
notes
=
"查询经销商统计数据"
)
@GetMapping
(
value
=
"/getDealerStatistics"
)
// @UserLimits
public
ResponseModel
<
Page
<
PowerStationStatistics
>>
getDealerStatistics
(
@RequestParam
(
defaultValue
=
"1"
)
Integer
current
,
@RequestParam
(
defaultValue
=
"10"
)
Integer
size
,
String
regionCompanyOrgCode
,
@RequestParam
(
required
=
false
)
String
dealerName
)
{
Page
<
PowerStationStatistics
>
poserStatisticsData
=
jpStationServiceImpl
.
getDealerStatistics
(
current
,
size
,
regionCompanyOrgCode
,
dealerName
);
return
ResponseHelper
.
buildResponse
(
poserStatisticsData
);
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/JpStationServiceImpl.java
View file @
1633c285
...
...
@@ -757,9 +757,9 @@ public class JpStationServiceImpl extends BaseService<JpStationDto, JpStation, J
List
<
PowerStationStatistics
>
resultPage
=
new
ArrayList
<>();
page
.
getList
().
stream
().
forEach
(
powerStationStatistics
->
{
PowerStationStatistics
regionStatistics
=
jpStationMapper
.
getRegionStatistics
(
powerStationStatistics
.
get
RegionCompanyOrg
Code
());
regionStatistics
.
set
RegionCompanyName
(
powerStationStatistics
.
getRegionCompany
Name
());
regionStatistics
.
set
RegionCompanyOrgCode
(
powerStationStatistics
.
getRegionCompanyOrg
Code
());
PowerStationStatistics
regionStatistics
=
jpStationMapper
.
getRegionStatistics
(
powerStationStatistics
.
getCode
());
regionStatistics
.
set
Name
(
powerStationStatistics
.
get
Name
());
regionStatistics
.
set
Code
(
powerStationStatistics
.
get
Code
());
resultPage
.
add
(
regionStatistics
);
});
...
...
@@ -772,4 +772,30 @@ public class JpStationServiceImpl extends BaseService<JpStationDto, JpStation, J
return
pagenew
;
}
@Override
public
Page
<
PowerStationStatistics
>
getDealerStatistics
(
Integer
current
,
Integer
size
,
String
regionCompanyOrgCode
,
String
dealerName
)
{
PageHelper
.
startPage
(
current
,
size
);
// 根据区域公司orgCode查询区域公司下所有的经销商
List
<
PowerStationStatistics
>
dealerPage
=
jpStationMapper
.
getDealerPage
(
regionCompanyOrgCode
,
dealerName
);
PageInfo
<
PowerStationStatistics
>
page
=
new
PageInfo
(
dealerPage
);
Page
<
PowerStationStatistics
>
pagenew
=
new
Page
<
PowerStationStatistics
>();
List
<
PowerStationStatistics
>
resultPage
=
new
ArrayList
<>();
page
.
getList
().
stream
().
forEach
(
powerStationStatistics
->
{
PowerStationStatistics
regionStatistics
=
jpStationMapper
.
getRegionStatistics
(
powerStationStatistics
.
getCode
());
regionStatistics
.
setName
(
powerStationStatistics
.
getName
());
regionStatistics
.
setCode
(
powerStationStatistics
.
getCode
());
resultPage
.
add
(
regionStatistics
);
});
pagenew
.
setCurrent
(
current
);
pagenew
.
setTotal
(
page
.
getTotal
());
pagenew
.
setSize
(
size
);
pagenew
.
setRecords
(
resultPage
);
return
pagenew
;
}
}
\ No newline at end of file
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