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
a24ce4a3
Commit
a24ce4a3
authored
Mar 30, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改物联趋势图
parent
89593a50
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
7 deletions
+20
-7
TopographyController.java
.../yeejoin/equipmanage/controller/TopographyController.java
+20
-7
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/TopographyController.java
View file @
a24ce4a3
...
...
@@ -908,16 +908,29 @@ public class TopographyController extends AbstractBaseController {
String
json
=
JSON
.
toJSONString
(
entity
.
getResult
());
List
<
Map
<
String
,
String
>>
listObject
=
(
List
<
Map
<
String
,
String
>>)
JSONArray
.
parse
(
json
);
List
<
IotDataVO
>
vos
=
new
ArrayList
<>();
for
(
Map
<
String
,
String
>
mapList
:
listObject
)
{
List
<
EquipmentSpecificIndex
>
indexes
=
equipmentSpecificIndexMapper
.
getEquipmentSpeIndexByIotCodeAndTrend
(
iotCode
);
List
<
Map
<
String
,
String
>>
listObjp
=
new
ArrayList
<>();
for
(
Map
<
String
,
String
>
mapList
:
listObject
)
{
for
(
Map
.
Entry
entry
:
mapList
.
entrySet
())
{
if
(!
"name"
.
equals
(
entry
.
getKey
())
&&
!
"deviceName"
.
equals
(
entry
.
getKey
()))
{
IotDataVO
vo
=
new
IotDataVO
();
vo
.
setKey
(
String
.
valueOf
(
entry
.
getKey
()));
vo
.
setValue
(
String
.
valueOf
(
entry
.
getValue
()));
vos
.
add
(
vo
);
for
(
EquipmentSpecificIndex
x
:
indexes
)
{
if
(
x
.
getNameKey
().
equals
(
entry
.
getKey
())&&
entry
.
getValue
()!=
null
&&!
""
.
equals
(
String
.
valueOf
(
entry
.
getValue
()))&&!
"null"
.
equals
(
String
.
valueOf
(
entry
.
getValue
())))
{
listObjp
.
add
(
mapList
);
}
}
}
}
for
(
Map
<
String
,
String
>
mapList
:
listObjp
)
{
for
(
Map
.
Entry
entry
:
mapList
.
entrySet
())
{
if
(!
"name"
.
equals
(
entry
.
getKey
())
&&
!
"deviceName"
.
equals
(
entry
.
getKey
()))
{
IotDataVO
vo
=
new
IotDataVO
();
vo
.
setKey
(
String
.
valueOf
(
entry
.
getKey
()));
vo
.
setValue
(
String
.
valueOf
(
entry
.
getValue
()));
vos
.
add
(
vo
);
}
}
}
List
<
IotDataVO
>
timeList
=
vos
.
stream
().
filter
(
x
->
x
.
getKey
().
equals
(
"time"
)).
collect
(
Collectors
.
toList
());
List
<
Date
>
dates
=
new
ArrayList
<>();
...
...
@@ -935,7 +948,7 @@ public class TopographyController extends AbstractBaseController {
dates
.
add
(
sdf1
.
parse
(
time
));
logger
.
info
(
"返回时间===================================("
+
sdf1
.
parse
(
time
)
+
") ======================================="
);
}
List
<
EquipmentSpecificIndex
>
indexes
=
equipmentSpecificIndexMapper
.
getEquipmentSpeIndexByIotCodeAndTrend
(
iotCode
);
if
(
0
<
indexes
.
size
())
{
List
<
TopographyIotIndexTrendVo
>
list
=
new
ArrayList
<>();
vos
.
forEach
(
iotDataVO
->
{
...
...
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