Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
31068ee1
Commit
31068ee1
authored
May 17, 2024
by
朱晨阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
区域公司统计数据接口改造
parent
3c102c2b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
6 deletions
+39
-6
JpStationMapper.java
...oin/amos/boot/module/hygf/api/mapper/JpStationMapper.java
+1
-1
JpStationMapper.xml
...f-api/src/main/resources/mapper/mysql/JpStationMapper.xml
+4
-0
JpStationController.java
.../boot/module/hygf/biz/controller/JpStationController.java
+34
-5
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/JpStationMapper.java
View file @
31068ee1
...
...
@@ -37,7 +37,7 @@ public interface JpStationMapper extends BaseMapper<JpStation> {
List
<
JpStation
>
getJpStationList
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
@UserEmpower
(
field
={
"ORG_CODE"
}
,
dealerField
={
"ORG_CODE"
},
fieldConditions
={
"in"
,
"in"
}
,
relationship
=
"and"
,
specific
=
false
)
List
<
DropDown
>
getRegion
();
List
<
DropDown
>
getRegion
(
String
regionName
);
List
<
DropDown
>
getRegionAll
();
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/JpStationMapper.xml
View file @
31068ee1
...
...
@@ -246,6 +246,10 @@
FROM privilege_company
WHERE IS_DELETED = 0
and privilege_company.COMPANY_TYPE = 'region'
<if
test=
"regionName!=null and regionName!=''"
>
and privilege_company.COMPANY_NAME like concat("%",#{regionName}, "%")
</if>
</select>
<select
id=
"getRegionAll"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.DropDown"
>
SELECT privilege_company.ORG_CODE orgCode,
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/JpStationController.java
View file @
31068ee1
...
...
@@ -408,9 +408,9 @@ public class JpStationController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询当前登录人权限区域公司"
,
notes
=
"查询当前登录人权限区域公司"
)
@GetMapping
(
value
=
"/getRegion"
)
@UserLimits
public
ResponseModel
<
List
<
Map
<
String
,
String
>>>
getRegion
()
{
public
ResponseModel
<
List
<
Map
<
String
,
String
>>>
getRegion
(
String
regionName
)
{
List
<
DropDown
>
list
=
jpStationMapper
.
getRegion
();
List
<
DropDown
>
list
=
jpStationMapper
.
getRegion
(
regionName
);
List
<
Map
<
String
,
String
>>
result
=
new
ArrayList
<>();
list
.
forEach
(
dropDown
->
{
Map
<
String
,
String
>
item
=
new
HashMap
<>();
...
...
@@ -832,11 +832,40 @@ 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
,
@RequestParam
(
required
=
false
)
String
regionName
)
{
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getRegionStatistics
(
@RequestParam
(
required
=
false
)
String
regionName
)
{
// 获取区域公司列表
List
<
DropDown
>
regionlist
=
jpStationMapper
.
getRegion
(
regionName
);
Page
<
PowerStationStatistics
>
poserStatisticsData
=
jpStationServiceImpl
.
getRegionStatistics
(
current
,
size
,
regionName
);
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
<>(
);
return
ResponseHelper
.
buildResponse
(
poserStatisticsData
);
regionlist
.
stream
().
forEach
(
region
->
{
Map
<
String
,
Object
>
item
=
new
HashMap
<>();
JpStationDto
reviewDto
=
new
JpStationDto
();
reviewDto
.
setRegionalCompaniesCode
(
region
.
getOrgCode
());
// 根据区域公司code获取场站个数
Map
<
String
,
Object
>
zs
=
jpStationServiceImpl
.
getcount
(
reviewDto
);
// 获取统计数据
JpStationDto
jpStation
=
jpStationMapper
.
getCountJpStationdata
(
reviewDto
);
if
(
jpStation
==
null
){
jpStation
=
new
JpStationDto
();
}
item
.
put
(
"code"
,
region
.
getOrgCode
());
item
.
put
(
"name"
,
region
.
getName
());
item
.
put
(
"stationNumber"
,
zs
.
get
(
"num"
));
item
.
put
(
"capacity"
,
jpStation
.
getCapacity
());
item
.
put
(
"realTimePower"
,
jpStation
.
getRealTimePower
());
item
.
put
(
"dayIncome"
,
jpStation
.
getDayIncome
());
item
.
put
(
"dayGenerate"
,
jpStation
.
getDayGenerate
());
result
.
add
(
item
);
});
// Page<PowerStationStatistics> poserStatisticsData = jpStationServiceImpl.getRegionStatistics(current, size, regionName);
return
ResponseHelper
.
buildResponse
(
result
);
}
//查询经销商统计数据(根据区域公司orgCode)
...
...
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