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
4cbe0bfd
Commit
4cbe0bfd
authored
Jun 28, 2023
by
litengwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
遥测现场问题解决
parent
c644098f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
20 deletions
+19
-20
TopographyController.java
.../yeejoin/equipmanage/controller/TopographyController.java
+19
-20
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 @
4cbe0bfd
...
...
@@ -899,9 +899,18 @@ 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
<>();
Map
<
String
,
List
<
Date
>>
dateMap
=
new
HashMap
<>();
for
(
Map
<
String
,
String
>
mapList
:
listObject
)
{
for
(
Map
.
Entry
entry
:
mapList
.
entrySet
())
{
if
(!
"name"
.
equals
(
entry
.
getKey
())
&&
!
"deviceName"
.
equals
(
entry
.
getKey
()))
{
if
(!
"name"
.
equals
(
entry
.
getKey
())
&&
!
"deviceName"
.
equals
(
entry
.
getKey
())
&&
!
"time"
.
equals
(
entry
.
getKey
())
&&
!
"createdTime"
.
equals
(
entry
.
getKey
()))
{
if
(!
dateMap
.
containsKey
(
entry
.
getKey
()))
{
ArrayList
<
Date
>
dates1
=
new
ArrayList
<>();
dates1
.
add
(
dateParse
(
mapList
.
get
(
"time"
)));
dateMap
.
put
(
entry
.
getKey
().
toString
(),
dates1
);
}
else
{
dateMap
.
get
(
entry
.
getKey
()).
add
(
dateParse
(
mapList
.
get
(
"time"
)));
}
IotDataVO
vo
=
new
IotDataVO
();
vo
.
setKey
(
String
.
valueOf
(
entry
.
getKey
()));
vo
.
setValue
(
String
.
valueOf
(
entry
.
getValue
()));
...
...
@@ -909,25 +918,15 @@ public class TopographyController extends AbstractBaseController {
}
}
}
Map
<
String
,
List
<
Date
>>
dateMap
=
new
HashMap
<>();
for
(
int
i
=
0
;
i
<
vos
.
size
();
i
=
i
+
2
)
{
Date
useDate
=
null
;
String
indexKey
=
null
;
if
(
vos
.
get
(
i
).
getKey
().
equals
(
"time"
))
{
useDate
=
dateParse
(
vos
.
get
(
i
).
getValue
().
toString
());
indexKey
=
String
.
valueOf
(
vos
.
get
(
i
+
1
).
getKey
());
}
else
{
useDate
=
dateParse
(
vos
.
get
(
i
).
getValue
().
toString
());
indexKey
=
String
.
valueOf
(
vos
.
get
(
i
).
getKey
());
}
if
(!
dateMap
.
containsKey
(
indexKey
))
{
ArrayList
<
Date
>
dates1
=
new
ArrayList
<>();
dates1
.
add
(
useDate
);
dateMap
.
put
(
indexKey
,
dates1
);
}
else
{
dateMap
.
get
(
indexKey
).
add
(
useDate
);
}
}
// for (int i = 0; i < vos.size(); i = i + 2) {
// Date useDate = null;
// String indexKey = null;
// if (vos.get(i).getKey().equals("time")) {
// useDate = dateParse(vos.get(i).getValue().toString());
// indexKey = String.valueOf(vos.get(i + 1).getKey());
// }
//
// }
List
<
EquipmentSpecificIndex
>
indexes
=
equipmentSpecificIndexMapper
.
getEquipmentSpeIndexByIotCodeAndTrend
(
iotCode
);
if
(
0
<
indexes
.
size
())
{
List
<
TopographyIotIndexTrendVo
>
list
=
new
ArrayList
<>();
...
...
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