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
44ca9a8b
Commit
44ca9a8b
authored
Sep 21, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分析需求API
parent
5c48dd10
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
284 additions
and
10 deletions
+284
-10
BigScreenAnalyseController.java
...dule/jxiop/biz/controller/BigScreenAnalyseController.java
+120
-0
IdxBizFanHealthIndexMapper.java
.../module/jxiop/biz/mapper2/IdxBizFanHealthIndexMapper.java
+23
-0
IdxBizFanHealthIndexMapper.xml
...n/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
+140
-9
IdxBizFanWarningRecordMapper.xml
...resources/mapper/cluster/IdxBizFanWarningRecordMapper.xml
+1
-1
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 @
44ca9a8b
...
@@ -59,6 +59,11 @@ public class BigScreenAnalyseController extends BaseController {
...
@@ -59,6 +59,11 @@ public class BigScreenAnalyseController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站设备健康状态指数与趋势 - 仪表盘"
,
notes
=
"场站设备健康状态指数与趋势 - 仪表盘"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站设备健康状态指数与趋势 - 仪表盘"
,
notes
=
"场站设备健康状态指数与趋势 - 仪表盘"
)
@GetMapping
(
value
=
"/getHealthScoreInfo"
)
@GetMapping
(
value
=
"/getHealthScoreInfo"
)
public
ResponseModel
<
Map
<
String
,
BigDecimal
>>
getHealthScoreInfo
(
@RequestParam
(
required
=
false
)
String
areaCode
,
@RequestParam
(
required
=
false
)
String
stationCode
)
{
public
ResponseModel
<
Map
<
String
,
BigDecimal
>>
getHealthScoreInfo
(
@RequestParam
(
required
=
false
)
String
areaCode
,
@RequestParam
(
required
=
false
)
String
stationCode
)
{
if
(
StrUtil
.
isNotEmpty
(
stationCode
))
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationCode
);
stationCode
=
stationBasic
.
getStationName
();
}
HashMap
<
String
,
BigDecimal
>
stringBigDecimalHashMap
=
new
HashMap
<>();
HashMap
<
String
,
BigDecimal
>
stringBigDecimalHashMap
=
new
HashMap
<>();
stringBigDecimalHashMap
.
put
(
"value"
,
idxBizFanHealthIndexMapper
.
getHealthScoreInfo
(
areaCode
,
stationCode
));
stringBigDecimalHashMap
.
put
(
"value"
,
idxBizFanHealthIndexMapper
.
getHealthScoreInfo
(
areaCode
,
stationCode
));
return
ResponseHelper
.
buildResponse
(
stringBigDecimalHashMap
);
return
ResponseHelper
.
buildResponse
(
stringBigDecimalHashMap
);
...
@@ -69,6 +74,12 @@ public class BigScreenAnalyseController extends BaseController {
...
@@ -69,6 +74,12 @@ public class BigScreenAnalyseController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站设备健康状态指数与趋势 - 折线图"
,
notes
=
"场站设备健康状态指数与趋势 - 折线图"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站设备健康状态指数与趋势 - 折线图"
,
notes
=
"场站设备健康状态指数与趋势 - 折线图"
)
@GetMapping
(
value
=
"/getHealthListInfo"
)
@GetMapping
(
value
=
"/getHealthListInfo"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getHealthListInfo
(
@RequestParam
(
required
=
false
)
String
areaCode
,
@RequestParam
(
required
=
false
)
String
stationCode
)
{
public
ResponseModel
<
Map
<
String
,
Object
>>
getHealthListInfo
(
@RequestParam
(
required
=
false
)
String
areaCode
,
@RequestParam
(
required
=
false
)
String
stationCode
)
{
if
(
StrUtil
.
isNotEmpty
(
stationCode
))
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationCode
);
stationCode
=
stationBasic
.
getStationName
();
}
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
healthListInfo
=
idxBizFanHealthIndexMapper
.
getHealthListInfo
(
areaCode
,
stationCode
);
List
<
Map
<
String
,
Object
>>
healthListInfo
=
idxBizFanHealthIndexMapper
.
getHealthListInfo
(
areaCode
,
stationCode
);
List
<
String
>
time
=
new
ArrayList
<>();
List
<
String
>
time
=
new
ArrayList
<>();
...
@@ -244,6 +255,10 @@ public class BigScreenAnalyseController extends BaseController {
...
@@ -244,6 +255,10 @@ public class BigScreenAnalyseController extends BaseController {
@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
<
Map
<
String
,
Object
>>
assessIndexRadarMap
(
@RequestParam
(
required
=
false
,
value
=
"stationCode"
)
String
stationCode
)
{
if
(
StrUtil
.
isNotEmpty
(
stationCode
))
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationCode
);
stationCode
=
stationBasic
.
getStationName
();
}
List
<
Map
<
String
,
Object
>>
list
=
idxBizFanHealthIndexMapper
.
equipWarningRadarMap
(
stationCode
);
List
<
Map
<
String
,
Object
>>
list
=
idxBizFanHealthIndexMapper
.
equipWarningRadarMap
(
stationCode
);
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
List
<
List
<
String
>>
resultData
=
new
ArrayList
<>();
List
<
List
<
String
>>
resultData
=
new
ArrayList
<>();
...
@@ -426,4 +441,109 @@ public class BigScreenAnalyseController extends BaseController {
...
@@ -426,4 +441,109 @@ public class BigScreenAnalyseController extends BaseController {
return
ResponseHelper
.
buildResponse
(
mapPage
);
return
ResponseHelper
.
buildResponse
(
mapPage
);
}
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"光伏 左侧风机信息列表"
)
@GetMapping
(
"/getPvInfoByPage"
)
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getPvInfoByPage
(
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
String
stationId
)
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
List
<
Map
<
String
,
Object
>>
equipmentList
=
idxBizFanHealthIndexMapper
.
getPvInfoByPage
(
stationBasic
.
getFanGatewayId
());
List
<
Map
<
String
,
Object
>>
healthInfoList
=
idxBizFanHealthIndexMapper
.
getPvHealthInfoList
(
stationBasic
.
getFanGatewayId
());
Map
<
Object
,
Double
>
equipmentHealthIndexMap
=
healthInfoList
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"subarray"
),
t
->
Double
.
parseDouble
(
t
.
get
(
"avgHealthIndex"
).
toString
())));
equipmentList
.
forEach
(
item
->
{
Double
equipmentHealthScore
=
equipmentHealthIndexMap
.
getOrDefault
(
item
.
get
(
"subarray"
),
100.0
);
if
(
100.0
==
equipmentHealthScore
)
{
item
.
put
(
"warningName"
,
"安全"
);
}
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
);
item
.
put
(
"warningName"
,
idxBizFanHealthLevel
.
getHealthLevel
());
}
item
.
put
(
"healthIndex"
,
equipmentHealthScore
);
});
Page
<
Map
<
String
,
Object
>>
mapPage
=
new
Page
<>();
mapPage
.
setSize
(
equipmentList
.
size
());
mapPage
.
setTotal
(
equipmentList
.
size
());
mapPage
.
setCurrent
(
1
);
mapPage
.
setRecords
(
equipmentList
);
return
ResponseHelper
.
buildResponse
(
mapPage
);
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"光伏 子阵下各设备状态指数 柱状图"
)
@GetMapping
(
"/getPvSubSystemInfo"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getPvSubSystemInfo
(
@RequestParam
(
value
=
"subarray"
,
required
=
false
)
String
subarray
,
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
String
stationId
)
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
healthListInfo
=
idxBizFanHealthIndexMapper
.
getPvSubSystemInfo
(
subarray
,
stationBasic
.
getFanGatewayId
());
Map
<
Object
,
Double
>
equipmentHealthIndexMap
=
healthListInfo
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"equipmentName"
),
t
->
Double
.
parseDouble
(
t
.
get
(
"avgHealthIndex"
).
toString
())));
List
<
Object
>
seriesData
=
new
ArrayList
<>();
List
<
Object
>
axisData
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
equipmentList
=
idxBizFanHealthIndexMapper
.
getPvSumSystemListByEquipment
(
stationBasic
.
getFanGatewayId
(),
subarray
);
equipmentList
.
forEach
(
item
->
{
Double
equipmentHealthScore
=
equipmentHealthIndexMap
.
getOrDefault
(
item
.
get
(
"equipmentName"
),
100.0
);
seriesData
.
add
(
equipmentHealthScore
);
axisData
.
add
(
item
.
get
(
"equipmentName"
));
});
resultMap
.
put
(
"axisData"
,
axisData
);
resultMap
.
put
(
"seriesData"
,
seriesData
);
return
ResponseHelper
.
buildResponse
(
resultMap
);
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@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
)
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
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
->
{
Double
equipmentHealthScore
=
equipmentHealthIndexMap
.
getOrDefault
(
item
.
get
(
"pointName"
),
100.0
);
if
(
100.0
==
equipmentHealthScore
)
{
item
.
put
(
"warningName"
,
"安全"
);
}
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
);
item
.
put
(
"warningName"
,
idxBizFanHealthLevel
.
getHealthLevel
());
}
item
.
put
(
"healthIndex"
,
equipmentHealthScore
);
});
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/mapper2/IdxBizFanHealthIndexMapper.java
View file @
44ca9a8b
...
@@ -49,4 +49,27 @@ public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIn
...
@@ -49,4 +49,27 @@ public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIn
List
<
Map
<
String
,
Object
>>
getHealthInfoBySubSystem
(
@Param
(
"subSystem"
)
String
subSystem
,
@Param
(
"gatewayId"
)
String
gatewayId
);
List
<
Map
<
String
,
Object
>>
getHealthInfoBySubSystem
(
@Param
(
"subSystem"
)
String
subSystem
,
@Param
(
"gatewayId"
)
String
gatewayId
);
List
<
Map
<
String
,
Object
>>
getPvInfoByPage
(
@Param
(
"gatewayId"
)
String
gatewayId
);
List
<
Map
<
String
,
Object
>>
getPvHealthInfoList
(
@Param
(
"gatewayId"
)
String
gatewayId
);
List
<
Map
<
String
,
Object
>>
getPvSubSystemInfo
(
@Param
(
"subarray"
)
String
subarray
,
@Param
(
"gatewayId"
)
String
gatewayId
);
List
<
Map
<
String
,
Object
>>
getPvSumSystemListByEquipment
(
@Param
(
"gatewayId"
)
String
gatewayId
,
@Param
(
"subarray"
)
String
subarray
);
List
<
Map
<
String
,
Object
>>
getPvHealthInfoBySubSystem
(
@Param
(
"equipmentName"
)
String
equipmentName
,
@Param
(
"gatewayId"
)
String
gatewayId
);
List
<
Map
<
String
,
Object
>>
getPvPointNameListBySumSystem
(
@Param
(
"gatewayId"
)
String
gatewayId
,
@Param
(
"equipmentName"
)
String
equipmentName
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
View file @
44ca9a8b
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
AND
AND
DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_FORMAT( NOW(), "%Y-%m-%d" )
DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_FORMAT( NOW(), "%Y-%m-%d" )
<if
test=
"areaCode != null and areaCode != ''"
>
<if
test=
"areaCode != null and areaCode != ''"
>
AND ARAE
= #{areaCode}
AND ARAE
like concat('%', #{areaCode}, '%')
</if>
</if>
<if
test=
"stationCode != null and stationCode != ''"
>
<if
test=
"stationCode != null and stationCode != ''"
>
AND STATION = #{stationCode}
AND STATION = #{stationCode}
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
ANALYSIS_TYPE = '按天'
ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_FORMAT( NOW(), "%Y-%m-%d" )
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_FORMAT( NOW(), "%Y-%m-%d" )
<if
test=
"areaCode != null and areaCode != ''"
>
<if
test=
"areaCode != null and areaCode != ''"
>
AND ARAE
= #{areaCode}
AND ARAE
like concat('%', #{areaCode}, '%')
</if>
</if>
<if
test=
"stationCode != null and stationCode != ''"
>
<if
test=
"stationCode != null and stationCode != ''"
>
AND STATION = #{stationCode}
AND STATION = #{stationCode}
...
@@ -71,7 +71,7 @@
...
@@ -71,7 +71,7 @@
<where>
<where>
ANALYSIS_TYPE = '按天'
ANALYSIS_TYPE = '按天'
<if
test=
"areaCode != null and areaCode != ''"
>
<if
test=
"areaCode != null and areaCode != ''"
>
AND ARAE
= #{areaCode}
AND ARAE
like concat('%', #{areaCode}, '%')
</if>
</if>
<if
test=
"stationCode != null and stationCode != ''"
>
<if
test=
"stationCode != null and stationCode != ''"
>
AND STATION = #{stationCode}
AND STATION = #{stationCode}
...
@@ -90,7 +90,7 @@
...
@@ -90,7 +90,7 @@
<where>
<where>
ANALYSIS_TYPE = '按天'
ANALYSIS_TYPE = '按天'
<if
test=
"areaCode != null and areaCode != ''"
>
<if
test=
"areaCode != null and areaCode != ''"
>
AND ARAE
= #{areaCode}
AND ARAE
like concat('%', #{areaCode}, '%')
</if>
</if>
<if
test=
"stationCode != null and stationCode != ''"
>
<if
test=
"stationCode != null and stationCode != ''"
>
AND STATION = #{stationCode}
AND STATION = #{stationCode}
...
@@ -190,7 +190,7 @@
...
@@ -190,7 +190,7 @@
AND ANALYSIS_TYPE = '按天'
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_FORMAT( NOW(), "%Y-%m-%d" )
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_FORMAT( NOW(), "%Y-%m-%d" )
<if
test=
"areaCode != null and areaCode != ''"
>
<if
test=
"areaCode != null and areaCode != ''"
>
AND ARAE
= #{areaCode}
AND ARAE
like concat('%', #{areaCode}, '%')
</if>
</if>
</where>
</where>
GROUP BY
GROUP BY
...
@@ -207,7 +207,7 @@
...
@@ -207,7 +207,7 @@
AND ANALYSIS_TYPE = '按天'
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_FORMAT( NOW(), "%Y-%m-%d" )
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_FORMAT( NOW(), "%Y-%m-%d" )
<if
test=
"areaCode != null and areaCode != ''"
>
<if
test=
"areaCode != null and areaCode != ''"
>
AND ARAE
= #{areaCode}
AND ARAE
like concat('%', #{areaCode}, '%')
</if>
</if>
</where>
</where>
GROUP BY
GROUP BY
...
@@ -257,7 +257,7 @@
...
@@ -257,7 +257,7 @@
${tableName} a
${tableName} a
<where>
<where>
<if
test=
"areaCode != null and areaCode != ''"
>
<if
test=
"areaCode != null and areaCode != ''"
>
a.ARAE
= #{areaCode}
a.ARAE
like concat('%', #{areaCode}, '%')
</if>
</if>
</where>
</where>
group by pointName,
group by pointName,
...
@@ -279,7 +279,7 @@
...
@@ -279,7 +279,7 @@
idx_biz_pv_warning_record
idx_biz_pv_warning_record
<where>
<where>
<if
test=
"areaCode != null and areaCode != ''"
>
<if
test=
"areaCode != null and areaCode != ''"
>
ARAE
= #{areaCode}
ARAE
like concat('%', #{areaCode}, '%')
</if>
</if>
</where>
</where>
GROUP BY
GROUP BY
...
@@ -293,7 +293,7 @@
...
@@ -293,7 +293,7 @@
idx_biz_fan_warning_record
idx_biz_fan_warning_record
<where>
<where>
<if
test=
"areaCode != null and areaCode != ''"
>
<if
test=
"areaCode != null and areaCode != ''"
>
ARAE
= #{areaCode}
ARAE
like concat('%', #{areaCode}, '%')
</if>
</if>
</where>
</where>
GROUP BY
GROUP BY
...
@@ -411,4 +411,135 @@
...
@@ -411,4 +411,135 @@
GROUP BY
GROUP BY
POINT_NAME
POINT_NAME
</select>
</select>
<select
id=
"getPvInfoByPage"
resultType=
"java.util.Map"
>
SELECT
SUBARRAY as subarray
FROM
idx_biz_pv_point_process_variable_classification
<where>
<if
test=
"gatewayId != null and gatewayId != ''"
>
GATEWAY_ID = #{gatewayId}
</if>
</where>
GROUP BY
SUBARRAY
</select>
<select
id=
"getPvHealthInfoList"
resultType=
"java.util.Map"
>
SELECT
IFNULL( round(AVG( HEALTH_INDEX ), 2), 0 ) AS avgHealthIndex,
SUBARRAY as subarray
FROM
idx_biz_pv_health_index
<where>
STATION IS NOT NULL
AND STATION != ''
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_FORMAT( NOW(), "%Y-%m-%d" )
<if
test=
"gatewayId != null and gatewayId != ''"
>
AND GATEWAY_ID = #{gatewayId}
</if>
</where>
GROUP BY SUBARRAY
order by SUBARRAY
</select>
<select
id=
"getPvSubSystemInfo"
resultType=
"java.util.Map"
>
SELECT
IFNULL( AVG( HEALTH_INDEX ), 0 ) AS avgHealthIndex,
EQUIPMENT_NAME AS equipmentName
FROM
idx_biz_pv_health_index
<where>
STATION IS NOT NULL
AND STATION != ''
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = CURRENT_DATE
<if
test=
"subarray != null and subarray != ''"
>
AND SUBARRAY = #{subarray}
</if>
<if
test=
"gatewayId != null and gatewayId != ''"
>
AND GATEWAY_ID = #{gatewayId}
</if>
</where>
group by EQUIPMENT_NAME
</select>
<select
id=
"getPvSumSystemListByEquipment"
resultType=
"java.util.Map"
>
SELECT
EQUIPMENT_NAME as equipmentName
FROM
idx_biz_pv_point_process_variable_classification
<where>
SUBARRAY = #{subarray}
AND GATEWAY_ID = #{gatewayId}
</where>
GROUP BY
EQUIPMENT_NAME
</select>
<select
id=
"getPvHealthInfoBySubSystem"
resultType=
"java.util.Map"
>
SELECT
IFNULL( ROUND(avg( HEALTH_INDEX ), 2), 0 ) AS healthIndex,
POINT_NAME AS pointName
FROM
idx_biz_pv_health_index
<where>
STATION IS NOT NULL
AND STATION != ''
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 != ''"
>
AND EQUIPMENT_NAME = #{equipmentName}
</if>
<if
test=
"gatewayId != null and gatewayId != ''"
>
AND GATEWAY_ID = #{gatewayId}
</if>
</where>
GROUP BY
POINT_NAME
</select>
<select
id=
"getPvPointNameListBySumSystem"
resultType=
"java.util.Map"
>
SELECT
POINT_NAME as pointName
FROM
idx_biz_pv_point_process_variable_classification
<where>
EQUIPMENT_NAME = #{equipmentName}
AND GATEWAY_ID = #{gatewayId}
</where>
GROUP BY
POINT_NAME
</select>
</mapper>
</mapper>
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanWarningRecordMapper.xml
View file @
44ca9a8b
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
) a
) a
<where>
<where>
<if
test=
"arae != '' and arae != null"
>
<if
test=
"arae != '' and arae != null"
>
AND a.arae
= #{arae}
AND a.arae
like concat('%', #{areaCode}, '%')
</if>
</if>
<if
test=
"station != '' and station != null"
>
<if
test=
"station != '' and station != null"
>
AND a.station = #{station}
AND a.station = #{station}
...
...
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