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
d883a5e9
Commit
d883a5e9
authored
Nov 13, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
雷达图API改为环形图
parent
3c3bcb0d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
24 deletions
+5
-24
TDBigScreenAnalyseController.java
...le/jxiop/biz/controller/TDBigScreenAnalyseController.java
+5
-24
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/TDBigScreenAnalyseController.java
View file @
d883a5e9
...
@@ -373,41 +373,22 @@ public class TDBigScreenAnalyseController extends BaseController {
...
@@ -373,41 +373,22 @@ public class TDBigScreenAnalyseController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"场站预警信息统计图 - 雷达图"
,
httpMethod
=
"GET"
)
@ApiOperation
(
value
=
"场站预警信息统计图 - 雷达图"
,
httpMethod
=
"GET"
)
@GetMapping
(
"/equipWarningRadarMap"
)
@GetMapping
(
"/equipWarningRadarMap"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
assessIndexRadarMap
(
@RequestParam
(
required
=
false
,
value
=
"stationCode"
)
String
stationCode
)
{
public
ResponseModel
<
List
<
Map
<
String
,
Object
>
>>
assessIndexRadarMap
(
@RequestParam
(
required
=
false
,
value
=
"stationCode"
)
String
stationCode
)
{
if
(
CharSequenceUtil
.
isNotEmpty
(
stationCode
))
{
if
(
CharSequenceUtil
.
isNotEmpty
(
stationCode
))
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationCode
);
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationCode
);
stationCode
=
stationBasic
.
getFanGatewayId
();
stationCode
=
stationBasic
.
getFanGatewayId
();
}
}
List
<
Map
<
String
,
Object
>>
list
=
fanHealthIndexMapper
.
equipWarningRadarMapByTd
(
stationCode
);
List
<
Map
<
String
,
Object
>>
list
=
fanHealthIndexMapper
.
equipWarningRadarMapByTd
(
stationCode
);
Map
<
String
,
Integer
>
warningNumMap
=
list
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"warningname"
).
toString
(),
t
->
Integer
.
parseInt
(
t
.
get
(
"num"
).
toString
())));
Map
<
String
,
Integer
>
warningNumMap
=
list
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"warningname"
).
toString
(),
t
->
Integer
.
parseInt
(
t
.
get
(
"num"
).
toString
())));
List
<
String
>
warningList
=
Arrays
.
asList
(
"危险"
,
"注意"
,
"警告"
);
List
<
String
>
warningList
=
Arrays
.
asList
(
"注意"
,
"警告"
,
"危险"
);
List
<
Integer
>
data
=
new
ArrayList
<>();
List
<
List
<
Integer
>>
resultData
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
warningList
.
forEach
(
item
->
{
warningList
.
forEach
(
item
->
{
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"text"
,
item
);
map
.
put
(
"name"
,
item
);
map
.
put
(
"value"
,
warningNumMap
.
getOrDefault
(
item
,
0
));
resultList
.
add
(
map
);
resultList
.
add
(
map
);
data
.
add
(
warningNumMap
.
getOrDefault
(
item
,
0
));
});
});
resultData
.
add
(
data
);
return
ResponseHelper
.
buildResponse
(
resultList
);
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
resultMap
.
put
(
"radar"
,
resultList
);
resultMap
.
put
(
"array"
,
resultData
);
return
ResponseHelper
.
buildResponse
(
resultMap
);
// HashMap<String, Object> resultMap = new HashMap<>();
// List<String> data = new ArrayList<>();
// list.forEach(item -> {
// HashMap<String, Object> map = new HashMap<>();
// map.put("text", item.get("warningName"));
// resultList.add(map);
// data.add(item.get("num").toString());
// });
//
}
}
...
...
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