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
a7b1033a
Commit
a7b1033a
authored
Nov 17, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分析 - 右下角折线图
parent
10adf34f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
38 deletions
+49
-38
BigScreenAnalyseController.java
...dule/jxiop/biz/controller/BigScreenAnalyseController.java
+33
-33
TDBigScreenAnalyseController.java
...le/jxiop/biz/controller/TDBigScreenAnalyseController.java
+5
-3
IdxBizFanHealthIndexMapper.java
.../module/jxiop/biz/mapper2/IdxBizFanHealthIndexMapper.java
+2
-1
FanHealthIndexMapper.java
...boot/module/jxiop/biz/tdMapper2/FanHealthIndexMapper.java
+3
-1
IdxBizFanHealthIndexMapper.xml
...n/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
+3
-0
FanHealthIndex.xml
...iz/src/main/resources/mapper/tdengine2/FanHealthIndex.xml
+3
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/BigScreenAnalyseController.java
View file @
a7b1033a
...
...
@@ -500,39 +500,39 @@ public class BigScreenAnalyseController extends BaseController {
return
ResponseHelper
.
buildResponse
(
resultMap
);
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"该子系统各指标预警 - 风站中间 下方列表"
)
@GetMapping
(
"/getSubSystemPointInfo"
)
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getSubSystemPointInfo
(
@RequestParam
(
value
=
"subSystem"
,
required
=
false
)
String
subSystem
,
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
String
stationId
)
throws
UnsupportedEncodingException
{
subSystem
=
java
.
net
.
URLDecoder
.
decode
(
subSystem
,
"UTF-8"
);
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
// List<Map<String, Object>> healthListInfo = idxBizFanHealthIndexMapper.getHealthInfoBySubSystem(subSystem, stationBasic.getFanGatewayId());
List
<
Map
<
String
,
Object
>>
healthListInfo
=
idxBizFanHealthIndexMapper
.
getWarningInfoBySubSystem
(
subSystem
,
stationBasic
.
getFanGatewayId
());
Map
<
Object
,
String
>
equipmentHealthIndexMap
=
healthListInfo
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"pointName"
),
t
->
t
.
get
(
"warningName"
).
toString
()));
List
<
Map
<
String
,
Object
>>
pointNameList
=
idxBizFanHealthIndexMapper
.
getPointNameListBySumSystem
(
stationBasic
.
getFanGatewayId
(),
subSystem
);
pointNameList
.
forEach
(
item
->
{
String
warningName
=
equipmentHealthIndexMap
.
getOrDefault
(
item
.
get
(
"pointName"
),
"安全"
);
int
sort
=
4
;
item
.
put
(
"warningName"
,
warningName
);
item
.
put
(
"status"
,
warningName
);
if
(
"注意"
.
equals
(
warningName
))
{
sort
=
3
;
}
else
if
(
"警告"
.
equals
(
warningName
))
{
sort
=
2
;
}
else
if
(
"危险"
.
equals
(
warningName
))
{
sort
=
1
;
}
item
.
put
(
"sort"
,
sort
);
});
pointNameList
.
sort
(
Comparator
.
comparing
(
o
->
o
.
get
(
"sort"
).
toString
()));
Page
<
Map
<
String
,
Object
>>
mapPage
=
new
Page
<>();
mapPage
.
setSize
(
pointNameList
.
size
());
mapPage
.
setTotal
(
pointNameList
.
size
());
mapPage
.
setCurrent
(
1
);
mapPage
.
setRecords
(
pointNameList
);
return
ResponseHelper
.
buildResponse
(
mapPage
);
}
//
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
//
@ApiOperation(value = "该子系统各指标预警 - 风站中间 下方列表")
//
@GetMapping("/getSubSystemPointInfo")
//
public ResponseModel<Page<Map<String, Object>>> getSubSystemPointInfo(@RequestParam(value = "subSystem", required = false) String subSystem,
//
@RequestParam(value = "stationId", required = false) String stationId) throws UnsupportedEncodingException {
//
subSystem = java.net.URLDecoder.decode(subSystem,"UTF-8");
//
StationBasic stationBasic = stationBasicMapper.selectById(stationId);
//
//
List<Map<String, Object>> healthListInfo = idxBizFanHealthIndexMapper.getHealthInfoBySubSystem(subSystem, stationBasic.getFanGatewayId());
//
List<Map<String, Object>> healthListInfo = idxBizFanHealthIndexMapper.getWarningInfoBySubSystem(subSystem, stationBasic.getFanGatewayId());
//
Map<Object, String> equipmentHealthIndexMap = healthListInfo.stream().collect(Collectors.toMap(t -> t.get("pointName"), t -> t.get("warningName").toString()));
//
List<Map<String, Object>> pointNameList = idxBizFanHealthIndexMapper.getPointNameListBySumSystem(stationBasic.getFanGatewayId(), subSystem);
//
pointNameList.forEach(item -> {
//
String warningName = equipmentHealthIndexMap.getOrDefault(item.get("pointName"), "安全");
//
int sort = 4;
//
item.put("warningName", warningName);
//
item.put("status", warningName);
//
if ("注意".equals(warningName)) {
//
sort = 3;
//
} else if ("警告".equals(warningName)) {
//
sort = 2;
//
} else if ("危险".equals(warningName)) {
//
sort = 1;
//
}
//
item.put("sort", sort);
//
});
//
pointNameList.sort(Comparator.comparing(o -> o.get("sort").toString()));
//
Page<Map<String, Object>> mapPage = new Page<>();
//
mapPage.setSize(pointNameList.size());
//
mapPage.setTotal(pointNameList.size());
//
mapPage.setCurrent(1);
//
mapPage.setRecords(pointNameList);
//
return ResponseHelper.buildResponse(mapPage);
//
}
...
...
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 @
a7b1033a
...
...
@@ -591,16 +591,18 @@ public class TDBigScreenAnalyseController extends BaseController {
@GetMapping
(
"/getSubSystemPointInfo"
)
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getSubSystemPointInfo
(
@RequestParam
(
value
=
"subSystem"
,
required
=
false
)
String
subSystem
,
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
String
stationId
)
throws
UnsupportedEncodingException
{
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
String
stationId
,
@RequestParam
(
value
=
"equipmentName"
,
required
=
false
)
String
equipmentName
)
throws
UnsupportedEncodingException
{
subSystem
=
java
.
net
.
URLDecoder
.
decode
(
subSystem
,
"UTF-8"
);
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
equipmentName
=
StrUtil
.
isNotEmpty
(
equipmentName
)
?
"%"
+
equipmentName
+
"风机%"
:
equipmentName
;
// List<Map<String, Object>> healthListInfo = idxBizFanHealthIndexMapper.getHealthInfoBySubSystem(subSystem, stationBasic.getFanGatewayId());
List
<
Map
<
String
,
Object
>>
healthListInfo
=
fanHealthIndexMapper
.
getWarningInfoBySubSystemTd
(
subSystem
,
stationBasic
.
getFanGatewayId
());
stationBasic
.
getFanGatewayId
()
,
equipmentName
);
Map
<
Object
,
String
>
equipmentHealthIndexMap
=
healthListInfo
.
stream
()
.
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"pointname"
),
t
->
t
.
get
(
"warningname"
).
toString
()));
List
<
Map
<
String
,
Object
>>
pointNameList
=
idxBizFanHealthIndexMapper
.
getPointNameListBySumSystem
(
stationBasic
.
getFanGatewayId
(),
subSystem
);
.
getPointNameListBySumSystem
(
stationBasic
.
getFanGatewayId
(),
subSystem
,
equipmentName
);
pointNameList
.
forEach
(
item
->
{
String
warningName
=
equipmentHealthIndexMap
.
getOrDefault
(
item
.
get
(
"pointName"
),
"安全"
);
int
sort
=
4
;
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/IdxBizFanHealthIndexMapper.java
View file @
a7b1033a
...
...
@@ -68,7 +68,8 @@ public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIn
@Param
(
"equipmentName"
)
String
equipmentName
);
List
<
Map
<
String
,
Object
>>
getPointNameListBySumSystem
(
@Param
(
"gatewayId"
)
String
gatewayId
,
@Param
(
"subSystem"
)
String
subSystem
);
@Param
(
"subSystem"
)
String
subSystem
,
@Param
(
"equipmentName"
)
String
equipmentName
);
List
<
Map
<
String
,
Object
>>
getHealthInfoBySubSystem
(
@Param
(
"subSystem"
)
String
subSystem
,
@Param
(
"gatewayId"
)
String
gatewayId
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/tdMapper2/FanHealthIndexMapper.java
View file @
a7b1033a
...
...
@@ -93,7 +93,9 @@ public interface FanHealthIndexMapper extends BaseMapper<FanHealthIndex> {
List
<
Map
<
String
,
Object
>>
getPvWarningInfoBySubSystemTd
(
@Param
(
"equipmentName"
)
String
equipmentName
,
@Param
(
"gatewayId"
)
String
gatewayId
);
List
<
Map
<
String
,
Object
>>
getWarningInfoBySubSystemTd
(
@Param
(
"subSystem"
)
String
subSystem
,
@Param
(
"gatewayId"
)
String
gatewayId
);
List
<
Map
<
String
,
Object
>>
getWarningInfoBySubSystemTd
(
@Param
(
"subSystem"
)
String
subSystem
,
@Param
(
"gatewayId"
)
String
gatewayId
,
@Param
(
"equipmentName"
)
String
equipmentName
);
List
<
Map
<
String
,
Object
>>
getInfoByDate
(
@Param
(
"areaCode"
)
String
areaCode
,
@Param
(
"stationCode"
)
String
stationCode
,
@Param
(
"list"
)
List
<
String
>
list
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
View file @
a7b1033a
...
...
@@ -518,6 +518,9 @@
<if
test=
"gatewayId != null and gatewayId != ''"
>
AND GATEWAY_ID = #{gatewayId}
</if>
<if
test=
"equipmentName != null and equipmentName != ''"
>
AND EQUIPMENT_NAME like #{equipmentName}
</if>
</where>
GROUP BY
POINT_NAME
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/tdengine2/FanHealthIndex.xml
View file @
a7b1033a
...
...
@@ -281,6 +281,9 @@
<if
test=
"gatewayId != null and gatewayId != ''"
>
AND gateway_id = #{gatewayId}
</if>
<if
test=
"equipmentName != null and equipmentName != ''"
>
AND equipment_name like #{equipmentName}
</if>
</where>
group by point_name
</select>
...
...
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