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
872e97e4
Commit
872e97e4
authored
Apr 19, 2024
by
朱晨阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加区域公司数据统计接口
parent
61c6356f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
79 additions
and
9 deletions
+79
-9
PowerStationStatistics.java
...amos/boot/module/hygf/api/dto/PowerStationStatistics.java
+23
-0
JpStationMapper.java
...oin/amos/boot/module/hygf/api/mapper/JpStationMapper.java
+7
-0
IJpStationService.java
.../amos/boot/module/hygf/api/service/IJpStationService.java
+4
-0
JpStationMapper.xml
...f-api/src/main/resources/mapper/mysql/JpStationMapper.xml
+23
-0
JpStationController.java
.../boot/module/hygf/biz/controller/JpStationController.java
+22
-9
JpStationServiceImpl.java
...ot/module/hygf/biz/service/impl/JpStationServiceImpl.java
+0
-0
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
0 → 100644
View file @
872e97e4
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
lombok.Data
;
/**
* ClassName: PowerStationStatistics
* Package: com.yeejoin.amos.boot.module.hygf.api.dto
* Description: 查询区域公司下电站统计信息
*
* @Author zcy
* @Create 2024/4/19 11:09
* @Version 1.0
*/
@Data
public
class
PowerStationStatistics
{
private
String
regionCompanyName
;
// 区域公司
private
String
regionCompanyOrgCode
;
// 区域公司orgCode
private
Integer
powerStationNumber
;
// 电站总数
private
Double
totalCapacity
;
// 装机容量
private
Double
totalDayGenerate
;
// 日发电量
private
Double
totalRatedPower
;
// 额定功率
private
Double
totalDayIncome
;
// 日收益
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/JpStationMapper.java
View file @
872e97e4
...
@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.hygf.api.config.UserEmpower;
...
@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.hygf.api.config.UserEmpower;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserLimits
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserLimits
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.DropDown
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.DropDown
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationStatistics
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpStation
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpStation
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -63,4 +64,10 @@ public interface JpStationMapper extends BaseMapper<JpStation> {
...
@@ -63,4 +64,10 @@ public interface JpStationMapper extends BaseMapper<JpStation> {
List
<
JpStationDto
>
queryForDealerReviewPagenew
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
List
<
JpStationDto
>
queryForDealerReviewPagenew
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
List
<
DropDown
>
getDealerNew
(
@Param
(
"regionalCompaniesSeq"
)
String
regionalCompaniesSeq
);
List
<
DropDown
>
getDealerNew
(
@Param
(
"regionalCompaniesSeq"
)
String
regionalCompaniesSeq
);
// @UserEmpower(field ={"ORG_CODE"} ,dealerField ={"ORG_CODE"}, fieldConditions ={"in","in"} ,relationship="and",specific=false)
List
<
PowerStationStatistics
>
getRegionPage
(
String
regionName
);
PowerStationStatistics
getRegionStatistics
(
String
orgCode
);
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/service/IJpStationService.java
View file @
872e97e4
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
service
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationStatistics
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpStation
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpStation
;
import
java.util.List
;
import
java.util.List
;
...
@@ -33,4 +35,6 @@ public interface IJpStationService {
...
@@ -33,4 +35,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
);
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/JpStationMapper.xml
View file @
872e97e4
...
@@ -615,4 +615,27 @@
...
@@ -615,4 +615,27 @@
</where>
</where>
</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
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>
</where>
</select>
<select
id=
"getRegionStatistics"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationStatistics"
>
SELECT COUNT(*) AS powerStationNumber,
ROUND(SUM(capacity), 2) AS totalCapacity,
ROUND(SUM(day_generate), 2) AS totalDayGenerate,
ROUND(SUM(rated_power), 2) AS totalRatedPower,
ROUND(SUM(day_income), 2) AS totalDayIncome
FROM hygf_jp_station hjs
WHERE hjs.regional_companies_code = #{orgCode}
</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 @
872e97e4
...
@@ -9,6 +9,8 @@ import com.yeejoin.amos.boot.module.hygf.api.config.DealerRestrict;
...
@@ -9,6 +9,8 @@ import com.yeejoin.amos.boot.module.hygf.api.config.DealerRestrict;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserLimits
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserLimits
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.DropDown
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.DropDown
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.MaintenanceDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationStatistics
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.*
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.*
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.*
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.*
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.DayGenerateServiceImpl
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.DayGenerateServiceImpl
;
...
@@ -552,31 +554,31 @@ public class JpStationController extends BaseController {
...
@@ -552,31 +554,31 @@ public class JpStationController extends BaseController {
map
.
put
(
"name1"
,
"实时功率(kW)"
);
map
.
put
(
"name1"
,
"实时功率(kW)"
);
map
.
put
(
"name2"
,
"组件总容量(MWp)"
);
map
.
put
(
"name2"
,
"组件总容量(MWp)"
);
map
.
put
(
"value1"
,
jpStation
.
getRealTimePower
()
!=
null
?
format2
.
format
(
jpStation
.
getRealTimePower
()):
0
);
map
.
put
(
"value1"
,
jpStation
.
getRealTimePower
()
!=
null
?
format2
.
format
(
jpStation
.
getRealTimePower
())
:
0
);
//硫
//硫
map
.
put
(
"value2"
,
jpStation
.
getCapacity
()
!=
null
?
format2
.
format
(
jpStation
.
getCapacity
()):
0
);
map
.
put
(
"value2"
,
jpStation
.
getCapacity
()
!=
null
?
format2
.
format
(
jpStation
.
getCapacity
())
:
0
);
Map
<
String
,
Object
>
map2
=
new
HashMap
<>();
Map
<
String
,
Object
>
map2
=
new
HashMap
<>();
map2
.
put
(
"name1"
,
"当日电量(MWh)"
);
map2
.
put
(
"name1"
,
"当日电量(MWh)"
);
map2
.
put
(
"name2"
,
"当日收益(元)"
);
map2
.
put
(
"name2"
,
"当日收益(元)"
);
//炭
//炭
map2
.
put
(
"value1"
,
jpStation
.
getDayGenerate
()
!=
null
?
format2
.
format
(
jpStation
.
getDayGenerate
()):
0
);
map2
.
put
(
"value1"
,
jpStation
.
getDayGenerate
()
!=
null
?
format2
.
format
(
jpStation
.
getDayGenerate
())
:
0
);
//硫
//硫
map2
.
put
(
"value2"
,
jpStation
.
getDayIncome
()
!=
null
?
format2
.
format
(
jpStation
.
getDayIncome
()):
0
);
map2
.
put
(
"value2"
,
jpStation
.
getDayIncome
()
!=
null
?
format2
.
format
(
jpStation
.
getDayIncome
())
:
0
);
Map
<
String
,
Object
>
map3
=
new
HashMap
<>();
Map
<
String
,
Object
>
map3
=
new
HashMap
<>();
map3
.
put
(
"name1"
,
"当月电量(MWh)"
);
map3
.
put
(
"name1"
,
"当月电量(MWh)"
);
map3
.
put
(
"name2"
,
"当月收益(万元)"
);
map3
.
put
(
"name2"
,
"当月收益(万元)"
);
//炭
//炭
map3
.
put
(
"value1"
,
jpStation
.
getMonthGenerate
()
!=
null
?
format2
.
format
(
jpStation
.
getMonthGenerate
()):
0
);
map3
.
put
(
"value1"
,
jpStation
.
getMonthGenerate
()
!=
null
?
format2
.
format
(
jpStation
.
getMonthGenerate
())
:
0
);
//硫
//硫
map3
.
put
(
"value2"
,
jpStation
.
getMonthIncome
()
!=
null
?
format2
.
format
(
jpStation
.
getMonthIncome
()):
0
);
map3
.
put
(
"value2"
,
jpStation
.
getMonthIncome
()
!=
null
?
format2
.
format
(
jpStation
.
getMonthIncome
())
:
0
);
Map
<
String
,
Object
>
map4
=
new
HashMap
<>();
Map
<
String
,
Object
>
map4
=
new
HashMap
<>();
map4
.
put
(
"name1"
,
"累计电量(MWh)"
);
map4
.
put
(
"name1"
,
"累计电量(MWh)"
);
map4
.
put
(
"name2"
,
"累计收益(万元)"
);
map4
.
put
(
"name2"
,
"累计收益(万元)"
);
//炭
//炭
map4
.
put
(
"value1"
,
jpStation
.
getAccumulatedPower
()
!=
null
?
format2
.
format
(
jpStation
.
getAccumulatedPower
()):
0
);
map4
.
put
(
"value1"
,
jpStation
.
getAccumulatedPower
()
!=
null
?
format2
.
format
(
jpStation
.
getAccumulatedPower
())
:
0
);
//硫
//硫
map4
.
put
(
"value2"
,
jpStation
.
getCumulativeIncome
()
!=
null
?
format2
.
format
(
jpStation
.
getCumulativeIncome
()):
0
);
map4
.
put
(
"value2"
,
jpStation
.
getCumulativeIncome
()
!=
null
?
format2
.
format
(
jpStation
.
getCumulativeIncome
())
:
0
);
date
.
add
(
map
);
date
.
add
(
map
);
date
.
add
(
map2
);
date
.
add
(
map2
);
...
@@ -687,7 +689,7 @@ public class JpStationController extends BaseController {
...
@@ -687,7 +689,7 @@ public class JpStationController extends BaseController {
map
.
put
(
"id"
,
jpStation
.
getSequenceNbr
());
map
.
put
(
"id"
,
jpStation
.
getSequenceNbr
());
map
.
put
(
"name"
,
jpStation
.
getName
());
map
.
put
(
"name"
,
jpStation
.
getName
());
map
.
put
(
"address"
,
jpStation
.
getAddress
());
map
.
put
(
"address"
,
jpStation
.
getAddress
());
map
.
put
(
"fullhour"
,
dayGenerate
.
getFullhour
()
!=
null
?
format2
.
format
(
dayGenerate
.
getFullhour
()):
0
);
map
.
put
(
"fullhour"
,
dayGenerate
.
getFullhour
()
!=
null
?
format2
.
format
(
dayGenerate
.
getFullhour
())
:
0
);
li
.
add
(
map
);
li
.
add
(
map
);
break
;
break
;
}
}
...
@@ -785,4 +787,15 @@ public class JpStationController extends BaseController {
...
@@ -785,4 +787,15 @@ public class JpStationController extends BaseController {
}
}
//查询当前登录人权限区域公司统计数据
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@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
)
{
Page
<
PowerStationStatistics
>
regionStatisticsData
=
jpStationServiceImpl
.
getRegionStatistics
(
current
,
size
,
regionName
);
return
ResponseHelper
.
buildResponse
(
regionStatisticsData
);
}
}
}
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 @
872e97e4
This diff is collapsed.
Click to expand it.
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