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
8f930583
Commit
8f930583
authored
Jul 07, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新接口
parent
ce8187ba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+21
-0
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+19
-0
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 @
8f930583
...
...
@@ -74,6 +74,27 @@ public class MonitorFanIdxController extends BaseController {
return
ResponseHelper
.
buildResponse
(
page
);
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"风机布置图 - 风机数量"
)
@GetMapping
(
"/getFanNum"
)
public
ResponseModel
<
Integer
>
getFanNum
(
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
String
stationId
)
{
Integer
num
=
monitorFanIndicator
.
getFanNum
(
stationId
);
return
ResponseHelper
.
buildResponse
(
num
);
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"风机布置图 - 实时监控表计仪表盘数据"
)
@GetMapping
(
"/getFanDataByType"
)
public
ResponseModel
<
Map
<
String
,
String
>>
getFanDataByType
(
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
String
stationId
,
@RequestParam
(
value
=
"equipNum"
,
required
=
false
)
String
equipNum
,
@RequestParam
(
value
=
"frontModule"
,
required
=
false
)
String
frontModule
,
@RequestParam
(
value
=
"typeName"
,
required
=
false
)
String
typeName
)
{
String
num
=
monitorFanIndicator
.
getFanDataByType
(
stationId
,
equipNum
,
frontModule
,
typeName
);
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"value"
,
num
);
return
ResponseHelper
.
buildResponse
(
map
);
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"风机布置图 - 风机状态统计"
)
...
...
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 @
8f930583
...
...
@@ -302,4 +302,22 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
realTimeTemperatureResult
.
put
(
"seriesData"
,
yList
);
return
realTimeTemperatureResult
;
}
public
Integer
getFanNum
(
String
stationId
)
{
StationBasic
stationBasic
=
getOneByStationNumber
(
stationId
);
String
sqlEquipNumList
=
String
.
format
(
"SELECT (DISTINCT equipmentNumber) as equipmentNumber FROM \"indicators_%s\""
,
stationBasic
.
getFanGatewayId
());
List
<
IndexDto
>
equipNumList
=
influxDButils
.
getListData
(
sqlEquipNumList
,
IndexDto
.
class
);
return
equipNumList
.
size
();
}
public
String
getFanDataByType
(
String
stationId
,
String
equipNum
,
String
frontModule
,
String
typeName
)
{
StationBasic
stationBasic
=
getOneByStationNumber
(
stationId
);
String
sql
=
String
.
format
(
"SELECT equipmentIndexName, value, frontModule, unit FROM \"indicators_%s\" WHERE equipmentNumber = '%s' and frontModule =~/%s/ and equipmentIndexName = '%s'"
,
stationBasic
.
getFanGatewayId
(),
equipNum
,
frontModule
,
typeName
);
List
<
IndexDto
>
influxDBList
=
influxDButils
.
getListData
(
sql
,
IndexDto
.
class
);
if
(
CollectionUtils
.
isNotEmpty
(
influxDBList
)
&&
StringUtils
.
isNotEmpty
(
influxDBList
.
get
(
0
).
getValue
()))
{
return
influxDBList
.
get
(
0
).
getValue
();
}
else
{
return
"0"
;
}
}
}
\ 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