Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety-progress
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
耿迪迪
gassafety-progress
Commits
5f3f3579
Commit
5f3f3579
authored
Mar 07, 2022
by
王晓倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
大屏预警信息接口及后台预警信息列表调整
parent
2cf2edc2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
103 additions
and
12 deletions
+103
-12
TDetectorReportDataMapper.xml
...ain/resources/mapper/system/TDetectorReportDataMapper.xml
+84
-2
index.vue
...b/src/views/operationMonitor/detectorReportData/index.vue
+19
-10
No files found.
gassafetyprogress-system/src/main/resources/mapper/system/TDetectorReportDataMapper.xml
View file @
5f3f3579
...
...
@@ -25,6 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select
id=
"selectTDetectorReportDataList"
parameterType=
"TDetectorReportDataForm"
resultType=
"TDetectorAlarmInfoVO"
>
select * from(
select rd.id,
rd.cancel_time cancelTime,
rd.detector_code detectorCode,
...
...
@@ -45,7 +46,52 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"cancelTimeStart != null "
>
and rd.cancel_time
>
= #{cancelTimeStart}
</if>
<if
test=
"cancelTimeEnd != null "
>
and rd.cancel_time
<
= #{cancelTimeEnd}
</if>
</where>
ORDER BY rd.create_time desc
union
SELECT rd.id,
rd.cancel_time cancelTime,
rd.detector_code detectorCode,
CONCAT_WS("#",ti.device_name,ti.linkman) unitName,
di.detector_type detectorType,
rd.status_name statusName,
rd.create_time alarmTime,
rd.is_cancel_alarm handledStatus
FROM t_detector_report_data rd
LEFT JOIN t_detector_info di ON rd.detector_code = di.detector_code
LEFT JOIN t_relation_device_detail_info ri ON rd.detector_code = ri.iot_no
LEFT JOIN t_device_info ti ON ri.relation_device_id = ti.device_id
<where>
ri.relation_device_type = '1' and ri.is_del = '0' and ti.is_del = '0'
<if
test=
"detectorCode != null and detectorCode != ''"
>
and rd.detector_code = #{detectorCode}
</if>
<if
test=
"statusName != null and statusName != ''"
>
and rd.status_name = #{statusName}
</if>
<if
test=
"createTimeStart != null "
>
and rd.create_time
>
= #{createTimeStart}
</if>
<if
test=
"createTimeEnd != null "
>
and rd.create_time
<
= #{createTimeEnd}
</if>
<if
test=
"isCancelAlarm != null and isCancelAlarm != ''"
>
and is_cancel_alarm = #{isCancelAlarm}
</if>
<if
test=
"cancelTimeStart != null "
>
and rd.cancel_time
>
= #{cancelTimeStart}
</if>
<if
test=
"cancelTimeEnd != null "
>
and rd.cancel_time
<
= #{cancelTimeEnd}
</if>
</where>
union
SELECT rd.id,
rd.cancel_time cancelTime,
rd.detector_code detectorCode,
CONCAT_WS("#",si.site_station_name,si.build_unit) unitName,
di.detector_type detectorType,
rd.status_name statusName,
rd.create_time alarmTime,
rd.is_cancel_alarm handledStatus
FROM t_detector_report_data rd
LEFT JOIN t_detector_info di ON rd.detector_code = di.detector_code
LEFT JOIN t_relation_device_detail_info ti ON rd.detector_code = ti.iot_no
LEFT JOIN t_site_station_info si ON ti.relation_device_id = si.site_station_id
<where>
ti.relation_device_type = '2' and ti.is_del = '0' and si.is_del = '0'
<if
test=
"detectorCode != null and detectorCode != ''"
>
and rd.detector_code = #{detectorCode}
</if>
<if
test=
"statusName != null and statusName != ''"
>
and rd.status_name = #{statusName}
</if>
<if
test=
"createTimeStart != null "
>
and rd.create_time
>
= #{createTimeStart}
</if>
<if
test=
"createTimeEnd != null "
>
and rd.create_time
<
= #{createTimeEnd}
</if>
<if
test=
"isCancelAlarm != null and isCancelAlarm != ''"
>
and is_cancel_alarm = #{isCancelAlarm}
</if>
<if
test=
"cancelTimeStart != null "
>
and rd.cancel_time
>
= #{cancelTimeStart}
</if>
<if
test=
"cancelTimeEnd != null "
>
and rd.cancel_time
<
= #{cancelTimeEnd}
</if>
</where>
)t
ORDER BY t.alarmTime DESC
</select>
<select
id=
"selectTDetectorReportDataById"
parameterType=
"Long"
resultMap=
"TDetectorReportDataResult"
>
...
...
@@ -61,6 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select
id=
"selectTDetectorAlarm"
resultType=
"TDetectorAlarmInfoVO"
>
select * from(
SELECT
rd.detector_code detectorCode,
CONCAT_WS("#",IFNULL(u.nick_name,IFNULL(di.linkman,di.detector_addr)),di.linkman) unitName,
...
...
@@ -76,7 +123,42 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN t_detector_info di ON rd.detector_code = di.detector_code
LEFT JOIN t_detector_user u ON u.user_id = di.user_id
WHERE u.is_del = '0' and di.is_del = '0' and rd.is_cancel_alarm = '0'
ORDER BY rd.create_time DESC LIMIT 50
union
SELECT
rd.detector_code detectorCode,
CONCAT_WS("#",ti.device_name,ti.linkman) unitName,
di.detector_type detectorType,
rd.status_name statusName,
rd.create_time alarmTime,
IF (
rd.is_cancel_alarm = 0,
'未消除',
'已消除'
) handledStatus
FROM t_detector_report_data rd
LEFT JOIN t_detector_info di ON rd.detector_code = di.detector_code
LEFT JOIN t_relation_device_detail_info ri ON rd.detector_code = ri.iot_no
LEFT JOIN t_device_info ti ON ri.relation_device_id = ti.device_id
WHERE ri.relation_device_type = '1' and ri.is_del = '0' and ti.is_del = '0' and rd.is_cancel_alarm = '0'
union
SELECT
rd.detector_code detectorCode,
CONCAT_WS("#",si.site_station_name,si.build_unit) unitName,
di.detector_type detectorType,
rd.status_name statusName,
rd.create_time alarmTime,
IF (
rd.is_cancel_alarm = 0,
'未消除',
'已消除'
) handledStatus
FROM t_detector_report_data rd
LEFT JOIN t_detector_info di ON rd.detector_code = di.detector_code
LEFT JOIN t_relation_device_detail_info ti ON rd.detector_code = ti.iot_no
LEFT JOIN t_site_station_info si ON ti.relation_device_id = si.site_station_id
WHERE ti.relation_device_type = '2' and ti.is_del = '0' and si.is_del = '0' and rd.is_cancel_alarm = '0'
)t
ORDER BY t.alarmTime DESC LIMIT 50
</select>
...
...
gassafetyprogress-web/src/views/operationMonitor/detectorReportData/index.vue
View file @
5f3f3579
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"query
Form
"
:inline=
"true"
v-show=
"showSearch"
label-width=
"80px"
>
<el-form
:model=
"queryParams"
ref=
"query
Params
"
:inline=
"true"
v-show=
"showSearch"
label-width=
"80px"
>
<el-form-item
label=
"设备编号"
prop=
"detectorCode"
>
<el-input
v-model=
"queryParams.detectorCode"
...
...
@@ -67,15 +67,15 @@
<span>
{{
scope
.
row
.
cancelTime
}}
</span>
</
template
>
</el-table-column>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</div>
</template>
...
...
@@ -134,7 +134,16 @@ export default {
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
queryParams
=
{
pageNum
:
1
,
pageSize
:
10
,
detectorCode
:
null
,
statusName
:
null
,
isCancelAlarm
:
null
,
createTimeStart
:
null
,
createTimeEnd
:
null
}
this
.
resetForm
(
"queryParams"
);
this
.
handleQuery
();
},
}
...
...
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