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
3c3bcb0d
Commit
3c3bcb0d
authored
Nov 10, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预警接口修改
parent
2e754360
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
6 deletions
+29
-6
IdxBizFanWarningRecordController.java
...xiop/biz/controller/IdxBizFanWarningRecordController.java
+29
-6
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizFanWarningRecordController.java
View file @
3c3bcb0d
...
...
@@ -27,10 +27,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
/**
*
...
...
@@ -337,10 +334,36 @@ public class IdxBizFanWarningRecordController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/selectFanWarningNum"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询各风机预警状况"
,
notes
=
"查询各风机预警状况"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
selectFanWarningNum
(
@RequestParam
String
station
)
{
public
ResponseModel
<
Map
<
String
,
Object
>>
selectFanWarningNum
(
@RequestParam
String
station
)
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
maps
=
fanWaringRecordMapper
.
selectFanWarningNum
(
station
);
List
<
Integer
>
wxList
=
new
ArrayList
<>();
List
<
Integer
>
zyList
=
new
ArrayList
<>();
List
<
Integer
>
jgList
=
new
ArrayList
<>();
List
<
String
>
list
=
new
ArrayList
<>();
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
wxList
.
add
(
Integer
.
valueOf
(
map
.
get
(
"危险"
).
toString
()));
zyList
.
add
(
Integer
.
valueOf
(
map
.
get
(
"注意"
).
toString
()));
jgList
.
add
(
Integer
.
valueOf
(
map
.
get
(
"警告"
).
toString
()));
list
.
add
(
map
.
get
(
"EQUIPMENT_NAME"
).
toString
());
}
HashMap
<
String
,
Object
>
wxMapResult
=
new
HashMap
<>();
wxMapResult
.
put
(
"data"
,
wxList
);
wxMapResult
.
put
(
"name"
,
"危险"
);
HashMap
<
String
,
Object
>
zyMapResult
=
new
HashMap
<>();
zyMapResult
.
put
(
"data"
,
zyList
);
zyMapResult
.
put
(
"name"
,
"注意"
);
HashMap
<
String
,
Object
>
jgMapResult
=
new
HashMap
<>();
jgMapResult
.
put
(
"data"
,
jgList
);
jgMapResult
.
put
(
"name"
,
"警告"
);
List
<
Map
<
String
,
Object
>>
hashMaps
=
Arrays
.
asList
(
wxMapResult
,
zyMapResult
,
jgMapResult
);
resultMap
.
put
(
"axisData"
,
list
);
resultMap
.
put
(
"seriesData"
,
hashMaps
);
return
ResponseHelper
.
buildResponse
(
resultMap
);
return
ResponseHelper
.
buildResponse
(
maps
);
}
...
...
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