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
a91b0e3e
Commit
a91b0e3e
authored
Dec 12, 2024
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改统计
parent
1399327e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
12 deletions
+31
-12
JpCollectorMapper.xml
...api/src/main/resources/mapper/mysql/JpCollectorMapper.xml
+6
-3
JpInverterMapper.xml
...-api/src/main/resources/mapper/mysql/JpInverterMapper.xml
+6
-2
TdHygfJpInverterWarnServiceImpl.java
...ygf/biz/service/impl/TdHygfJpInverterWarnServiceImpl.java
+19
-7
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/JpCollectorMapper.xml
View file @
a91b0e3e
...
...
@@ -119,12 +119,15 @@
UNION ALL
SELECT '报警' AS status
) AS all_statuses
LEFT JOIN hygf_jp_collector ON all_statuses.status = hygf_jp_collector.state and hygf_jp_collector.third_station_id
LEFT JOIN hygf_jp_collector ON all_statuses.status = hygf_jp_collector.state
<if
test=
"thirdStationIds!=null"
>
and hygf_jp_collector.third_station_id
in(
<foreach
collection=
"thirdStationIds"
item=
"item"
separator=
","
>
(#{item})
</foreach>
)
</foreach>
)
</if>
GROUP BY all_statuses.status
ORDER BY all_statuses.status;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/JpInverterMapper.xml
View file @
a91b0e3e
...
...
@@ -144,13 +144,17 @@
UNION ALL
SELECT '报警' AS status
) AS all_statuses
LEFT JOIN hygf_jp_inverter ON all_statuses.status = hygf_jp_inverter.state and hygf_jp_inverter.third_station_id
LEFT JOIN hygf_jp_inverter ON all_statuses.status = hygf_jp_inverter.state
<if
test=
"thirdStationIds!=null"
>
and hygf_jp_inverter.third_station_id
in(
<foreach
collection=
"thirdStationIds"
item=
"item"
separator=
","
>
(#{item})
</foreach>
)
</if>
)
GROUP BY all_statuses.status
ORDER BY all_statuses.status;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/TdHygfJpInverterWarnServiceImpl.java
View file @
a91b0e3e
...
...
@@ -238,15 +238,28 @@ public class TdHygfJpInverterWarnServiceImpl
public
Map
<
String
,
Object
>
queryStateNumber
(
String
regionalCompaniesCode
,
String
amosCompanyCode
,
String
thirdStationId
,
String
type
)
{
// 查询所有场站
List
<
JpStationDto
>
jpStationDtos
=
jpStationServiceImpl
.
queryAllPowerStation
(
regionalCompaniesCode
,
amosCompanyCode
,
thirdStationId
,
type
);
List
<
String
>
thirdStationIds
=
null
;
if
(
regionalCompaniesCode
==
null
&&
amosCompanyCode
==
null
)
{
thirdStationIds
=
null
;
}
else
{
// 查询所有场站
List
<
JpStationDto
>
jpStationDtos
=
jpStationServiceImpl
.
queryAllPowerStation
(
regionalCompaniesCode
,
amosCompanyCode
,
thirdStationId
,
type
);
if
(!
CollectionUtils
.
isEmpty
(
jpStationDtos
))
{
thirdStationIds
=
jpStationDtos
.
stream
().
map
(
JpStation
->
JpStation
.
getThirdStationId
()).
collect
(
Collectors
.
toList
());
}
}
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
if
(!
CollectionUtils
.
isEmpty
(
jpStationDtos
))
{
// 获取thirdStationId集合
List
<
String
>
thirdStationIds
=
jpStationDtos
.
stream
().
map
(
JpStation
->
JpStation
.
getThirdStationId
()).
collect
(
Collectors
.
toList
());
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
//在线
List
<
Integer
>
online
=
new
ArrayList
<>();
...
...
@@ -291,7 +304,6 @@ public class TdHygfJpInverterWarnServiceImpl
result
.
put
(
"xData"
,
Arrays
.
asList
(
"在线"
,
"报警"
,
"离线"
));
result
.
put
(
"yData"
,
resultNumMap
);
}
return
result
;
...
...
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