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
e42cbae0
Commit
e42cbae0
authored
Dec 26, 2022
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
紧急bug空指针问题
parent
ce829da7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
16 deletions
+19
-16
TopographyController.java
.../yeejoin/equipmanage/controller/TopographyController.java
+19
-16
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 @
e42cbae0
...
...
@@ -29,6 +29,7 @@ import org.apache.logging.log4j.Logger;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.domain.Page
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
...
...
@@ -1011,19 +1012,17 @@ public class TopographyController extends AbstractBaseController {
Map
<
String
,
Map
<
Date
,
IotDataVO
>>
iotDataAndDateMap
=
new
HashMap
<>();
finalResContainsWaterLevel
.
stream
().
forEach
(
item
->
{
containsWaterDates
.
addAll
(
item
.
getTimes
());
Map
<
Date
,
IotDataVO
>
dateDataMap
=
new
HashMap
<>();
for
(
int
i
=
0
;
i
<
item
.
getTimes
().
size
();
i
++)
{
dateDataMap
.
put
(
item
.
getTimes
().
get
(
i
),
item
.
getIotData
().
get
(
i
));
if
(!
CollectionUtils
.
isEmpty
(
item
.
getTimes
()))
{
containsWaterDates
.
addAll
(
item
.
getTimes
());
Map
<
Date
,
IotDataVO
>
dateDataMap
=
new
HashMap
<>();
for
(
int
i
=
0
;
i
<
item
.
getTimes
().
size
();
i
++)
{
dateDataMap
.
put
(
item
.
getTimes
().
get
(
i
),
item
.
getIotData
().
get
(
i
));
}
iotDataAndDateMap
.
put
(
item
.
getId
()
+
item
.
getEquipId
(),
dateDataMap
);
}
iotDataAndDateMap
.
put
(
item
.
getId
()
+
item
.
getEquipId
(),
dateDataMap
);
});
List
<
Date
>
collect
=
containsWaterDates
.
stream
().
distinct
().
sorted
(
Comparator
.
comparing
(
t
->
t
)).
collect
(
Collectors
.
toList
());
for
(
IotIndexResVo
indexResVo
:
finalResContainsWaterLevel
)
{
IotIndexResVo
iotIndexRes
=
new
IotIndexResVo
();
iotIndexRes
.
setName
(
indexResVo
.
getName
());
...
...
@@ -1115,14 +1114,18 @@ public class TopographyController extends AbstractBaseController {
}
});
typeCodeList
.
addAll
(
equipmentSpecifics
.
stream
().
filter
(
equipmentIndex
->
!
equipmentIndex
.
getIsTrend
()).
map
(
EquipmentIndex:
:
getTypeCode
).
distinct
().
collect
(
Collectors
.
toList
()));
typeNameList
.
addAll
(
equipmentSpecifics
.
stream
().
filter
(
equipmentIndex
->
!
equipmentIndex
.
getIsTrend
()).
map
(
EquipmentIndex:
:
getTypeName
).
distinct
().
collect
(
Collectors
.
toList
()));
indexKeyList
.
addAll
(
equipmentSpecifics
.
stream
().
filter
(
equipmentIndex
->
!
equipmentIndex
.
getIsTrend
()).
map
(
t
->
{
if
(!
CollectionUtils
.
isEmpty
(
equipmentSpecifics
.
stream
().
filter
(
equipmentIndex
->
!
equipmentIndex
.
getIsTrend
()).
map
(
EquipmentIndex:
:
getTypeCode
).
distinct
().
collect
(
Collectors
.
toList
())))
{
typeCodeList
.
addAll
(
equipmentSpecifics
.
stream
().
filter
(
equipmentIndex
->
!
equipmentIndex
.
getIsTrend
()).
map
(
EquipmentIndex:
:
getTypeCode
).
distinct
().
collect
(
Collectors
.
toList
()));
}
if
(!
CollectionUtils
.
isEmpty
(
equipmentSpecifics
.
stream
().
filter
(
equipmentIndex
->
!
equipmentIndex
.
getIsTrend
()).
map
(
EquipmentIndex:
:
getTypeName
).
distinct
().
collect
(
Collectors
.
toList
())))
{
typeNameList
.
addAll
(
equipmentSpecifics
.
stream
().
filter
(
equipmentIndex
->
!
equipmentIndex
.
getIsTrend
()).
map
(
EquipmentIndex:
:
getTypeName
).
distinct
().
collect
(
Collectors
.
toList
()));
}
if
(!
CollectionUtils
.
isEmpty
(
equipmentSpecifics
.
stream
().
filter
(
equipmentIndex
->
!
equipmentIndex
.
getIsTrend
()).
map
(
t
->
{
return
t
.
getPerfQuotaDefinitionId
()
+
iotCode
;
}).
distinct
().
collect
(
Collectors
.
toList
()));
}).
distinct
().
collect
(
Collectors
.
toList
())))
{
indexKeyList
.
addAll
(
equipmentSpecifics
.
stream
().
filter
(
equipmentIndex
->
!
equipmentIndex
.
getIsTrend
()).
map
(
t
->
{
return
t
.
getPerfQuotaDefinitionId
()
+
iotCode
;
}).
distinct
().
collect
(
Collectors
.
toList
()));
}
}
allKeys
=
typeCodeList
.
stream
().
distinct
().
collect
(
Collectors
.
joining
(
","
));
names
=
typeNameList
.
stream
().
distinct
().
collect
(
Collectors
.
joining
(
","
));
...
...
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