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
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
201 additions
and
134 deletions
+201
-134
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
+144
-119
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;
...
@@ -13,8 +13,8 @@ import lombok.Data;
*/
*/
@Data
@Data
public
class
PowerStationStatistics
{
public
class
PowerStationStatistics
{
private
String
regionCompanyName
;
// 区域公司
private
String
name
;
// 区域公司/经销商名称
private
String
regionCompanyOrgCode
;
// 区域公司orgC
ode
private
String
code
;
// 区域公司/经销商c
ode
private
Integer
powerStationNumber
;
// 电站总数
private
Integer
powerStationNumber
;
// 电站总数
private
Double
totalCapacity
;
// 装机容量
private
Double
totalCapacity
;
// 装机容量
private
Double
totalDayGenerate
;
// 日发电量
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> {
...
@@ -69,5 +69,9 @@ public interface JpStationMapper extends BaseMapper<JpStation> {
List
<
PowerStationStatistics
>
getRegionPage
(
String
regionName
);
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 {
...
@@ -37,4 +37,6 @@ public interface IJpStationService {
Map
<
String
,
List
<
Object
>>
getPowerqxnew
(
String
date
,
JpStationDto
reviewDto
);
Map
<
String
,
List
<
Object
>>
getPowerqxnew
(
String
date
,
JpStationDto
reviewDto
);
Page
<
PowerStationStatistics
>
getRegionStatistics
(
Integer
current
,
Integer
size
,
String
regionName
);
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
...
@@ -2,12 +2,12 @@
...
@@ -2,12 +2,12 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.hygf.api.mapper.JpStationMapper"
>
<mapper
namespace=
"com.yeejoin.amos.boot.module.hygf.api.mapper.JpStationMapper"
>
<select
id=
"queryForDealerReviewPage"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto"
>
<select
id=
"queryForDealerReviewPage"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto"
>
select
select
`sequence_nbr` sequenceNbr,
`sequence_nbr` sequenceNbr,
`rec_date`
recDate,
`rec_date` recDate,
`rec_user_id` recUserId,
`rec_user_id` recUserId,
`rec_user_name` recUserName,
`rec_user_name` recUserName,
`sn_code` snCode,
`sn_code` snCode,
...
@@ -52,53 +52,53 @@
...
@@ -52,53 +52,53 @@
from hygf_jp_station
from hygf_jp_station
<where>
<where>
<if
test=
"dto.name!=null"
>
<if
test=
"dto.name!=null"
>
and hygf_jp_station.name like concat(concat("%",#{dto.name}),"%")
and hygf_jp_station.name like concat(concat("%",#{dto.name}),"%")
</if>
</if>
<if
test=
"dto.userName!=null"
>
<if
test=
"dto.userName!=null"
>
and hygf_jp_station.user_name like concat(concat("%",#{dto.userName}),"%")
and hygf_jp_station.user_name like concat(concat("%",#{dto.userName}),"%")
</if>
</if>
<if
test=
"dto.address!=null"
>
<if
test=
"dto.address!=null"
>
and hygf_jp_station.address like concat(concat("%",#{dto.address}),"%")
and hygf_jp_station.address like concat(concat("%",#{dto.address}),"%")
</if>
</if>
<if
test=
"dto.area!=null"
>
<if
test=
"dto.area!=null"
>
and hygf_jp_station.area like concat(concat("%",#{dto.area}),"%")
and hygf_jp_station.area like concat(concat("%",#{dto.area}),"%")
</if>
</if>
<if
test=
"dto.statioId!=null"
>
<if
test=
"dto.statioId!=null"
>
and hygf_jp_station.third_station_id in
and hygf_jp_station.third_station_id in
<foreach
collection=
"dto.statioId"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
<foreach
collection=
"dto.statioId"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item.stationId}
#{item.stationId}
</foreach>
</foreach>
</if>
</if>
<if
test=
"dto.thirdStationIds!=null"
>
<if
test=
"dto.thirdStationIds!=null"
>
and hygf_jp_station.third_station_id in
and hygf_jp_station.third_station_id in
<foreach
collection=
"dto.thirdStationIds"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
<foreach
collection=
"dto.thirdStationIds"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
#{item}
</foreach>
</foreach>
</if>
</if>
<if
test=
"dto.thirdStationId!=null"
>
<if
test=
"dto.thirdStationId!=null"
>
and hygf_jp_station.third_station_id =#{dto.thirdStationId}
and hygf_jp_station.third_station_id =#{dto.thirdStationId}
</if>
</if>
</where>
</where>
</select>
</select>
<select
id=
"queryCount"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto"
>
<select
id=
"queryCount"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto"
>
select
select
ROUND(sum(real_time_power),3) realTimePower,
ROUND(sum(real_time_power),3) realTimePower,
ROUND(sum(capacity)/1000,3) capacity,
ROUND(sum(capacity)/1000,3) capacity,
ROUND(sum(day_generate)/1000,3) dayGenerate,
ROUND(sum(day_generate)/1000,3) dayGenerate,
ROUND(sum(month_generate)/1000,3)
monthGenerate,
ROUND(sum(month_generate)/1000,3) monthGenerate,
ROUND(sum(year_generate)/1000,3) yearGenerate,
ROUND(sum(year_generate)/1000,3) yearGenerate,
ROUND(sum(accumulated_power)/1000,3) accumulatedPower,
ROUND(sum(accumulated_power)/1000,3) accumulatedPower,
ROUND( sum(day_income),3) dayIncome,
ROUND( sum(day_income),3) dayIncome,
ROUND(sum(month_income)/10000,3) monthIncome,
ROUND(sum(month_income)/10000,3) monthIncome,
ROUND(sum(year_income)/10000,3) yearIncome,
ROUND(sum(year_income)/10000,3) yearIncome,
ROUND(sum(cumulative_income)/10000,3)
cumulativeIncome,
ROUND(sum(cumulative_income)/10000,3) cumulativeIncome,
ROUND(sum(day_power_use)/1000,3) dayPowerUse,
ROUND(sum(day_power_use)/1000,3) dayPowerUse,
ROUND(sum(month_power_use)/1000,3) monthPowerUse,
ROUND(sum(month_power_use)/1000,3) monthPowerUse,
ROUND(sum(year_power_use)/1000,3) yearPowerUse,
ROUND(sum(year_power_use)/1000,3) yearPowerUse,
...
@@ -125,7 +125,7 @@
...
@@ -125,7 +125,7 @@
</select>
</select>
<select
id=
"countState"
resultType=
"map"
>
<select
id=
"countState"
resultType=
"map"
>
select
select
...
@@ -151,19 +151,19 @@
...
@@ -151,19 +151,19 @@
#{item.stationId}
#{item.stationId}
</foreach>
</foreach>
</if>
</if>
and hygf_jp_station.`state` is not
null
and hygf_jp_station.`state` in ("在线","报警","离线")
and hygf_jp_station.`state` is not
null
and hygf_jp_station.`state` in ("在线","报警","离线")
GROUP BY
state
GROUP BY state
</where>
</where>
</select>
</select>
<select
id=
"getJpStation"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.entity.JpStation"
>
<select
id=
"getJpStation"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.entity.JpStation"
>
select
select
*
*
from hygf_jp_station
from hygf_jp_station
<where>
<where>
is_delete=0
is_delete=0
<if
test=
"dto.name!=null"
>
<if
test=
"dto.name!=null"
>
and hygf_jp_station.name like concat(concat("%",#{dto.name}),"%")
and hygf_jp_station.name like concat(concat("%",#{dto.name}),"%")
...
@@ -193,13 +193,13 @@
...
@@ -193,13 +193,13 @@
and hygf_jp_station.amos_company_code =#{dto.amosCompanyCode}
and hygf_jp_station.amos_company_code =#{dto.amosCompanyCode}
</if>
</if>
<if
test=
"dto.state!=null"
>
<if
test=
"dto.state!=null"
>
and
hygf_jp_station.`state` =#{dto.state}
and hygf_jp_station.`state` =#{dto.state}
</if>
</if>
</where>
</where>
</select>
</select>
<select
id=
"getJpStationList"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.entity.JpStation"
>
<select
id=
"getJpStationList"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.entity.JpStation"
>
select
select
*
*
from hygf_jp_station
from hygf_jp_station
...
@@ -234,39 +234,43 @@
...
@@ -234,39 +234,43 @@
and hygf_jp_station.amos_company_code =#{dto.amosCompanyCode}
and hygf_jp_station.amos_company_code =#{dto.amosCompanyCode}
</if>
</if>
<if
test=
"dto.state!=null"
>
<if
test=
"dto.state!=null"
>
and
hygf_jp_station.`state` =#{dto.state}
and hygf_jp_station.`state` =#{dto.state}
</if>
</if>
</where>
</where>
</select>
</select>
<select
id=
"getRegion"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.DropDown"
>
<select
id=
"getRegion"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.DropDown"
>
SELECT privilege_company.ORG_CODE orgCode ,
SELECT privilege_company.ORG_CODE orgCode,
privilege_company.COMPANY_NAME name
privilege_company.COMPANY_NAME name
FROM privilege_company
FROM privilege_company
WHERE IS_DELETED=0 and privilege_company.COMPANY_TYPE = 'region'
WHERE IS_DELETED = 0
and privilege_company.COMPANY_TYPE = 'region'
</select>
</select>
<select
id=
"getRegionAll"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.DropDown"
>
<select
id=
"getRegionAll"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.DropDown"
>
SELECT privilege_company.ORG_CODE orgCode ,
SELECT privilege_company.ORG_CODE orgCode,
privilege_company.COMPANY_NAME name
privilege_company.COMPANY_NAME name
FROM privilege_company
FROM privilege_company
WHERE IS_DELETED=0 and privilege_company.COMPANY_TYPE = 'region'
WHERE IS_DELETED = 0
and privilege_company.COMPANY_TYPE = 'region'
</select>
</select>
<select
id=
"getDealer"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.DropDown"
>
<select
id=
"getDealer"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.DropDown"
>
SELECT hygf_unit_info.`name`, hygf_unit_info.amos_company_code orgCode FROM hygf_regional_companies LEFT JOIN hygf_unit_info
SELECT hygf_unit_info.`name`, hygf_unit_info.amos_company_code orgCode FROM hygf_regional_companies LEFT JOIN
ON hygf_unit_info.sequence_nbr=hygf_regional_companies.unit_info_id WHERE hygf_unit_info.audit_status='2'
hygf_unit_info
AND hygf_unit_info.blacklist='0' AND hygf_unit_info.is_delete='0'
ON hygf_unit_info.sequence_nbr=hygf_regional_companies.unit_info_id WHERE hygf_unit_info.audit_status='2'
AND hygf_unit_info.blacklist='0' AND hygf_unit_info.is_delete='0'
<if
test=
"regionalCompaniesCode!=null"
>
<if
test=
"regionalCompaniesCode!=null"
>
and hygf_regional_companies.regional_companies_code =#{regionalCompaniesCode}
and hygf_regional_companies.regional_companies_code =#{regionalCompaniesCode}
</if>
</if>
and hygf_unit_info.amos_company_code is not null
and hygf_unit_info.amos_company_code is not null
GROUP BY hygf_unit_info.amos_company_code,hygf_unit_info.`name`
GROUP BY hygf_unit_info.amos_company_code,hygf_unit_info.`name`
</select>
</select>
<select
id=
"getDealerAll"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.DropDown"
>
<select
id=
"getDealerAll"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.DropDown"
>
SELECT hygf_unit_info.`name`, hygf_unit_info.amos_company_code orgCode FROM hygf_regional_companies LEFT JOIN hygf_unit_info
SELECT hygf_unit_info.`name`, hygf_unit_info.amos_company_code orgCode FROM hygf_regional_companies LEFT JOIN
ON hygf_unit_info.sequence_nbr=hygf_regional_companies.unit_info_id WHERE hygf_unit_info.audit_status='2'
hygf_unit_info
ON hygf_unit_info.sequence_nbr=hygf_regional_companies.unit_info_id WHERE hygf_unit_info.audit_status='2'
AND hygf_unit_info.blacklist='0' AND hygf_unit_info.is_delete='0'
AND hygf_unit_info.blacklist='0' AND hygf_unit_info.is_delete='0'
<if
test=
"regionalCompaniesCode!=null"
>
<if
test=
"regionalCompaniesCode!=null"
>
and hygf_regional_companies.regional_companies_code =#{regionalCompaniesCode}
and hygf_regional_companies.regional_companies_code =#{regionalCompaniesCode}
...
@@ -275,11 +279,11 @@
...
@@ -275,11 +279,11 @@
GROUP BY hygf_unit_info.amos_company_code,hygf_unit_info.`name`
GROUP BY hygf_unit_info.amos_company_code,hygf_unit_info.`name`
</select>
</select>
<select
id=
"getDealerNew"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.DropDown"
>
<select
id=
"getDealerNew"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.DropDown"
>
SELECT
hygf_unit_info.`name`, hygf_unit_info.sequence_nbr
orgCode
SELECT
hygf_unit_info.`name`, hygf_unit_info.sequence_nbr
orgCode
FROM hygf_regional_companies LEFT JOIN hygf_unit_info
FROM hygf_regional_companies LEFT JOIN hygf_unit_info
ON hygf_unit_info.sequence_nbr=hygf_regional_companies.unit_info_id
WHERE hygf_unit_info.audit_status='2'
ON hygf_unit_info.sequence_nbr=hygf_regional_companies.unit_info_id WHERE hygf_unit_info.audit_status='2'
AND hygf_unit_info.blacklist='0' AND hygf_unit_info.is_delete='0'
AND hygf_unit_info.blacklist='0' AND hygf_unit_info.is_delete='0'
<if
test=
"regionalCompaniesSeq!=null"
>
<if
test=
"regionalCompaniesSeq!=null"
>
and hygf_regional_companies.regional_companies_seq =#{regionalCompaniesSeq}
and hygf_regional_companies.regional_companies_seq =#{regionalCompaniesSeq}
...
@@ -289,22 +293,20 @@
...
@@ -289,22 +293,20 @@
</select>
</select>
<select
id=
"getCountJpStationdata"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto"
>
<select
id=
"getCountJpStationdata"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto"
>
select
select
ROUND(sum(real_time_power),3) realTimePower,
ROUND(sum(real_time_power),3) realTimePower,
ROUND(sum(capacity)/1000,3) capacity,
ROUND(sum(capacity)/1000,3) capacity,
ROUND(sum(day_generate)/1000,3) dayGenerate,
ROUND(sum(day_generate)/1000,3) dayGenerate,
ROUND(sum(month_generate)/1000,3)
monthGenerate,
ROUND(sum(month_generate)/1000,3) monthGenerate,
ROUND(sum(year_generate)/1000,3) yearGenerate,
ROUND(sum(year_generate)/1000,3) yearGenerate,
ROUND(sum(accumulated_power)/1000,3) accumulatedPower,
ROUND(sum(accumulated_power)/1000,3) accumulatedPower,
ROUND( sum(day_income),3) dayIncome,
ROUND( sum(day_income),3) dayIncome,
ROUND(sum(month_income)/10000,3) monthIncome,
ROUND(sum(month_income)/10000,3) monthIncome,
ROUND(sum(year_income)/10000,3) yearIncome,
ROUND(sum(year_income)/10000,3) yearIncome,
ROUND(sum(cumulative_income)/10000,3)
cumulativeIncome,
ROUND(sum(cumulative_income)/10000,3) cumulativeIncome,
ROUND(sum(day_power_use)/1000,3) dayPowerUse,
ROUND(sum(day_power_use)/1000,3) dayPowerUse,
ROUND(sum(month_power_use)/1000,3) monthPowerUse,
ROUND(sum(month_power_use)/1000,3) monthPowerUse,
ROUND(sum(year_power_use)/1000,3) yearPowerUse,
ROUND(sum(year_power_use)/1000,3) yearPowerUse,
...
@@ -337,7 +339,7 @@
...
@@ -337,7 +339,7 @@
</select>
</select>
<select
id=
"getcountState"
resultType=
"map"
>
<select
id=
"getcountState"
resultType=
"map"
>
select
select
...
@@ -372,13 +374,13 @@
...
@@ -372,13 +374,13 @@
<if
test=
"dto.amosCompanyCode!=null"
>
<if
test=
"dto.amosCompanyCode!=null"
>
and hygf_jp_station.amos_company_code =#{dto.amosCompanyCode}
and hygf_jp_station.amos_company_code =#{dto.amosCompanyCode}
</if>
</if>
and hygf_jp_station.`state` is not
null
and hygf_jp_station.`state` in ("在线","报警","离线")
and hygf_jp_station.`state` is not
null
and hygf_jp_station.`state` in ("在线","报警","离线")
GROUP BY
state
GROUP BY state
</where>
</where>
</select>
</select>
<select
id=
"getcountStatetc"
resultType=
"map"
>
<select
id=
"getcountStatetc"
resultType=
"map"
>
select
select
...
@@ -416,7 +418,7 @@
...
@@ -416,7 +418,7 @@
</where>
</where>
</select>
</select>
<select
id=
"getcountStatejs"
resultType=
"map"
>
<select
id=
"getcountStatejs"
resultType=
"map"
>
select
select
...
@@ -455,7 +457,7 @@
...
@@ -455,7 +457,7 @@
</select>
</select>
<select
id=
"getcountStatejr"
resultType=
"map"
>
<select
id=
"getcountStatejr"
resultType=
"map"
>
select
select
...
@@ -494,49 +496,49 @@
...
@@ -494,49 +496,49 @@
</select>
</select>
<select
id=
"getcount"
resultType=
"map"
>
<select
id=
"getcount"
resultType=
"map"
>
select
select
count(*) num
count(*) num
from hygf_jp_station
from hygf_jp_station
<where>
<where>
<if
test=
"dto.name!=null"
>
<if
test=
"dto.name!=null"
>
and hygf_jp_station.name like concat(concat("%",#{dto.name}),"%")
and hygf_jp_station.name like concat(concat("%",#{dto.name}),"%")
</if>
</if>
<if
test=
"dto.userName!=null"
>
<if
test=
"dto.userName!=null"
>
and hygf_jp_station.user_name like concat(concat("%",#{dto.userName}),"%")
and hygf_jp_station.user_name like concat(concat("%",#{dto.userName}),"%")
</if>
</if>
<if
test=
"dto.address!=null"
>
<if
test=
"dto.address!=null"
>
and hygf_jp_station.address like concat(concat("%",#{dto.address}),"%")
and hygf_jp_station.address like concat(concat("%",#{dto.address}),"%")
</if>
</if>
<if
test=
"dto.area!=null"
>
<if
test=
"dto.area!=null"
>
and hygf_jp_station.area like concat(concat("%",#{dto.area}),"%")
and hygf_jp_station.area like concat(concat("%",#{dto.area}),"%")
</if>
</if>
<if
test=
"dto.statioId!=null"
>
<if
test=
"dto.statioId!=null"
>
and hygf_jp_station.third_station_id in
and hygf_jp_station.third_station_id in
<foreach
collection=
"dto.statioId"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
<foreach
collection=
"dto.statioId"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item.stationId}
#{item.stationId}
</foreach>
</foreach>
</if>
</if>
<if
test=
"dto.thirdStationId!=null"
>
<if
test=
"dto.thirdStationId!=null"
>
and hygf_jp_station.third_station_id =#{dto.thirdStationId}
and hygf_jp_station.third_station_id =#{dto.thirdStationId}
</if>
</if>
<if
test=
"dto.regionalCompaniesCode!=null"
>
<if
test=
"dto.regionalCompaniesCode!=null"
>
and hygf_jp_station.regional_companies_code =#{dto.regionalCompaniesCode}
and hygf_jp_station.regional_companies_code =#{dto.regionalCompaniesCode}
</if>
</if>
<if
test=
"dto.amosCompanyCode!=null"
>
<if
test=
"dto.amosCompanyCode!=null"
>
and hygf_jp_station.amos_company_code =#{dto.amosCompanyCode}
and hygf_jp_station.amos_company_code =#{dto.amosCompanyCode}
</if>
</if>
</where>
</where>
</select>
</select>
<select
id=
"queryForDealerReviewPagenew"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto"
>
<select
id=
"queryForDealerReviewPagenew"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto"
>
select
select
`sequence_nbr` sequenceNbr,
`sequence_nbr` sequenceNbr,
`rec_date`
recDate,
`rec_date` recDate,
`rec_user_id` recUserId,
`rec_user_id` recUserId,
`rec_user_name` recUserName,
`rec_user_name` recUserName,
`sn_code` snCode,
`sn_code` snCode,
...
@@ -570,7 +572,7 @@
...
@@ -570,7 +572,7 @@
`is_delete` isDelete,
`is_delete` isDelete,
ROUND(`day_generate`,3) dayGenerate,
ROUND(`day_generate`,3) dayGenerate,
ROUND(`month_generate`,3) monthGenerate,
ROUND(`month_generate`,3) monthGenerate,
ROUND(`year_generate`,3)
yearGenerate,
ROUND(`year_generate`,3) yearGenerate,
`day_income` dayIncome,
`day_income` dayIncome,
`month_income` monthIncome,
`month_income` monthIncome,
`year_income` yearIncome,
`year_income` yearIncome,
...
@@ -579,7 +581,8 @@
...
@@ -579,7 +581,8 @@
`email`,
`email`,
rated_power ratedPower,
rated_power ratedPower,
ROUND(`day_generate`/capacity,3) fullhour,
ROUND(`day_generate`/capacity,3) fullhour,
(select privilege_company.COMPANY_NAME from privilege_company where privilege_company.ORG_CODE=hygf_jp_station.regional_companies_code) regionalCompaniesName
(select privilege_company.COMPANY_NAME from privilege_company where
privilege_company.ORG_CODE=hygf_jp_station.regional_companies_code) regionalCompaniesName
from hygf_jp_station
from hygf_jp_station
<where>
<where>
<if
test=
"dto.name!=null"
>
<if
test=
"dto.name!=null"
>
...
@@ -617,9 +620,12 @@
...
@@ -617,9 +620,12 @@
</select>
</select>
<select
id=
"getRegionPage"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationStatistics"
>
SELECT privilege_company.ORG_CODE regionCompanyOrgCode ,
<!-- ========电站监控区域=======-->
privilege_company.COMPANY_NAME regionCompanyName
<select
id=
"getRegionPage"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationStatistics"
>
SELECT privilege_company.ORG_CODE code ,
privilege_company.COMPANY_NAME name
FROM privilege_company
FROM privilege_company
<where>
<where>
IS_DELETED=0 and privilege_company.COMPANY_TYPE = 'region'
IS_DELETED=0 and privilege_company.COMPANY_TYPE = 'region'
...
@@ -629,13 +635,32 @@
...
@@ -629,13 +635,32 @@
</where>
</where>
</select>
</select>
<select
id=
"getRegionStatistics"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationStatistics"
>
<!-- code参数为区域公司orgCode或经销商orgCode-->
<select
id=
"getRegionStatistics"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationStatistics"
>
SELECT COUNT(*) AS powerStationNumber,
SELECT COUNT(*) AS powerStationNumber,
ROUND(SUM(capacity), 2) AS totalCapacity,
ROUND(SUM(capacity), 2) AS totalCapacity,
ROUND(SUM(day_generate), 2) AS totalDayGenerate,
ROUND(SUM(day_generate), 2) AS totalDayGenerate,
ROUND(SUM(rated_power), 2) AS totalRatedPower,
ROUND(SUM(rated_power), 2) AS totalRatedPower,
ROUND(SUM(day_income), 2) AS totalDayIncome
ROUND(SUM(day_income), 2) AS totalDayIncome
FROM hygf_jp_station hjs
FROM hygf_jp_station hjs
WHERE hjs.regional_companies_code = #{orgCode}
WHERE hjs.regional_companies_code = #{code} or hjs.amos_company_code = #{code}
</select>
<!-- 根据区域orgCode查询经销商-->
<select
id=
"getDealerPage"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationStatistics"
>
select hui.name as name, hui.amos_company_code as code
from hygf_regional_companies hrc
RIGHT JOIN hygf_unit_info hui
ON hrc.unit_info_id = hui.sequence_nbr
<where>
hui.blacklist=0 and hui.is_delete=0
<if
test=
"regionCompanyOrgCode != null and regionCompanyOrgCode!=''"
>
and hrc.regional_companies_code = #{regionCompanyOrgCode}
</if>
<if
test=
"dealerName != null and dealerName!=''"
>
and hui.name like concat("%",#{dealerName},"%")
</if>
</where>
</select>
</select>
</mapper>
</mapper>
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 {
...
@@ -181,8 +181,7 @@ public class JpStationController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/queryPage"
)
@GetMapping
(
value
=
"/queryPage"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站列表"
,
notes
=
"场站列表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站列表"
,
notes
=
"场站列表"
)
public
ResponseModel
<
Page
<
JpStationDto
>>
queryForDealerReviewPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
public
ResponseModel
<
Page
<
JpStationDto
>>
queryForDealerReviewPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
JpStationDto
reviewDto
)
{
(
value
=
"size"
)
int
size
,
JpStationDto
reviewDto
)
{
List
<
JpPersonStation
>
pPersonStation
=
null
;
List
<
JpPersonStation
>
pPersonStation
=
null
;
if
(
reviewDto
.
getName
()
!=
null
&&
!
""
.
equals
(
reviewDto
.
getName
()))
{
if
(
reviewDto
.
getName
()
!=
null
&&
!
""
.
equals
(
reviewDto
.
getName
()))
{
...
@@ -731,8 +730,7 @@ public class JpStationController extends BaseController {
...
@@ -731,8 +730,7 @@ public class JpStationController extends BaseController {
@GetMapping
(
value
=
"/queryPagenew"
)
@GetMapping
(
value
=
"/queryPagenew"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站列表"
,
notes
=
"场站列表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站列表"
,
notes
=
"场站列表"
)
@UserLimits
@UserLimits
public
ResponseModel
<
Page
<
JpStationDto
>>
queryPagenew
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
public
ResponseModel
<
Page
<
JpStationDto
>>
queryPagenew
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
JpStationDto
reviewDto
)
{
(
value
=
"size"
)
int
size
,
JpStationDto
reviewDto
)
{
Page
<
JpStationDto
>
page
=
jpStationServiceImpl
.
queryForJpStationPagenew
(
current
,
size
,
reviewDto
);
Page
<
JpStationDto
>
page
=
jpStationServiceImpl
.
queryForJpStationPagenew
(
current
,
size
,
reviewDto
);
return
ResponseHelper
.
buildResponse
(
page
);
return
ResponseHelper
.
buildResponse
(
page
);
}
}
...
@@ -740,8 +738,7 @@ public class JpStationController extends BaseController {
...
@@ -740,8 +738,7 @@ public class JpStationController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/queryReport"
)
@PostMapping
(
value
=
"/queryReport"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"场站报表"
,
notes
=
"场站报表"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"场站报表"
,
notes
=
"场站报表"
)
public
ResponseModel
<
Page
<
JpStationDto
>>
queryReport
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
public
ResponseModel
<
Page
<
JpStationDto
>>
queryReport
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestBody
JpStationDto
reviewDto
,
@RequestParam
(
value
=
"type"
)
String
type
)
{
(
value
=
"size"
)
int
size
,
@RequestBody
JpStationDto
reviewDto
,
@RequestParam
(
value
=
"type"
)
String
type
)
{
Page
<
JpStationDto
>
page
=
jpStationServiceImpl
.
queryReport
(
current
,
size
,
reviewDto
,
type
);
Page
<
JpStationDto
>
page
=
jpStationServiceImpl
.
queryReport
(
current
,
size
,
reviewDto
,
type
);
...
@@ -792,10 +789,22 @@ public class JpStationController extends BaseController {
...
@@ -792,10 +789,22 @@ public class JpStationController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询当前登录人权限区域公司统计数据"
,
notes
=
"查询当前登录人权限区域公司统计数据"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询当前登录人权限区域公司统计数据"
,
notes
=
"查询当前登录人权限区域公司统计数据"
)
@GetMapping
(
value
=
"/getRegionStatistics"
)
@GetMapping
(
value
=
"/getRegionStatistics"
)
// @UserLimits
// @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
...
@@ -757,9 +757,9 @@ public class JpStationServiceImpl extends BaseService<JpStationDto, JpStation, J
List
<
PowerStationStatistics
>
resultPage
=
new
ArrayList
<>();
List
<
PowerStationStatistics
>
resultPage
=
new
ArrayList
<>();
page
.
getList
().
stream
().
forEach
(
powerStationStatistics
->
{
page
.
getList
().
stream
().
forEach
(
powerStationStatistics
->
{
PowerStationStatistics
regionStatistics
=
jpStationMapper
.
getRegionStatistics
(
powerStationStatistics
.
get
RegionCompanyOrg
Code
());
PowerStationStatistics
regionStatistics
=
jpStationMapper
.
getRegionStatistics
(
powerStationStatistics
.
getCode
());
regionStatistics
.
set
RegionCompanyName
(
powerStationStatistics
.
getRegionCompany
Name
());
regionStatistics
.
set
Name
(
powerStationStatistics
.
get
Name
());
regionStatistics
.
set
RegionCompanyOrgCode
(
powerStationStatistics
.
getRegionCompanyOrg
Code
());
regionStatistics
.
set
Code
(
powerStationStatistics
.
get
Code
());
resultPage
.
add
(
regionStatistics
);
resultPage
.
add
(
regionStatistics
);
});
});
...
@@ -772,4 +772,30 @@ public class JpStationServiceImpl extends BaseService<JpStationDto, JpStation, J
...
@@ -772,4 +772,30 @@ public class JpStationServiceImpl extends BaseService<JpStationDto, JpStation, J
return
pagenew
;
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