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
95c48e7d
Commit
95c48e7d
authored
Jul 17, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图片接口修改
parent
83c95ead
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
7 deletions
+27
-7
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+27
-7
No files found.
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 @
95c48e7d
...
@@ -1009,9 +1009,23 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
...
@@ -1009,9 +1009,23 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
public
Map
<
String
,
Object
>
getSwitchUrl
(
String
gatewayId
,
String
equipName
){
public
Map
<
String
,
Object
>
getSwitchUrl
(
String
gatewayId
,
String
equipName
){
String
sql
=
"SELECT * FROM indicators_"
+
gatewayId
+
" WHERE systemType = '开关' and frontModule =~ /"
+
equipName
+
"/ and displayName =~/合位$/"
;
String
sql
=
"SELECT * FROM indicators_"
+
gatewayId
+
" WHERE systemType = '开关' and frontModule =~ /"
+
equipName
+
"/ and displayName =~/合位$/"
;
String
sql1
=
"SELECT * FROM indicators_"
+
gatewayId
+
" WHERE systemType = '开关' and frontModule =~ /"
+
equipName
+
"/ and displayName =~/远方就地开关$/"
;
String
sql1
=
"SELECT * FROM indicators_"
+
gatewayId
+
" WHERE systemType = '开关' and frontModule =~ /"
+
equipName
+
"/ and displayName =~/远方就地开关$/"
;
String
sql2
=
"SELECT * FROM indicators_"
+
gatewayId
+
" WHERE systemType = '开关' and frontModule =~ /"
+
equipName
+
"/ and displayName =~/接地刀位置$/"
;
List
<
IndicatorsDto
>
listData
=
influxDButils
.
getListData
(
sql
,
IndicatorsDto
.
class
);
List
<
IndicatorsDto
>
listData
=
influxDButils
.
getListData
(
sql
,
IndicatorsDto
.
class
);
List
<
IndicatorsDto
>
listDatas
=
influxDButils
.
getListData
(
sql1
,
IndicatorsDto
.
class
);
List
<
IndicatorsDto
>
listDatas
=
influxDButils
.
getListData
(
sql1
,
IndicatorsDto
.
class
);
List
<
IndicatorsDto
>
listDatass
=
influxDButils
.
getListData
(
sql2
,
IndicatorsDto
.
class
);
Map
<
String
,
Object
>
photoUrls
=
new
HashMap
<>();
Map
<
String
,
Object
>
photoUrls
=
new
HashMap
<>();
for
(
IndicatorsDto
datass
:
listDatass
)
{
String
url
=
""
;
String
[]
urls
=
datass
.
getPictureName
().
split
(
","
);
if
(
datass
.
getValue
().
equals
(
"true"
)){
url
=
pictureUrl
+
urls
[
0
];
}
else
{
url
=
pictureUrl
+
urls
[
1
];;
}
photoUrls
.
put
(
datass
.
getDisplayName
().
split
(
"_"
)[
0
]+
"jddwz"
,
url
);
}
for
(
IndicatorsDto
data
:
listDatas
)
{
for
(
IndicatorsDto
data
:
listDatas
)
{
String
url
=
""
;
String
url
=
""
;
String
[]
urls
=
data
.
getPictureName
().
split
(
","
);
String
[]
urls
=
data
.
getPictureName
().
split
(
","
);
...
@@ -1025,6 +1039,18 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
...
@@ -1025,6 +1039,18 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
for
(
IndicatorsDto
listDatum
:
listData
)
{
for
(
IndicatorsDto
listDatum
:
listData
)
{
String
url
=
""
;
String
url
=
""
;
if
(
listDatum
.
getDisplayName
().
contains
(
"手车工作位置"
)){
String
[]
split
=
listDatum
.
getPictureName
().
split
(
":"
);
if
(
listDatum
.
getValue
().
equals
(
"true"
)){
String
[]
split1
=
split
[
0
].
split
(
","
);
photoUrls
.
put
(
listDatum
.
getDisplayName
().
split
(
"_"
)[
0
]+
"scsurl"
,
pictureUrl
+
split1
[
0
]);
photoUrls
.
put
(
listDatum
.
getDisplayName
().
split
(
"_"
)[
0
]+
"scxurl"
,
pictureUrl
+
split1
[
1
]);
}
else
{
String
[]
split1
=
split
[
1
].
split
(
","
);
photoUrls
.
put
(
listDatum
.
getDisplayName
().
split
(
"_"
)[
0
]+
"scsurl"
,
pictureUrl
+
split1
[
0
]);
photoUrls
.
put
(
listDatum
.
getDisplayName
().
split
(
"_"
)[
0
]+
"scxurl"
,
pictureUrl
+
split1
[
1
]);
}
}
else
{
if
(
listDatum
.
getValue
().
equals
(
"true"
)){
if
(
listDatum
.
getValue
().
equals
(
"true"
)){
url
=
pictureUrl
+
listDatum
.
getPictureName
();
url
=
pictureUrl
+
listDatum
.
getPictureName
();
}
else
{
}
else
{
...
@@ -1032,15 +1058,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
...
@@ -1032,15 +1058,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
}
photoUrls
.
put
(
listDatum
.
getDisplayName
().
split
(
"_"
)[
0
]+
"url"
,
url
);
photoUrls
.
put
(
listDatum
.
getDisplayName
().
split
(
"_"
)[
0
]+
"url"
,
url
);
}
}
}
return
photoUrls
;
return
photoUrls
;
/* try {
emqKeeper.getMqttClient().publish(stationId+"/switch/",JSON.toJSONString(photoUrls).getBytes(),0,false);
} catch (MqttException e) {
e.printStackTrace();
log.error("开关消息发送失败");
}*/
}
}
}
}
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