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
ec5b5351
Commit
ec5b5351
authored
Oct 19, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加仪表盘接口
parent
eb5fd7b0
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
103 additions
and
0 deletions
+103
-0
IdxBizPvHealthIndexController.java
...e/jxiop/biz/controller/IdxBizPvHealthIndexController.java
+18
-0
IdxBizPvHealthIndexMapper.java
...t/module/jxiop/biz/mapper2/IdxBizPvHealthIndexMapper.java
+4
-0
IdxBizPvHealthIndexServiceImpl.java
...xiop/biz/service/impl/IdxBizPvHealthIndexServiceImpl.java
+9
-0
IdxBizPvHealthIndexMapper.xml
...in/resources/mapper/cluster/IdxBizPvHealthIndexMapper.xml
+72
-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/IdxBizPvHealthIndexController.java
View file @
ec5b5351
...
@@ -141,4 +141,22 @@ public class IdxBizPvHealthIndexController extends BaseController {
...
@@ -141,4 +141,22 @@ public class IdxBizPvHealthIndexController extends BaseController {
page
.
setRecords
(
idxBizPvHealthIndexServiceImpl
.
queryForLeftTableListByPoint
(
STATION
,
SUBARRAY
,
HEALTHLEVEL
,
EQUIPMENTNAME
,
POINTNAME
,(
current
-
1
)*
size
,
size
));
page
.
setRecords
(
idxBizPvHealthIndexServiceImpl
.
queryForLeftTableListByPoint
(
STATION
,
SUBARRAY
,
HEALTHLEVEL
,
EQUIPMENTNAME
,
POINTNAME
,(
current
-
1
)*
size
,
size
));
return
ResponseHelper
.
buildResponse
(
page
);
return
ResponseHelper
.
buildResponse
(
page
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"预警监测设备级仪表盘"
,
notes
=
"预警监测设备级仪表盘"
)
@GetMapping
(
value
=
"/queryForLeftTableListByEquipNum"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
queryForLeftTableListByEquipNum
(
@RequestParam
(
required
=
false
)
String
STATION
,
@RequestParam
(
required
=
false
)
String
SUBARRAY
,
@RequestParam
(
required
=
false
)
String
HEALTHLEVEL
,
@RequestParam
(
required
=
false
)
String
EQUIPMENTNAME
)
{
;
return
ResponseHelper
.
buildResponse
(
idxBizPvHealthIndexServiceImpl
.
queryForLeftTableListByEquipNum
(
STATION
,
SUBARRAY
,
HEALTHLEVEL
,
EQUIPMENTNAME
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"预警监测测点级仪表盘"
,
notes
=
"预警监测设备级仪表盘"
)
@GetMapping
(
value
=
"/queryForLeftTableListByPointNum"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
queryForLeftTableListByPointNum
(
@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
.
queryForLeftTableListByPointNum
(
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/mapper2/IdxBizPvHealthIndexMapper.java
View file @
ec5b5351
...
@@ -16,6 +16,10 @@ import java.util.Map;
...
@@ -16,6 +16,10 @@ import java.util.Map;
public
interface
IdxBizPvHealthIndexMapper
extends
BaseMapper
<
IdxBizPvHealthIndex
>
{
public
interface
IdxBizPvHealthIndexMapper
extends
BaseMapper
<
IdxBizPvHealthIndex
>
{
List
<
Map
<
String
,
Object
>>
queryForLeftTableListByEquip
(
String
STATION
,
String
SUBARRAY
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
,
Integer
current
,
Integer
size
);
List
<
Map
<
String
,
Object
>>
queryForLeftTableListByEquip
(
String
STATION
,
String
SUBARRAY
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
,
Integer
current
,
Integer
size
);
Map
<
String
,
Object
>
queryForLeftTableListByEquipNum
(
String
STATION
,
String
SUBARRAY
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
);
Map
<
String
,
Object
>
queryForLeftTableListByPointNum
(
String
STATION
,
String
SUBARRAY
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
,
String
POINTNAME
);
int
queryForLeftTableListByEquipCount
(
String
STATION
,
String
SUBARRAY
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
);
int
queryForLeftTableListByEquipCount
(
String
STATION
,
String
SUBARRAY
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
);
List
<
Map
<
String
,
Object
>>
queryForLeftTableListByPoint
(
String
STATION
,
String
SUBARRAY
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
,
String
POINTNAME
,
Integer
current
,
Integer
size
);
List
<
Map
<
String
,
Object
>>
queryForLeftTableListByPoint
(
String
STATION
,
String
SUBARRAY
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
,
String
POINTNAME
,
Integer
current
,
Integer
size
);
...
...
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 @
ec5b5351
...
@@ -37,6 +37,13 @@ public class IdxBizPvHealthIndexServiceImpl extends BaseService<IdxBizPvHealthIn
...
@@ -37,6 +37,13 @@ public class IdxBizPvHealthIndexServiceImpl extends BaseService<IdxBizPvHealthIn
public
List
<
Map
<
String
,
Object
>>
queryForLeftTableListByEquip
(
String
STATION
,
String
SUBARRAY
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
,
Integer
current
,
Integer
size
)
{
public
List
<
Map
<
String
,
Object
>>
queryForLeftTableListByEquip
(
String
STATION
,
String
SUBARRAY
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
,
Integer
current
,
Integer
size
)
{
return
this
.
getBaseMapper
().
queryForLeftTableListByEquip
(
STATION
,
SUBARRAY
,
HEALTHLEVEL
,
EQUIPMENTNAME
,
current
,
size
);
return
this
.
getBaseMapper
().
queryForLeftTableListByEquip
(
STATION
,
SUBARRAY
,
HEALTHLEVEL
,
EQUIPMENTNAME
,
current
,
size
);
}
}
public
Map
<
String
,
Object
>
queryForLeftTableListByEquipNum
(
String
STATION
,
String
SUBARRAY
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
)
{
return
this
.
getBaseMapper
().
queryForLeftTableListByEquipNum
(
STATION
,
SUBARRAY
,
HEALTHLEVEL
,
EQUIPMENTNAME
);
}
public
Map
<
String
,
Object
>
queryForLeftTableListByPointNum
(
String
STATION
,
String
SUBARRAY
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
,
String
POINTNAME
)
{
return
this
.
getBaseMapper
().
queryForLeftTableListByPointNum
(
STATION
,
SUBARRAY
,
HEALTHLEVEL
,
EQUIPMENTNAME
,
POINTNAME
);
}
public
List
<
Map
<
String
,
Object
>>
queryForLeftTableListByPoint
(
String
STATION
,
String
SUBARRAY
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
,
String
POINTNAME
,
Integer
current
,
Integer
size
)
{
public
List
<
Map
<
String
,
Object
>>
queryForLeftTableListByPoint
(
String
STATION
,
String
SUBARRAY
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
,
String
POINTNAME
,
Integer
current
,
Integer
size
)
{
return
this
.
getBaseMapper
().
queryForLeftTableListByPoint
(
STATION
,
SUBARRAY
,
HEALTHLEVEL
,
EQUIPMENTNAME
,
POINTNAME
,
current
,
size
);
return
this
.
getBaseMapper
().
queryForLeftTableListByPoint
(
STATION
,
SUBARRAY
,
HEALTHLEVEL
,
EQUIPMENTNAME
,
POINTNAME
,
current
,
size
);
...
@@ -50,4 +57,5 @@ public class IdxBizPvHealthIndexServiceImpl extends BaseService<IdxBizPvHealthIn
...
@@ -50,4 +57,5 @@ public class IdxBizPvHealthIndexServiceImpl extends BaseService<IdxBizPvHealthIn
return
this
.
getBaseMapper
().
queryForLeftTableListByEquipCount
(
STATION
,
SUBARRAY
,
HEALTHLEVEL
,
EQUIPMENTNAME
);
return
this
.
getBaseMapper
().
queryForLeftTableListByEquipCount
(
STATION
,
SUBARRAY
,
HEALTHLEVEL
,
EQUIPMENTNAME
);
}
}
}
}
\ 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 @
ec5b5351
...
@@ -36,6 +36,29 @@
...
@@ -36,6 +36,29 @@
limit ${current},${size}
limit ${current},${size}
</select>
</select>
<select
id=
"queryForLeftTableListByEquipNum"
resultType=
"map"
>
SELECT
b.HEALTH_INDEX as value
FROM
`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}
</if>
<if
test=
"STATION != '' and STATION != null"
>
AND b.STATION = #{STATION}
</if>
<if
test=
"EQUIPMENTNAME != '' and EQUIPMENTNAME != null"
>
AND b.EQUIPMENT_NAME = #{EQUIPMENTNAME}
</if>
<if
test=
"HEALTHLEVEL != '' and HEALTHLEVEL != null"
>
AND b.HEALTH_LEVEL = #{HEALTHLEVEL}
</if>
</select>
<select
id=
"queryForLeftTableListByEquipCount"
<select
id=
"queryForLeftTableListByEquipCount"
resultType=
"int"
>
resultType=
"int"
>
SELECT
SELECT
...
@@ -160,4 +183,53 @@
...
@@ -160,4 +183,53 @@
</where>
</where>
</select>
</select>
<select
id=
"queryForLeftTableListByPointNum"
resultType=
"map"
>
SELECT
HEALTH_INDEX as value
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>
</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