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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
45 deletions
+44
-45
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
+42
-45
No files found.
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fmea_equipment_point.xml
View file @
fa4e9e03
...
@@ -124,7 +124,9 @@
...
@@ -124,7 +124,9 @@
) isBound
) isBound
from
from
f_fire_equipment_point as a
f_fire_equipment_point as a
left join f_dict fd on fd.id = a.alarm_type
<where>
<where>
fd.dict_value = 'alarm_type_trouble'
<if
test=
"equipmentId!=null"
>
<if
test=
"equipmentId!=null"
>
and a.fire_equipment_id = #{equipmentId}
and a.fire_equipment_id = #{equipmentId}
</if>
</if>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
View file @
fa4e9e03
...
@@ -367,13 +367,12 @@
...
@@ -367,13 +367,12 @@
<select
id=
"countUpperRiskPoint"
resultType=
"long"
>
<select
id=
"countUpperRiskPoint"
resultType=
"long"
>
SELECT
SELECT
count(DISTINCT frcl.id)
count(DISTINCT frcl.
risk_source_
id)
FROM
FROM
(
(
SELECT
SELECT
a.id,
a.id,
a.risk_source_id,
a.risk_source_id
date_format(a.create_date, '%Y-%m-%d') AS create_date
FROM
FROM
`f_rpn_change_log` a,
`f_rpn_change_log` a,
`f_risk_source` b
`f_risk_source` b
...
@@ -381,25 +380,21 @@
...
@@ -381,25 +380,21 @@
a.type = #{type}
a.type = #{type}
and a.risk_source_id = b.id
and a.risk_source_id = b.id
and b.org_code = #{orgCode}
and b.org_code = #{orgCode}
and date_format(a.create_date, '%Y-%m-%d') = #{date}
) as frcl
) as frcl
WHERE
frcl.create_date = #{date}
</select>
</select>
<select
id=
"countCheckException"
resultType=
"long"
>
<select
id=
"countCheckException"
resultType=
"long"
>
select count(distinct pt.point_id) from
(
SELECT
SELECT
a.id,
count(distinct pc.point_id)
DATE_FORMAT(b.begin_time,'%Y-%m-%d') as begin_date,
FROM
DATE_FORMAT(b.end_time,'%Y-%m-%d') as end_date,
p_check pc
a.point_id
WHERE
FROM `p_plan_task_detail` a , p_plan_task b
DATE_FORMAT(pc.check_time, '%Y-%m-%d') = #{date}
where
AND (
a.task_no = b.id
pc.org_code = #{orgCode}
and a.`status` in ('2','3')
OR pc.org_code LIKE CONCAT(#{orgCode}, '-%')
and (b.org_code = #{orgCode} OR b.org_code like CONCAT(#{orgCode},'-%'))
)
) pt
AND pc.`is_ok` = '2'
where #{date} BETWEEN pt.begin_date and pt.end_date
</select>
</select>
<select
id=
"countFireException"
resultType=
"long"
>
<select
id=
"countFireException"
resultType=
"long"
>
...
@@ -416,41 +411,43 @@
...
@@ -416,41 +411,43 @@
<select
id=
"getAllErrorRiskPoint"
resultType=
"com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo"
>
<select
id=
"getAllErrorRiskPoint"
resultType=
"com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo"
>
SELECT
SELECT
b
.id,
rcl
.id,
a.`name`
,
rcl.create_date AS changeDate
,
a.risk_level_id as
riskLevelId,
rs.risk_level_id AS
riskLevelId,
b.create_date as changeDate
rs.`name`
FROM
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
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
WHERE
b.risk_source_id = a.id
rs.org_code = #{orgCode}
AND b.type = '0'
and a.org_code = #{orgCode}
and DATE_FORMAT(b.create_date,'%Y-%m-%d') = #{date}
</select>
</select>
<select
id=
"getAllErrorPatrolPoint"
resultType=
"com.yeejoin.amos.fas.business.bo.CheckErrorBo"
>
<select
id=
"getAllErrorPatrolPoint"
resultType=
"com.yeejoin.amos.fas.business.bo.CheckErrorBo"
>
SELECT
SELECT
pc.
id,
pc.point_id
id,
b.`name`
,
pc.point_name 'name'
,
pc.`is_ok` as status,
pc.`is_ok` as status,
pc.check_time as changeDate
max(pc.check_time) as changeDate
FROM
(select
a.id,
a.point_id,
a.`is_ok`,
max(a.check_time) as check_time
FROM
FROM
p_check a
p_check pc
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
WHERE
WHERE
pc.point_id = b.id
DATE_FORMAT(pc.check_time, '%Y-%m-%d') = #{date}
and b.is_delete = false
AND (
and b.org_code = #{orgCode}
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>
<select
id=
"getAllFaultAlarm"
resultType=
"com.yeejoin.amos.fas.business.bo.CheckErrorBo"
>
<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