Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
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
station
YeeAmosFireAutoSysRoot
Commits
fa4e9e03
Commit
fa4e9e03
authored
Jun 10, 2020
by
maoying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复监控屏风险点,巡检点个数及详情接口
parent
e6e1c7da
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
49 deletions
+48
-49
dbTemplate_fmea_equipment_point.xml
...n/resources/db/mapper/dbTemplate_fmea_equipment_point.xml
+2
-0
dbTemplate_view3d.xml
...sStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
+46
-49
No files found.
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fmea_equipment_point.xml
View file @
fa4e9e03
...
...
@@ -124,7 +124,9 @@
) isBound
from
f_fire_equipment_point as a
left join f_dict fd on fd.id = a.alarm_type
<where>
fd.dict_value = 'alarm_type_trouble'
<if
test=
"equipmentId!=null"
>
and a.fire_equipment_id = #{equipmentId}
</if>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
View file @
fa4e9e03
...
...
@@ -367,13 +367,12 @@
<select
id=
"countUpperRiskPoint"
resultType=
"long"
>
SELECT
count(DISTINCT frcl.id)
count(DISTINCT frcl.
risk_source_
id)
FROM
(
SELECT
a.id,
a.risk_source_id,
date_format(a.create_date, '%Y-%m-%d') AS create_date
a.risk_source_id
FROM
`f_rpn_change_log` a,
`f_risk_source` b
...
...
@@ -381,25 +380,21 @@
a.type = #{type}
and a.risk_source_id = b.id
and b.org_code = #{orgCode}
and date_format(a.create_date, '%Y-%m-%d') = #{date}
) as frcl
WHERE
frcl.create_date = #{date}
</select>
<select
id=
"countCheckException"
resultType=
"long"
>
select count(distinct pt.point_id) from
(
SELECT
a.id,
DATE_FORMAT(b.begin_time,'%Y-%m-%d') as begin_date,
DATE_FORMAT(b.end_time,'%Y-%m-%d') as end_date,
a.point_id
FROM `p_plan_task_detail` a , p_plan_task b
where
a.task_no = b.id
and a.`status` in ('2','3')
and (b.org_code = #{orgCode} OR b.org_code like CONCAT(#{orgCode},'-%'))
) pt
where #{date} BETWEEN pt.begin_date and pt.end_date
SELECT
count(distinct pc.point_id)
FROM
p_check pc
WHERE
DATE_FORMAT(pc.check_time, '%Y-%m-%d') = #{date}
AND (
pc.org_code = #{orgCode}
OR pc.org_code LIKE CONCAT(#{orgCode}, '-%')
)
AND pc.`is_ok` = '2'
</select>
<select
id=
"countFireException"
resultType=
"long"
>
...
...
@@ -416,41 +411,43 @@
<select
id=
"getAllErrorRiskPoint"
resultType=
"com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo"
>
SELECT
b.id,
a.`name`,
a.risk_level_id as riskLevelId,
b.create_date as changeDate
FROM
f_risk_source a,
(SELECT a.id,a.type,a.risk_source_id,max(a.create_date) as create_date FROM `f_rpn_change_log` a GROUP BY a.risk_source_id) as b
WHERE
b.risk_source_id = a.id
AND b.type = '0'
and a.org_code = #{orgCode}
and DATE_FORMAT(b.create_date,'%Y-%m-%d') = #{date}
rcl.id,
rcl.create_date AS changeDate,
rs.risk_level_id AS riskLevelId,
rs.`name`
FROM
(
SELECT DISTINCT
risk_source_id,
MAX(create_date) create_date,
MAX(id) id
FROM
f_rpn_change_log
WHERE
type = '0'
AND DATE_FORMAT(create_date, '%Y-%m-%d') = #{date}
) rcl
LEFT JOIN f_risk_source rs ON rs.id = rcl.risk_source_id
WHERE
rs.org_code = #{orgCode}
</select>
<select
id=
"getAllErrorPatrolPoint"
resultType=
"com.yeejoin.amos.fas.business.bo.CheckErrorBo"
>
SELECT
pc.
id,
b.`name`
,
pc.`is_ok` as status,
pc.check_time
as changeDate
pc.point_id
id,
pc.point_name 'name'
,
pc.`is_ok` as status,
max(pc.check_time)
as changeDate
FROM
(select
a.id,
a.point_id,
a.`is_ok`,
max(a.check_time) as check_time
FROM
p_check a
where DATE_FORMAT(a.check_time,'%Y-%m-%d') = #{date}
and a.`is_ok` IN ('2', '3')
GROUP BY a.point_id) as pc,
p_point b
p_check pc
WHERE
pc.point_id = b.id
and b.is_delete = false
and b.org_code = #{orgCode}
DATE_FORMAT(pc.check_time, '%Y-%m-%d') = #{date}
AND (
pc.org_code = #{orgCode}
OR pc.org_code LIKE CONCAT(#{orgCode}, '-%')
)
AND pc.`is_ok` = '2'
GROUP BY pc.point_id,pc.`is_ok`,pc.point_name
</select>
<select
id=
"getAllFaultAlarm"
resultType=
"com.yeejoin.amos.fas.business.bo.CheckErrorBo"
>
...
...
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