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
7f99716c
Commit
7f99716c
authored
Nov 13, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
监盘电站统计
parent
255f0fad
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
290 additions
and
0 deletions
+290
-0
ImasterDataServiceImpl.java
...ouseholdapi/face/service/impl/ImasterDataServiceImpl.java
+1
-0
JpStationMapper.java
...oin/amos/boot/module/hygf/api/mapper/JpStationMapper.java
+15
-0
IJpStationService.java
.../amos/boot/module/hygf/api/service/IJpStationService.java
+18
-0
JpStationMapper.xml
...f-api/src/main/resources/mapper/mysql/JpStationMapper.xml
+192
-0
JpStationController.java
.../boot/module/hygf/biz/controller/JpStationController.java
+35
-0
JpStationServiceImpl.java
...ot/module/hygf/biz/service/impl/JpStationServiceImpl.java
+29
-0
No files found.
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/ImasterDataServiceImpl.java
View file @
7f99716c
...
...
@@ -221,6 +221,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
jpStation
.
setUserName
(
"三一硅能(株洲)有限公司"
);
jpStation
.
setUserPhone
(
"18511539874"
);
jpStation
.
setOnGridType
(
"自发自用"
);
jpStation
.
setType
(
"工商业"
);
//jpStation.setOnGridTime(new Date("2023-05-22"));
// jpStation.setRealTimePower();
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/JpStationMapper.java
View file @
7f99716c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserEmpower
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.DropDown
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto
;
...
...
@@ -34,4 +35,18 @@ public interface JpStationMapper extends BaseMapper<JpStation> {
@UserEmpower
(
field
={
"regional_companies_code"
,
"amos_company_code"
}
,
fieldConditions
={
"in"
,
"in"
}
,
relationship
=
"and"
)
JpStation
getCountJpStationdata
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
@UserEmpower
(
field
={
"regional_companies_code"
,
"amos_company_code"
}
,
fieldConditions
={
"in"
,
"in"
}
,
relationship
=
"and"
)
List
<
Map
<
String
,
Object
>>
getcountState
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
//投产电站数
@UserEmpower
(
field
={
"regional_companies_code"
,
"amos_company_code"
}
,
fieldConditions
={
"in"
,
"in"
}
,
relationship
=
"and"
)
Map
<
String
,
Object
>
getcountStatetc
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
//建设建站数
@UserEmpower
(
field
={
"regional_companies_code"
,
"amos_company_code"
}
,
fieldConditions
={
"in"
,
"in"
}
,
relationship
=
"and"
)
Map
<
String
,
Object
>
getcountStatejs
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
//接入中电站数
@UserEmpower
(
field
={
"regional_companies_code"
,
"amos_company_code"
}
,
fieldConditions
={
"in"
,
"in"
}
,
relationship
=
"and"
)
Map
<
String
,
Object
>
getcountStatejr
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
@UserEmpower
(
field
={
"regional_companies_code"
,
"amos_company_code"
}
,
fieldConditions
={
"in"
,
"in"
}
,
relationship
=
"and"
)
Map
<
String
,
Object
>
getcount
(
JpStationDto
reviewDto
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/service/IJpStationService.java
View file @
7f99716c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
service
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserEmpower
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpStation
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.LinkedHashSet
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -15,4 +20,17 @@ import java.util.Set;
public
interface
IJpStationService
{
Map
<
String
,
List
<
Object
>>
getPowerqx
(
String
date
,
String
type
,
List
<
String
>
statioId
);
Map
<
String
,
Object
>
getcount
(
JpStationDto
reviewDto
);
List
<
Map
<
String
,
Object
>>
getcountState
(
JpStationDto
reviewDto
);
//投产电站数
Map
<
String
,
Object
>
getcountStatetc
(
JpStationDto
reviewDto
);
//建设建站数
Map
<
String
,
Object
>
getcountStatejs
(
JpStationDto
reviewDto
);
//接入中电站数
Map
<
String
,
Object
>
getcountStatejr
(
JpStationDto
reviewDto
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/JpStationMapper.xml
View file @
7f99716c
...
...
@@ -258,7 +258,199 @@
</select>
<select
id=
"getcountState"
resultType=
"map"
>
select
state,
count(*) num
from hygf_jp_station
<where>
<if
test=
"dto.name!=null"
>
and hygf_jp_station.name like concat(concat("%",#{dto.name}),"%")
</if>
<if
test=
"dto.userName!=null"
>
and hygf_jp_station.user_name like concat(concat("%",#{dto.userName}),"%")
</if>
<if
test=
"dto.address!=null"
>
and hygf_jp_station.address like concat(concat("%",#{dto.address}),"%")
</if>
<if
test=
"dto.area!=null"
>
and hygf_jp_station.area like concat(concat("%",#{dto.area}),"%")
</if>
<if
test=
"dto.statioId!=null"
>
and hygf_jp_station.third_station_id in
<foreach
collection=
"dto.statioId"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item.stationId}
</foreach>
</if>
<if
test=
"dto.thirdStationId!=null"
>
and hygf_jp_station.third_station_id =#{dto.thirdStationId}
</if>
<if
test=
"dto.regionalCompaniesCode!=null"
>
and hygf_jp_station.regional_companies_code =#{dto.regionalCompaniesCode}
</if>
<if
test=
"dto.amosCompanyCode!=null"
>
and hygf_jp_station.amos_company_code =#{dto.amosCompanyCode}
</if>
and hygf_jp_station.`state` is not null and hygf_jp_station.`state` in ("在线","报警","离线")
GROUP BY state
</where>
</select>
<select
id=
"getcountStatetc"
resultType=
"map"
>
select
count(*) num
from hygf_jp_station
<where>
<if
test=
"dto.name!=null"
>
and hygf_jp_station.name like concat(concat("%",#{dto.name}),"%")
</if>
<if
test=
"dto.userName!=null"
>
and hygf_jp_station.user_name like concat(concat("%",#{dto.userName}),"%")
</if>
<if
test=
"dto.address!=null"
>
and hygf_jp_station.address like concat(concat("%",#{dto.address}),"%")
</if>
<if
test=
"dto.area!=null"
>
and hygf_jp_station.area like concat(concat("%",#{dto.area}),"%")
</if>
<if
test=
"dto.statioId!=null"
>
and hygf_jp_station.third_station_id in
<foreach
collection=
"dto.statioId"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item.stationId}
</foreach>
</if>
<if
test=
"dto.thirdStationId!=null"
>
and hygf_jp_station.third_station_id =#{dto.thirdStationId}
</if>
<if
test=
"dto.regionalCompaniesCode!=null"
>
and hygf_jp_station.regional_companies_code =#{dto.regionalCompaniesCode}
</if>
<if
test=
"dto.amosCompanyCode!=null"
>
and hygf_jp_station.amos_company_code =#{dto.amosCompanyCode}
</if>
and hygf_jp_station.`on_grid_type` is not null
</where>
</select>
<select
id=
"getcountStatejs"
resultType=
"map"
>
select
count(*) num
from hygf_jp_station
<where>
<if
test=
"dto.name!=null"
>
and hygf_jp_station.name like concat(concat("%",#{dto.name}),"%")
</if>
<if
test=
"dto.userName!=null"
>
and hygf_jp_station.user_name like concat(concat("%",#{dto.userName}),"%")
</if>
<if
test=
"dto.address!=null"
>
and hygf_jp_station.address like concat(concat("%",#{dto.address}),"%")
</if>
<if
test=
"dto.area!=null"
>
and hygf_jp_station.area like concat(concat("%",#{dto.area}),"%")
</if>
<if
test=
"dto.statioId!=null"
>
and hygf_jp_station.third_station_id in
<foreach
collection=
"dto.statioId"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item.stationId}
</foreach>
</if>
<if
test=
"dto.thirdStationId!=null"
>
and hygf_jp_station.third_station_id =#{dto.thirdStationId}
</if>
<if
test=
"dto.regionalCompaniesCode!=null"
>
and hygf_jp_station.regional_companies_code =#{dto.regionalCompaniesCode}
</if>
<if
test=
"dto.amosCompanyCode!=null"
>
and hygf_jp_station.amos_company_code =#{dto.amosCompanyCode}
</if>
and hygf_jp_station.`on_grid_type`=null and hygf_jp_station.type='家庭户用'
</where>
</select>
<select
id=
"getcountStatejr"
resultType=
"map"
>
select
count(*) num
from hygf_jp_station
<where>
<if
test=
"dto.name!=null"
>
and hygf_jp_station.name like concat(concat("%",#{dto.name}),"%")
</if>
<if
test=
"dto.userName!=null"
>
and hygf_jp_station.user_name like concat(concat("%",#{dto.userName}),"%")
</if>
<if
test=
"dto.address!=null"
>
and hygf_jp_station.address like concat(concat("%",#{dto.address}),"%")
</if>
<if
test=
"dto.area!=null"
>
and hygf_jp_station.area like concat(concat("%",#{dto.area}),"%")
</if>
<if
test=
"dto.statioId!=null"
>
and hygf_jp_station.third_station_id in
<foreach
collection=
"dto.statioId"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item.stationId}
</foreach>
</if>
<if
test=
"dto.thirdStationId!=null"
>
and hygf_jp_station.third_station_id =#{dto.thirdStationId}
</if>
<if
test=
"dto.regionalCompaniesCode!=null"
>
and hygf_jp_station.regional_companies_code =#{dto.regionalCompaniesCode}
</if>
<if
test=
"dto.amosCompanyCode!=null"
>
and hygf_jp_station.amos_company_code =#{dto.amosCompanyCode}
</if>
and hygf_jp_station.type='工商业'
</where>
</select>
<select
id=
"getcount"
resultType=
"map"
>
select
count(*) num
from hygf_jp_station
<where>
<if
test=
"dto.name!=null"
>
and hygf_jp_station.name like concat(concat("%",#{dto.name}),"%")
</if>
<if
test=
"dto.userName!=null"
>
and hygf_jp_station.user_name like concat(concat("%",#{dto.userName}),"%")
</if>
<if
test=
"dto.address!=null"
>
and hygf_jp_station.address like concat(concat("%",#{dto.address}),"%")
</if>
<if
test=
"dto.area!=null"
>
and hygf_jp_station.area like concat(concat("%",#{dto.area}),"%")
</if>
<if
test=
"dto.statioId!=null"
>
and hygf_jp_station.third_station_id in
<foreach
collection=
"dto.statioId"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item.stationId}
</foreach>
</if>
<if
test=
"dto.thirdStationId!=null"
>
and hygf_jp_station.third_station_id =#{dto.thirdStationId}
</if>
<if
test=
"dto.regionalCompaniesCode!=null"
>
and hygf_jp_station.regional_companies_code =#{dto.regionalCompaniesCode}
</if>
<if
test=
"dto.amosCompanyCode!=null"
>
and hygf_jp_station.amos_company_code =#{dto.amosCompanyCode}
</if>
</where>
</select>
</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 @
7f99716c
...
...
@@ -380,6 +380,7 @@ public class JpStationController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"电站发电量统计"
,
notes
=
"电站发电量统计"
)
@GetMapping
(
value
=
"/getCountJpStationdata"
)
@UserLimits
public
ResponseModel
<
List
<
JpStation
>>
getCountJpStationdata
(
JpStationDto
reviewDto
)
{
JpStation
jpStation
=
jpStationMapper
.
getCountJpStationdata
(
reviewDto
);
List
<
JpStation
>
list
=
new
ArrayList
<>();
...
...
@@ -391,6 +392,7 @@ public class JpStationController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"电站分布"
,
notes
=
"电站分布"
)
@GetMapping
(
value
=
"/getJpStation"
)
@UserLimits
public
Object
getJpStation
(
JpStationDto
reviewDto
)
{
List
<
JpStation
>
list
=
jpStationMapper
.
getJpStation
(
reviewDto
);
return
ResponseHelper
.
buildResponse
(
list
);
...
...
@@ -401,6 +403,7 @@ public class JpStationController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"节能减排"
,
notes
=
"节能减排"
)
@GetMapping
(
value
=
"/getEnergyConservation"
)
@UserLimits
public
ResponseModel
<
Map
<
String
,
Object
>>
getEnergyConservation
(
JpStationDto
reviewDto
)
{
JpStation
jpStation
=
jpStationMapper
.
getCountJpStationdata
(
reviewDto
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
...
...
@@ -417,6 +420,38 @@ public class JpStationController extends BaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"电站统计"
,
notes
=
"电站统计"
)
@GetMapping
(
value
=
"/getcountJpStation"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getcountJpStation
(
JpStationDto
reviewDto
)
{
Map
<
String
,
Object
>
collector
=
new
HashMap
<>();
collector
.
put
(
"zx"
,
0
);
collector
.
put
(
"bj"
,
0
);
collector
.
put
(
"lx"
,
0
);
List
<
Map
<
String
,
Object
>>
list
=
jpStationMapper
.
getcountState
(
reviewDto
);
if
(
list
!=
null
&&!
list
.
isEmpty
()){
for
(
Map
<
String
,
Object
>
map
:
list
)
{
if
(
"在线"
.
equals
(
map
.
get
(
"state"
).
toString
())){
collector
.
put
(
"zx"
,
Integer
.
valueOf
(
map
.
get
(
"num"
).
toString
()));
}
else
if
(
"离线"
.
equals
(
map
.
get
(
"state"
).
toString
())){
collector
.
put
(
"lx"
,
Integer
.
valueOf
(
map
.
get
(
"num"
).
toString
()));
}
else
if
(
"报警"
.
equals
(
map
.
get
(
"state"
).
toString
())){
collector
.
put
(
"bj"
,
Integer
.
valueOf
(
map
.
get
(
"num"
).
toString
()));
}
}
}
Map
<
String
,
Object
>
js
=
jpStationMapper
.
getcountStatejs
(
reviewDto
);
Map
<
String
,
Object
>
tc
=
jpStationMapper
.
getcountStatetc
(
reviewDto
);
Map
<
String
,
Object
>
jr
=
jpStationMapper
.
getcountStatejr
(
reviewDto
);
Map
<
String
,
Object
>
zs
=
jpStationMapper
.
getcount
(
reviewDto
);
collector
.
put
(
"js"
,
js
.
get
(
"num"
));
collector
.
put
(
"tc"
,
tc
.
get
(
"num"
));
collector
.
put
(
"jr"
,
jr
.
get
(
"num"
));
collector
.
put
(
"zs"
,
zs
.
get
(
"num"
));
return
ResponseHelper
.
buildResponse
(
collector
);
}
...
...
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 @
7f99716c
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.hygf.biz.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserLimits
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.PowerCurveDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.ReviewDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpStation
;
...
...
@@ -117,7 +118,35 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
return
map
;
}
@Override
@UserLimits
public
Map
<
String
,
Object
>
getcount
(
JpStationDto
reviewDto
)
{
return
jpStationMapper
.
getcount
(
reviewDto
);
}
@Override
@UserLimits
public
List
<
Map
<
String
,
Object
>>
getcountState
(
JpStationDto
reviewDto
)
{
return
jpStationMapper
.
getcountState
(
reviewDto
);
}
@Override
@UserLimits
public
Map
<
String
,
Object
>
getcountStatetc
(
JpStationDto
reviewDto
)
{
return
jpStationMapper
.
getcountStatetc
(
reviewDto
);
}
@Override
@UserLimits
public
Map
<
String
,
Object
>
getcountStatejs
(
JpStationDto
reviewDto
)
{
return
jpStationMapper
.
getcountStatejs
(
reviewDto
);
}
@Override
@UserLimits
public
Map
<
String
,
Object
>
getcountStatejr
(
JpStationDto
reviewDto
)
{
return
jpStationMapper
.
getcountStatejr
(
reviewDto
);
}
public
static
Map
<
String
,
List
<
Object
>>
getDayListOfMonth
(
String
date
)
{
...
...
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