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
7639ccae
Commit
7639ccae
authored
Feb 21, 2024
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
f0c2b63f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
McbWarningController.java
...oot/module/jxiop/biz/controller/McbWarningController.java
+15
-2
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/McbWarningController.java
View file @
7639ccae
...
@@ -5,6 +5,7 @@ import com.yeejoin.amos.boot.module.jxiop.api.service.IMcbWarningService;
...
@@ -5,6 +5,7 @@ import com.yeejoin.amos.boot.module.jxiop.api.service.IMcbWarningService;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
...
@@ -14,9 +15,11 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
...
@@ -14,9 +15,11 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
@RestController
@RestController
@Api
(
tags
=
"McbWarning Controller"
)
@Api
(
tags
=
"McbWarning Controller"
)
...
@@ -36,8 +39,18 @@ public class McbWarningController {
...
@@ -36,8 +39,18 @@ public class McbWarningController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"[监测总览]近七日预警统计"
,
notes
=
"[监测总览]近七日预警统计"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"[监测总览]近七日预警统计"
,
notes
=
"[监测总览]近七日预警统计"
)
@GetMapping
(
value
=
"/count/week"
)
@GetMapping
(
value
=
"/count/week"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
queryWeekCount
()
{
public
ResponseModel
<
Object
>
queryWeekCount
()
{
return
ResponseHelper
.
buildResponse
(
mcbWarningService
.
queryWeekCount
());
List
<
Map
<
String
,
Object
>>
list
=
mcbWarningService
.
queryWeekCount
();
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
List
<
Object
>
axisData
=
new
ArrayList
<>();
List
<
Object
>
seriesData
=
new
ArrayList
<>();
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
axisData
=
list
.
stream
().
map
(
x
->
x
.
get
(
"axisData"
)).
collect
(
Collectors
.
toList
());
seriesData
=
list
.
stream
().
map
(
y
->
y
.
get
(
"seriesData"
)).
collect
(
Collectors
.
toList
());
}
result
.
put
(
"axisData"
,
axisData
);
result
.
put
(
"seriesData"
,
seriesData
);
return
ResponseHelper
.
buildResponse
(
result
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
...
...
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