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
c7f2e54b
Commit
c7f2e54b
authored
Sep 01, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
API bug
parent
ae6bc0ad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
13 deletions
+63
-13
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+7
-0
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+56
-13
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/MonitorFanIdxController.java
View file @
c7f2e54b
...
...
@@ -813,6 +813,13 @@ public class MonitorFanIdxController extends BaseController {
return
ResponseHelper
.
buildResponse
(
result
);
}
@ApiOperation
(
value
=
"逆变器状态数量"
)
@GetMapping
(
"/nbqStatus"
)
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
nbqStatus
(
String
stationId
)
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
Page
<
Map
<
String
,
Object
>>
result
=
monitorFanIndicator
.
nbqStatus
(
stationBasic
.
getFanGatewayId
());
return
ResponseHelper
.
buildResponse
(
result
);
}
@ApiOperation
(
value
=
"电站排名"
)
@Scheduled
(
cron
=
"0/10 * * * * ? "
)
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
View file @
c7f2e54b
...
...
@@ -1805,7 +1805,8 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
public
Map
<
String
,
Object
>
nbqStatus
(
String
gatewayId
)
{
public
Page
<
Map
<
String
,
Object
>>
nbqStatus
(
String
gatewayId
)
{
// String sql = " SELECT * FROM indicators_" + gatewayId + " WHERE (equipmentIndexName ='待机' or equipmentIndexName ='故障停机' or equipmentIndexName ='告警运行' or equipmentIndexName ='限额运行' or equipmentIndexName ='停机') and value = 'true'";
// List<IndicatorsDto> indicatorsDtoList = influxDButils.getListData(sql, IndicatorsDto.class);
//
...
...
@@ -1921,7 +1922,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
}
String
querySql
=
" SELECT * FROM indicators_"
+
gatewayId
+
" equipmentIndexName ='运行' and value = 'true'"
;
String
querySql
=
" SELECT * FROM indicators_"
+
gatewayId
+
"
where
equipmentIndexName ='运行' and value = 'true'"
;
List
<
IndicatorsDto
>
queryList
=
influxDButils
.
getListData
(
querySql
,
IndicatorsDto
.
class
);
if
(!
ValidationUtil
.
isEmpty
(
queryList
))
{
List
<
String
>
collect
=
queryList
.
stream
().
map
(
IndicatorsDto:
:
getEquipmentNumber
).
collect
(
Collectors
.
toList
());
...
...
@@ -1929,7 +1930,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
zcNum
=
collect
.
size
()
-
strings
.
size
();
}
String
querySql1
=
" SELECT * FROM indicators_"
+
gatewayId
+
" equipmentIndexName ='通讯异常' and value = 'true'"
;
String
querySql1
=
" SELECT * FROM indicators_"
+
gatewayId
+
"
where
equipmentIndexName ='通讯异常' and value = 'true'"
;
List
<
IndicatorsDto
>
queryList1
=
influxDButils
.
getListData
(
querySql1
,
IndicatorsDto
.
class
);
if
(!
ValidationUtil
.
isEmpty
(
queryList1
))
{
List
<
String
>
collect1
=
queryList
.
stream
().
map
(
IndicatorsDto:
:
getEquipmentNumber
).
collect
(
Collectors
.
toList
());
...
...
@@ -1937,16 +1938,58 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
txNum
=
collect1
.
size
()
-
strings1
.
size
();
}
numMap
.
put
(
"djNum"
,
djNum
);
numMap
.
put
(
"gzNum"
,
gzNum
);
numMap
.
put
(
"gjNum"
,
gjNum
);
numMap
.
put
(
"xeNum"
,
xeNum
);
numMap
.
put
(
"xdNum"
,
xdNum
);
numMap
.
put
(
"txNum"
,
txNum
);
numMap
.
put
(
"tjNum"
,
tjNum
);
numMap
.
put
(
"zcNum"
,
zcNum
);
return
numMap
;
Page
<
Map
<
String
,
Object
>>
mapPage
=
new
Page
<>();
ArrayList
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"count"
,
zcNum
);
map
.
put
(
"equipmentIndexName"
,
"正常运行"
);
map
.
put
(
"color"
,
"#00AA00"
);
resultList
.
add
(
map
);
HashMap
<
String
,
Object
>
map2
=
new
HashMap
<>();
map2
.
put
(
"count"
,
zcNum
);
map2
.
put
(
"equipmentIndexName"
,
"正常运行"
);
map2
.
put
(
"color"
,
"#00AA00"
);
resultList
.
add
(
map2
);
HashMap
<
String
,
Object
>
map3
=
new
HashMap
<>();
map3
.
put
(
"count"
,
zcNum
);
map3
.
put
(
"equipmentIndexName"
,
"正常运行"
);
map3
.
put
(
"color"
,
"#00AA00"
);
resultList
.
add
(
map3
);
HashMap
<
String
,
Object
>
map4
=
new
HashMap
<>();
map4
.
put
(
"count"
,
zcNum
);
map4
.
put
(
"equipmentIndexName"
,
"正常运行"
);
map4
.
put
(
"color"
,
"#00AA00"
);
resultList
.
add
(
map4
);
HashMap
<
String
,
Object
>
map5
=
new
HashMap
<>();
map5
.
put
(
"count"
,
zcNum
);
map5
.
put
(
"equipmentIndexName"
,
"正常运行"
);
map5
.
put
(
"color"
,
"#00AA00"
);
resultList
.
add
(
map5
);
HashMap
<
String
,
Object
>
map6
=
new
HashMap
<>();
map6
.
put
(
"count"
,
zcNum
);
map6
.
put
(
"equipmentIndexName"
,
"正常运行"
);
map6
.
put
(
"color"
,
"#00AA00"
);
resultList
.
add
(
map6
);
HashMap
<
String
,
Object
>
map7
=
new
HashMap
<>();
map7
.
put
(
"count"
,
zcNum
);
map7
.
put
(
"equipmentIndexName"
,
"正常运行"
);
map7
.
put
(
"color"
,
"#00AA00"
);
resultList
.
add
(
map7
);
HashMap
<
String
,
Object
>
map8
=
new
HashMap
<>();
map8
.
put
(
"count"
,
zcNum
);
map8
.
put
(
"equipmentIndexName"
,
"正常运行"
);
map8
.
put
(
"color"
,
"#00AA00"
);
resultList
.
add
(
map8
);
mapPage
.
setTotal
(
8
);
mapPage
.
setSize
(
8
);
mapPage
.
setCurrent
(
1
);
mapPage
.
setRecords
(
resultList
);
return
mapPage
;
}
...
...
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