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
c8b4e391
Commit
c8b4e391
authored
Oct 19, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预警监测 测点级列表接口
parent
0dcf6e96
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
94 additions
and
30 deletions
+94
-30
IdxBizPvHealthIndexController.java
...e/jxiop/biz/controller/IdxBizPvHealthIndexController.java
+7
-0
IdxBizPvHealthIndexDto.java
...mos/boot/module/jxiop/biz/dto/IdxBizPvHealthIndexDto.java
+4
-2
IdxBizPvHealthIndexMapper.java
...t/module/jxiop/biz/mapper2/IdxBizPvHealthIndexMapper.java
+2
-0
IdxBizPvHealthIndexServiceImpl.java
...xiop/biz/service/impl/IdxBizPvHealthIndexServiceImpl.java
+9
-6
IdxBizPvHealthIndexMapper.xml
...in/resources/mapper/cluster/IdxBizPvHealthIndexMapper.xml
+72
-22
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizPvHealthIndexController.java
View file @
c8b4e391
...
...
@@ -119,4 +119,11 @@ public class IdxBizPvHealthIndexController extends BaseController {
public
ResponseModel
<
List
<
IdxBizPvHealthIndexDto
>>
queryForLeftTableListByEquip
(
@RequestParam
(
required
=
false
)
String
STATION
,
@RequestParam
(
required
=
false
)
String
SUBARRAY
,
@RequestParam
(
required
=
false
)
String
HEALTHLEVEL
)
{
return
ResponseHelper
.
buildResponse
(
idxBizPvHealthIndexServiceImpl
.
queryForLeftTableListByEquip
(
STATION
,
SUBARRAY
,
HEALTHLEVEL
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"预警监测测点级左侧列表"
,
notes
=
"预警监测设备级左侧列表"
)
@GetMapping
(
value
=
"/queryForLeftTableListByPoint"
)
public
ResponseModel
<
List
<
IdxBizPvHealthIndexDto
>>
queryForLeftTableListByPoint
(
@RequestParam
(
required
=
false
)
String
STATION
,
@RequestParam
(
required
=
false
)
String
SUBARRAY
,
@RequestParam
(
required
=
false
)
String
HEALTHLEVEL
,
@RequestParam
(
required
=
false
)
String
EQUIPMENTNAME
,
@RequestParam
(
required
=
false
)
String
POINTNAME
)
{
return
ResponseHelper
.
buildResponse
(
idxBizPvHealthIndexServiceImpl
.
queryForLeftTableListByPoint
(
STATION
,
SUBARRAY
,
HEALTHLEVEL
,
EQUIPMENTNAME
,
POINTNAME
));
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/IdxBizPvHealthIndexDto.java
View file @
c8b4e391
...
...
@@ -49,7 +49,7 @@ public class IdxBizPvHealthIndexDto {
@ApiModelProperty
(
value
=
"分析维度seq"
)
@TableField
(
"ANALYSIS_OBJ_SEQ"
)
private
Integer
analysisObjSeq
;
private
String
analysisObjSeq
;
@TableField
(
"WEIGTH"
)
private
Double
weigth
;
...
...
@@ -93,7 +93,7 @@ public class IdxBizPvHealthIndexDto {
@ApiModelProperty
(
value
=
"网关ID"
)
@TableField
(
"GATEWAY_ID"
)
private
Integer
gatewayId
;
private
String
gatewayId
;
@ApiModelProperty
(
value
=
"点表地址"
)
@TableField
(
"INDEX_ADDRESS"
)
...
...
@@ -115,4 +115,6 @@ public class IdxBizPvHealthIndexDto {
@TableField
(
"ANALYSIS_TIME"
)
private
String
ANALYSISTIME
;
private
String
value
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/IdxBizPvHealthIndexMapper.java
View file @
c8b4e391
...
...
@@ -15,4 +15,6 @@ import java.util.List;
public
interface
IdxBizPvHealthIndexMapper
extends
BaseMapper
<
IdxBizPvHealthIndex
>
{
List
<
IdxBizPvHealthIndexDto
>
queryForLeftTableListByEquip
(
String
STATION
,
String
SUBARRAY
,
String
HEALTHLEVEL
);
List
<
IdxBizPvHealthIndexDto
>
queryForLeftTableListByPoint
(
String
STATION
,
String
SUBARRAY
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
,
String
POINTNAME
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/IdxBizPvHealthIndexServiceImpl.java
View file @
c8b4e391
...
...
@@ -21,23 +21,25 @@ public class IdxBizPvHealthIndexServiceImpl extends BaseService<IdxBizPvHealthIn
/**
* 分页查询
*/
public
Page
<
IdxBizPvHealthIndexDto
>
queryForIdxBizPvHealthIndexPage
(
Page
<
IdxBizPvHealthIndexDto
>
page
)
{
public
Page
<
IdxBizPvHealthIndexDto
>
queryForIdxBizPvHealthIndexPage
(
Page
<
IdxBizPvHealthIndexDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
/**
* 列表查询 示例
*/
public
List
<
IdxBizPvHealthIndexDto
>
queryForIdxBizPvHealthIndexList
()
{
return
this
.
queryForList
(
""
,
false
);
public
List
<
IdxBizPvHealthIndexDto
>
queryForIdxBizPvHealthIndexList
()
{
return
this
.
queryForList
(
""
,
false
);
}
public
List
<
IdxBizPvHealthIndexDto
>
queryForLeftTableListByEquip
(
String
STATION
,
String
SUBARRAY
,
String
HEALTHLEVEL
)
{
return
this
.
getBaseMapper
().
queryForLeftTableListByEquip
(
STATION
,
SUBARRAY
,
HEALTHLEVEL
);
public
List
<
IdxBizPvHealthIndexDto
>
queryForLeftTableListByEquip
(
String
STATION
,
String
SUBARRAY
,
String
HEALTHLEVEL
)
{
return
this
.
getBaseMapper
().
queryForLeftTableListByEquip
(
STATION
,
SUBARRAY
,
HEALTHLEVEL
);
}
public
List
<
IdxBizPvHealthIndexDto
>
queryForLeftTableListByPoint
(
String
STATION
,
String
SUBARRAY
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
,
String
POINTNAME
)
{
return
this
.
getBaseMapper
().
queryForLeftTableListByPoint
(
STATION
,
SUBARRAY
,
HEALTHLEVEL
,
EQUIPMENTNAME
,
POINTNAME
);
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizPvHealthIndexMapper.xml
View file @
c8b4e391
...
...
@@ -2,34 +2,84 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvHealthIndexMapper"
>
<select
id=
"queryForLeftTableListByEquip"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvHealthIndexDto"
>
<select
id=
"queryForLeftTableListByEquip"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvHealthIndexDto"
>
SELECT
b.SEQUENCE_NBR,
b.ARAE,
b.STATION,
b.EQUIPMENT_NAME,
b.HEALTH_INDEX,
b.HEALTH_LEVEL,
CONCAT( '子阵 ', b.SUBARRAY ) AS 子阵,
( CASE b.HEALTH_LEVEL WHEN '危险' THEN 3 WHEN '告警' THEN 2 WHEN '注意' THEN 1 ELSE 0 END ) AS STATUS,
b.REC_DATE,
b.SUBARRAY
b.SEQUENCE_NBR,
b.ARAE,
b.STATION,
b.EQUIPMENT_NAME,
b.HEALTH_INDEX,
b.HEALTH_LEVEL,
CONCAT( '子阵 ', b.SUBARRAY ) AS 子阵,
( CASE b.HEALTH_LEVEL WHEN '危险' THEN 3 WHEN '告警' THEN 2 WHEN '注意' THEN 1 ELSE 0 END ) AS STATUS,
b.REC_DATE,
b.SUBARRAY
FROM
`idx_biz_pv_health_index` b
`idx_biz_pv_health_index` b
WHERE
DATE_FORMAT(b.REC_DATE,"%Y-%m-%d") = DATE_FORMAT(NOW(),"%Y-%m-%d") AND b.ANALYSIS_OBJ_TYPE = '设备' AND b.ANALYSIS_TYPE = '按天'
<if
test=
"SUBARRAY != '' and SUBARRAY != null"
>
AND b.SUBARRAY = #{SUBARRAY}
DATE_FORMAT(b.REC_DATE,"%Y-%m-%d") = DATE_FORMAT(NOW(),"%Y-%m-%d") AND b.ANALYSIS_OBJ_TYPE = '设备' AND
b.ANALYSIS_TYPE = '按天'
<if
test=
"SUBARRAY != '' and SUBARRAY != null"
>
AND b.SUBARRAY = #{SUBARRAY}
</if>
<if
test=
"STATION != '' and STATION != null"
>
AND b.STATION = #{STATION}
</if>
<if
test=
"STATION != '' and STATION != null"
>
AND b.STATION = #{STATION}
</if>
<if
test=
"HEALTHLEVEL != '' and HEALTHLEVEL != null"
>
AND b.HEALTH_LEVEL = #{HEALTHLEVEL}
</if>
</if>
<if
test=
"HEALTHLEVEL != '' and HEALTHLEVEL != null"
>
AND b.HEALTH_LEVEL = #{HEALTHLEVEL}
</if>
</select>
<select
id=
"queryForLeftTableListByPoint"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvHealthIndexDto"
>
SELECT
b.*
FROM
(
SELECT
POINT_NAME ,
STATION,
HEALTH_INDEX,
HEALTH_INDEX as value,
HEALTH_LEVEL,
SUBARRAY,
REC_DATE,
EQUIPMENT_NAME,
INDEX_ADDRESS,
ANALYSIS_OBJ_SEQ,
ANALYSIS_TYPE
FROM
`idx_biz_pv_health_index`
WHERE
ANALYSIS_OBJ_TYPE = '测点'
AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 1 HOUR ) )
OR ( REC_DATE >= CURRENT_DATE ( ) AND ANALYSIS_TYPE = '按天' )
OR ( ANALYSIS_TYPE = '按时刻' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 10 MINUTE ) )
) b
INNER JOIN idx_biz_pv_warning_rule_set rule ON rule.ANALYSIS_POINT_ID = b.ANALYSIS_OBJ_SEQ
AND rule.WARNING_NAME = '注意'
AND rule.ANALYSIS_TYPE = b.ANALYSIS_TYPE
<where>
<if
test=
"STATION != null and STATION != '' "
>
b.STATION = #{STATION}
</if>
<if
test=
"EQUIPMENTNAME != null and EQUIPMENTNAME != '' "
>
AND b.EQUIPMENT_NAME = #{EQUIPMENTNAME}
</if>
<if
test=
"SUBARRAY != null and SUBARRAY != '' "
>
AND b.SUBARRAY = #{SUBARRAY}
</if>
<if
test=
"HEALTHLEVEL != null and HEALTHLEVEL != '' "
>
AND b.HEALTH_LEVEL = #{HEALTHLEVEL}
</if>
<if
test=
"POINTNAME != null and POINTNAME != '' "
>
AND b.POINT_NAME = #{POINTNAME}
</if>
</where>
</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