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
47b18e62
Commit
47b18e62
authored
May 17, 2024
by
朱晨阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
经销商统计数据接口改造
parent
31068ee1
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
+3
-0
JpStationController.java
.../boot/module/hygf/biz/controller/JpStationController.java
+35
-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 @
47b18e62
...
...
@@ -42,7 +42,7 @@ public interface JpStationMapper extends BaseMapper<JpStation> {
List
<
DropDown
>
getRegionAll
();
@UserEmpower
(
field
={
"hygf_regional_companies.regional_companies_code"
}
,
dealerField
={
"hygf_unit_info.amos_company_code"
,
"hygf_regional_companies.regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
List
<
DropDown
>
getDealer
(
@Param
(
"regionalCompaniesCode"
)
String
regionalCompaniesCode
);
List
<
DropDown
>
getDealer
(
@Param
(
"regionalCompaniesCode"
)
String
regionalCompaniesCode
,
String
dealerName
);
List
<
DropDown
>
getDealerAll
(
@Param
(
"regionalCompaniesCode"
)
String
regionalCompaniesCode
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/JpStationMapper.xml
View file @
47b18e62
...
...
@@ -267,6 +267,9 @@
<if
test=
"regionalCompaniesCode!=null"
>
and hygf_regional_companies.regional_companies_code =#{regionalCompaniesCode}
</if>
<if
test=
"dealerName!=null and dealerName!=''"
>
and hygf_unit_info.`name` like concat("%",#{dealerName}, "%")
</if>
and hygf_unit_info.amos_company_code is not null
GROUP BY hygf_unit_info.amos_company_code,hygf_unit_info.`name`
</select>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/JpStationController.java
View file @
47b18e62
...
...
@@ -444,8 +444,8 @@ public class JpStationController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询当前登录人权限经销商"
,
notes
=
"查询当前登录人权限经销商"
)
@GetMapping
(
value
=
"/getDealer"
)
@UserLimits
public
ResponseModel
<
List
<
Map
<
String
,
String
>>>
getDealer
(
String
regionalCompaniesCode
)
{
List
<
DropDown
>
list
=
jpStationMapper
.
getDealer
(
regionalCompaniesCode
);
public
ResponseModel
<
List
<
Map
<
String
,
String
>>>
getDealer
(
String
regionalCompaniesCode
,
String
dealerName
)
{
List
<
DropDown
>
list
=
jpStationMapper
.
getDealer
(
regionalCompaniesCode
,
dealerName
);
List
<
Map
<
String
,
String
>>
result
=
new
ArrayList
<>();
list
.
forEach
(
dropDown
->
{
Map
<
String
,
String
>
item
=
new
HashMap
<>();
...
...
@@ -873,11 +873,41 @@ public class JpStationController extends BaseController {
@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
regionalCompaniesCode
,
@RequestParam
(
required
=
false
)
String
dealerName
)
{
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getDealerStatistics
(
String
regionalCompaniesCode
,
String
dealerName
)
{
Page
<
PowerStationStatistics
>
poserStatisticsData
=
jpStationServiceImpl
.
getDealerStatistics
(
current
,
size
,
regionalCompaniesCode
,
dealerName
);
// Page<PowerStationStatistics> poserStatisticsData = jpStationServiceImpl.getDealerStatistics(current, size, regionalCompaniesCode, dealerName);
// 根据区域公司code获取经销商
List
<
DropDown
>
dealerlist
=
jpStationMapper
.
getDealer
(
regionalCompaniesCode
,
dealerName
);
return
ResponseHelper
.
buildResponse
(
poserStatisticsData
);
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
<>();
dealerlist
.
stream
().
forEach
(
dealer
->
{
Map
<
String
,
Object
>
item
=
new
HashMap
<>();
JpStationDto
reviewDto
=
new
JpStationDto
();
reviewDto
.
setAmosCompanyCode
(
dealer
.
getOrgCode
());
// 根据区域公司code获取场站个数
Map
<
String
,
Object
>
zs
=
jpStationServiceImpl
.
getcount
(
reviewDto
);
// 获取统计数据
JpStationDto
jpStation
=
jpStationMapper
.
getCountJpStationdata
(
reviewDto
);
if
(
jpStation
==
null
){
jpStation
=
new
JpStationDto
();
}
item
.
put
(
"code"
,
dealer
.
getOrgCode
());
item
.
put
(
"name"
,
dealer
.
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
);
});
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