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
a9095a7f
Commit
a9095a7f
authored
Nov 18, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分析模块需求变更
parent
06bbd582
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
14 deletions
+48
-14
BigScreenAnalyseController.java
...dule/jxiop/biz/controller/BigScreenAnalyseController.java
+31
-11
TDBigScreenAnalyseController.java
...le/jxiop/biz/controller/TDBigScreenAnalyseController.java
+0
-0
IdxBizFanHealthIndexMapper.java
.../module/jxiop/biz/mapper2/IdxBizFanHealthIndexMapper.java
+2
-0
IdxBizFanHealthIndexMapper.xml
...n/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
+15
-3
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 @
a9095a7f
...
...
@@ -618,26 +618,45 @@ private FanHealthIndexMapper fanHealthIndexMapper;
@ApiOperation
(
value
=
"光伏 该装备下各指标预警 - 风站中间 下方列表"
)
@GetMapping
(
"/getPvSubSystemPointInfo"
)
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getPvSubSystemPointInfo
(
@RequestParam
(
value
=
"equipmentName"
,
required
=
false
)
String
equipmentName
,
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
String
stationId
)
throws
UnsupportedEncodingException
{
equipmentName
=
java
.
net
.
URLDecoder
.
decode
(
equipmentName
,
"UTF-8"
);
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
String
stationId
)
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
// List<Map<String, Object>> healthListInfo = idxBizFanHealthIndexMapper.getPvHealthInfoBySubSystem(equipmentName, stationBasic.getFanGatewayId());
List
<
Map
<
String
,
Object
>>
healthListInfo
=
idxBizFanHealthIndexMapper
.
getPvWarningInfoBySubSystem
(
equipmentName
,
stationBasic
.
getFanGatewayId
());
Map
<
Object
,
String
>
equipmentHealthIndexMap
=
healthListInfo
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"pointName"
),
t
->
t
.
get
(
"warningName"
).
toString
()));
List
<
Map
<
String
,
Object
>>
healthListInfo
=
idxBizFanHealthIndexMapper
.
getPvHealthInfoBySubSystem
(
equipmentName
,
stationBasic
.
getFanGatewayId
());
Map
<
Object
,
Double
>
equipmentHealthIndexMap
=
healthListInfo
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"pointName"
),
t
->
Double
.
parseDouble
(
t
.
get
(
"healthIndex"
).
toString
())));
List
<
Map
<
String
,
Object
>>
pointNameList
=
idxBizFanHealthIndexMapper
.
getPvPointNameListBySumSystem
(
stationBasic
.
getFanGatewayId
(),
equipmentName
);
pointNameList
.
forEach
(
item
->
{
String
equipmentHealthScore
=
equipmentHealthIndexMap
.
getOrDefault
(
item
.
get
(
"pointName"
),
"安全"
);
Double
equipmentHealthScore
=
equipmentHealthIndexMap
.
getOrDefault
(
item
.
get
(
"pointName"
),
100.0
);
if
(
100.0
==
equipmentHealthScore
)
{
item
.
put
(
"warningName"
,
"安全"
);
item
.
put
(
"status"
,
"安全"
);
}
else
{
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"设备"
);
query
.
eq
(
IdxBizFanHealthLevel:
:
getStatus
,
stationBasic
.
getStationName
());
query
.
le
(
IdxBizFanHealthLevel:
:
getGroupLowerLimit
,
equipmentHealthScore
);
query
.
ge
(
IdxBizFanHealthLevel:
:
getGroupUpperLimit
,
equipmentHealthScore
);
IdxBizFanHealthLevel
idxBizFanHealthLevel
=
idxBizFanHealthLevelMapper
.
selectOne
(
query
);
if
(
ObjectUtils
.
isEmpty
(
idxBizFanHealthLevel
))
{
item
.
put
(
"warningName"
,
"安全"
);
item
.
put
(
"status"
,
"安全"
);
}
else
{
item
.
put
(
"warningName"
,
idxBizFanHealthLevel
.
getHealthLevel
());
item
.
put
(
"status"
,
idxBizFanHealthLevel
.
getHealthLevel
());
}
}
int
sort
=
4
;
if
(
"注意"
.
equals
(
equipmentHealthScore
))
{
if
(
"注意"
.
equals
(
item
.
get
(
"warningName"
)
))
{
sort
=
3
;
}
else
if
(
"警告"
.
equals
(
equipmentHealthScore
))
{
}
else
if
(
"警告"
.
equals
(
item
.
get
(
"warningName"
)
))
{
sort
=
2
;
}
else
if
(
"危险"
.
equals
(
equipmentHealthScore
))
{
}
else
if
(
"危险"
.
equals
(
item
.
get
(
"warningName"
)
))
{
sort
=
1
;
}
item
.
put
(
"sort"
,
sort
);
item
.
put
(
"warningName"
,
equipmentHealthScore
);
item
.
put
(
"status"
,
equipmentHealthScore
);
item
.
put
(
"healthIndex"
,
equipmentHealthScore
);
});
pointNameList
.
sort
(
Comparator
.
comparing
(
o
->
o
.
get
(
"sort"
).
toString
()));
Page
<
Map
<
String
,
Object
>>
mapPage
=
new
Page
<>();
...
...
@@ -645,6 +664,7 @@ private FanHealthIndexMapper fanHealthIndexMapper;
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 @
a9095a7f
This diff is collapsed.
Click to expand it.
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 @
a9095a7f
...
...
@@ -162,4 +162,6 @@ public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIn
String
endTimeTop
);
Map
<
String
,
Object
>
getHealthIndexByIndexAddress
(
@Param
(
"gatewayId"
)
String
gatewayId
,
@Param
(
"indexAddress"
)
String
indexAddress
);
Map
<
String
,
Object
>
getHealthIndexByIndexAddressPv
(
@Param
(
"gatewayId"
)
String
gatewayId
,
@Param
(
"indexAddress"
)
String
indexAddress
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
View file @
a9095a7f
...
...
@@ -644,14 +644,13 @@
</select>
<select
id=
"getPvHealthInfoBySubSystem"
resultType=
"java.util.Map"
>
SELECT
IFNULL(
ROUND(avg( HEALTH_INDEX ), 2), 0
) AS healthIndex,
IFNULL(
HEALTH_INDEX, 100
) AS healthIndex,
POINT_NAME AS pointName
FROM
idx_biz_pv_health_index
pv_health_index_latest_data
<where>
ANALYSIS_OBJ_TYPE = '测点'
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = CURRENT_DATE
AND POINT_NAME IS NOT NULL
AND POINT_NAME != ''
<if
test=
"equipmentName != null and equipmentName != ''"
>
...
...
@@ -1643,5 +1642,18 @@
and GATEWAY_ID = #{gatewayId}
and ANALYSIS_OBJ_TYPE = '测点'
and ANALYSIS_TYPE = '按天'
limit 1
</select>
<select
id=
"getHealthIndexByIndexAddressPv"
resultType=
"java.util.Map"
>
select ROUND(ifnull(HEALTH_INDEX, 100.0), 1) as healthIndex,
STATION as station
from pv_health_index_latest_data
where
INDEX_ADDRESS = #{indexAddress}
and GATEWAY_ID = #{gatewayId}
and ANALYSIS_OBJ_TYPE = '测点'
and ANALYSIS_TYPE = '按天'
limit 1
</select>
</mapper>
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