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
ad6c3cfa
Commit
ad6c3cfa
authored
Jul 18, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
拉取代码
parents
4b796e0f
e240e2be
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
0 deletions
+68
-0
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+27
-0
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+41
-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 @
ad6c3cfa
...
...
@@ -332,6 +332,22 @@ public class MonitorFanIdxController extends BaseController {
@ApiOperation
(
value
=
"模拟量接口Api"
)
@GetMapping
(
"/getAnalogQuantity"
)
public
ResponseModel
<
IPage
<
Map
<
String
,
Object
>>>
getAnalogQuantity
(
@RequestParam
(
value
=
"stationId"
)
String
stationId
,
String
frontModule
)
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
String
gatewayId
=
stationBasic
.
getBoosterGatewayId
();
List
<
Map
<
String
,
Object
>>
statusMonitoring
=
monitorFanIndicator
.
getAnalogQuantity
(
gatewayId
,
frontModule
);
IPage
<
Map
<
String
,
Object
>>
result
=
new
Page
<>();
result
.
setRecords
(
statusMonitoring
);
result
.
setCurrent
(
1
);
result
.
setTotal
(
statusMonitoring
.
size
());
return
ResponseHelper
.
buildResponse
(
result
);
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"集电线路图左侧 集电线列表"
)
@GetMapping
(
"/jdTree"
)
...
...
@@ -506,4 +522,15 @@ public class MonitorFanIdxController extends BaseController {
}
return
CommonResponseUtil
.
success
();
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"1#主变油温"
)
@GetMapping
(
"/zbyw"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getYwData
(
@RequestParam
(
value
=
"stationId"
)
String
stationId
)
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
String
gatewayId
=
stationBasic
.
getBoosterGatewayId
();
Map
<
String
,
Object
>
resultsData
=
monitorFanIndicatorImpl
.
getyw
(
gatewayId
);
return
ResponseHelper
.
buildResponse
(
resultsData
);
}
}
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 @
ad6c3cfa
...
...
@@ -680,6 +680,21 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
public
List
<
Map
<
String
,
Object
>>
getAnalogQuantity
(
String
gatewayId
,
String
frontModule
){
String
sql
=
" SELECT displayName , value as state FROM indicators_"
+
gatewayId
+
" WHERE frontModule =~/"
+
frontModule
+
"/ and systemType = '模拟量'"
;
List
<
IndicatorsDto
>
listData
=
influxDButils
.
getListData
(
sql
,
IndicatorsDto
.
class
);
List
<
Map
<
String
,
Object
>>
statusMaps
=
new
ArrayList
<>();
for
(
IndicatorsDto
listDatum
:
listData
)
{
Map
<
String
,
Object
>
statusMap
=
new
HashMap
<>();
statusMap
.
put
(
"title1"
,
listDatum
.
getValue
()+
" "
+
listDatum
.
getUnit
());
statusMap
.
put
(
"title"
,
listDatum
.
getDisplayName
());
statusMaps
.
add
(
statusMap
);
}
return
statusMaps
;
}
public
void
getStatusJDX
(
String
gatewayId
,
String
dataName
,
String
werks
,
String
stationId
){
String
sql
=
" SELECT * FROM indicators_"
+
gatewayId
+
" WHERE frontModule =~/集电线路/ and systemType = '光字牌'"
;
...
...
@@ -1125,5 +1140,31 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
return
photoUrls
;
}
public
HashMap
<
String
,
Object
>
getyw
(
String
gatewayId
){
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
String
zb1Sql
=
String
.
format
(
"SELECT * FROM \"indicators_%s\" WHERE frontModule = '1主变' and systemType = '模拟量' and (displayName = '档位' or displayName = '油面温1' or displayName = '油面温2' or displayName = '绕组温度' ) "
,
gatewayId
);
List
<
IndicatorsDto
>
zb1SqlData
=
influxDButils
.
getListData
(
zb1Sql
,
IndicatorsDto
.
class
);
// TODO: 2023/7/14 数据未整理 ---> 油面温1 油面温2 绕组温度
resultMap
.
put
(
"value1"
,
"0.0"
);
resultMap
.
put
(
"value2"
,
"0.0"
);
resultMap
.
put
(
"value3"
,
"0.0"
);
resultMap
.
put
(
"value4"
,
"0.0"
);
zb1SqlData
.
forEach
(
item
->
{
if
(
"档位"
.
equals
(
item
.
getDisplayName
()))
{
resultMap
.
put
(
"value4"
,
item
.
getValue
());
}
else
if
(
"油面温1"
.
equals
(
item
.
getDisplayName
()))
{
resultMap
.
put
(
"value1"
,
item
.
getValue
());
}
else
if
(
"油面温2"
.
equals
(
item
.
getDisplayName
()))
{
resultMap
.
put
(
"value2"
,
item
.
getValue
());
}
else
if
(
"绕组温度"
.
equals
(
item
.
getDisplayName
()))
{
resultMap
.
put
(
"value3"
,
item
.
getValue
());
}
});
return
resultMap
;
}
}
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