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
f16a348b
Commit
f16a348b
authored
Jul 15, 2021
by
taabe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接警情况列表排序
parent
0dca5d82
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+13
-1
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
View file @
f16a348b
...
...
@@ -186,6 +186,16 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
}
}
private
static
int
comparingByGroupVal
(
Map
<
String
,
Object
>
map
,
Map
<
String
,
Object
>
map2
,
String
key
)
{
int
result
=
0
;
if
(
map
.
get
(
key
)
instanceof
Date
)
{
long
r1
=
((
Date
)
map
.
get
(
key
)).
getTime
();
long
r2
=
((
Date
)
map2
.
get
(
key
)).
getTime
();
result
=
Long
.
compare
(
r1
,
r2
);
}
return
result
;
}
/**
* 根据时间区间查询警情列表信息
*
...
...
@@ -197,7 +207,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
List
<
AlertCalled
>
alertCalledList
=
this
.
list
(
new
LambdaQueryWrapper
<
AlertCalled
>().
apply
(!
ValidationUtil
.
isEmpty
(
beginDate
),
"call_time >= '"
+
beginDate
+
"'"
).
le
(
true
,
AlertCalled:
:
getCallTime
,
endDate
));
"call_time >= '"
+
beginDate
+
"'"
).
le
(
true
,
AlertCalled:
:
getCallTime
,
endDate
));
Map
<
String
,
String
>
queryParams
=
Maps
.
newHashMap
();
queryParams
.
put
(
"beginDate"
,
beginDate
);
queryParams
.
put
(
"endDate"
,
endDate
);
...
...
@@ -216,6 +226,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
i
.
putAll
(
Bean
.
BeantoMap
(
alertCalled
));
});
}
// 按接警时间正序排序
allList
.
sort
((
e
,
o
)
->
comparingByGroupVal
(
e
,
o
,
"callTime"
));
return
allList
;
}
...
...
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