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
6c83d6c5
Commit
6c83d6c5
authored
Oct 25, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改
parent
0850b797
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
0 deletions
+59
-0
IdxBizFanHealthIndexController.java
.../jxiop/biz/controller/IdxBizFanHealthIndexController.java
+27
-0
IdxBizFanHealthIndexMapper.java
.../module/jxiop/biz/mapper2/IdxBizFanHealthIndexMapper.java
+1
-0
IdxBizFanHealthIndexServiceImpl.java
...iop/biz/service/impl/IdxBizFanHealthIndexServiceImpl.java
+4
-0
IdxBizFanHealthIndexMapper.xml
...n/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
+27
-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/IdxBizFanHealthIndexController.java
View file @
6c83d6c5
...
...
@@ -299,4 +299,31 @@ public class IdxBizFanHealthIndexController extends BaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询光伏场站所有设备状态统计"
,
notes
=
"查询光伏场站所有设备状态统计"
)
@GetMapping
(
value
=
"/getPvEquipStatusByStation"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getPvEquipStatusByStation
(
String
STATION
)
{
Map
<
String
,
Object
>
map
=
idxBizFanHealthIndexServiceImpl
.
getPvEquipStatusByStation
(
STATION
);
List
<
Map
<
String
,
Object
>>
maps
=
new
ArrayList
<>();
Map
<
String
,
Object
>
anquan
=
new
HashMap
<>();
anquan
.
put
(
"name"
,
"安全"
);
anquan
.
put
(
"value"
,
map
.
get
(
"安全"
));
maps
.
add
(
anquan
);
Map
<
String
,
Object
>
zhuyi
=
new
HashMap
<>();
zhuyi
.
put
(
"name"
,
"注意"
);
zhuyi
.
put
(
"value"
,
map
.
get
(
"注意"
));
maps
.
add
(
zhuyi
);
Map
<
String
,
Object
>
jinggao
=
new
HashMap
<>();
jinggao
.
put
(
"name"
,
"警告"
);
jinggao
.
put
(
"value"
,
map
.
get
(
"警告"
));
maps
.
add
(
jinggao
);
Map
<
String
,
Object
>
weixian
=
new
HashMap
<>();
weixian
.
put
(
"name"
,
"危险"
);
weixian
.
put
(
"value"
,
map
.
get
(
"危险"
));
maps
.
add
(
weixian
);
return
ResponseHelper
.
buildResponse
(
maps
);
}
}
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 @
6c83d6c5
...
...
@@ -121,4 +121,5 @@ public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIn
List
<
IdxBizFanWarningRecord
>
warningData
(
String
STATION
,
String
SUBARRAY
,
String
EQUIPMENTNAME
);
Integer
pointNum
(
String
STATION
,
String
SUBARRAY
,
String
EQUIPMENTNAME
);
Map
<
String
,
Object
>
getPvEquipStatusByStation
(
String
station
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/IdxBizFanHealthIndexServiceImpl.java
View file @
6c83d6c5
...
...
@@ -190,6 +190,10 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
return
this
.
getBaseMapper
().
getFanEquipStatusByStation
(
STATION
);
}
public
Map
<
String
,
Object
>
getPvEquipStatusByStation
(
String
STATION
){
return
this
.
getBaseMapper
().
getPvEquipStatusByStation
(
STATION
);
}
public
int
queryForLeftTableListByPointCount
(
String
STATION
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
,
String
POINTNAME
){
return
this
.
getBaseMapper
().
queryForLeftTableListByPointCount
(
STATION
,
HEALTHLEVEL
,
EQUIPMENTNAME
,
POINTNAME
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
View file @
6c83d6c5
...
...
@@ -1200,4 +1200,31 @@
) a
</select>
<select
id=
"getPvEquipStatusByStation"
resultType=
"java.util.Map"
>
SELECT
max( CASE WHEN a.HEALTH_LEVEL = '安全' THEN num ELSE 0 END ) AS 安全,
max( CASE WHEN a.HEALTH_LEVEL = '注意' THEN num ELSE 0 END ) AS 注意,
max( CASE WHEN a.HEALTH_LEVEL = '警告' THEN num ELSE 0 END ) AS 警告,
max( CASE WHEN a.HEALTH_LEVEL = '危险' THEN num ELSE 0 END ) AS 危险
FROM
(
SELECT
STATION,
HEALTH_LEVEL,
count( 1 ) AS num
FROM
idx_biz_pv_health_index
WHERE
ANALYSIS_TYPE = '按天'
AND ANALYSIS_OBJ_TYPE = '设备'
AND REC_DATE >= CURRENT_DATE ( )
<if
test=
"STATION != null and STATION != ''"
>
AND STATION = #{STATION}
</if>
GROUP BY
STATION,
HEALTH_LEVEL
) a
</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