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
3e87b410
Commit
3e87b410
authored
Jun 12, 2020
by
maoying
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_upgrade' of 172.16.10.76:station/YeeAmosFireAutoSysRoot into upgrade
parents
194d3ec1
84d80030
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
36 deletions
+40
-36
dbTemplate_risk_source.xml
...t/src/main/resources/db/mapper/dbTemplate_risk_source.xml
+2
-2
dbTemplate_view3d.xml
...sStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
+38
-34
No files found.
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_risk_source.xml
View file @
3e87b410
...
@@ -697,7 +697,7 @@
...
@@ -697,7 +697,7 @@
'riskSource' as type
'riskSource' as type
from f_risk_source rs
from f_risk_source rs
left join f_risk_level rl ON rs.risk_level_id = rl.id
left join f_risk_level rl ON rs.risk_level_id = rl.id
where is_region = 'TRUE' AND
rs.org_code = #{orgCode}
where is_region = 'TRUE' AND
(rs.org_code = #{orgCode} OR rs.org_code like CONCAT(#{orgCode},'-%'))
</select>
</select>
<select
id=
"findRegionById"
resultType=
"java.util.HashMap"
>
<select
id=
"findRegionById"
resultType=
"java.util.HashMap"
>
...
@@ -715,7 +715,7 @@
...
@@ -715,7 +715,7 @@
IF(is_region = 'TRUE',1,0) as isRegion,
IF(is_region = 'TRUE',1,0) as isRegion,
(select name from f_risk_level where level = r.risk_level_id) as riskLevel
(select name from f_risk_level where level = r.risk_level_id) as riskLevel
from f_risk_source r
from f_risk_source r
where id=#{id} AND
org_code = #{orgCode}
where id=#{id} AND
(org_code = #{orgCode} OR org_code like CONCAT(#{orgCode},'-%'))
</select>
</select>
<update
id=
"batchSaveRegionUe4"
parameterType=
"java.util.List"
>
<update
id=
"batchSaveRegionUe4"
parameterType=
"java.util.List"
>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
View file @
3e87b410
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
from f_risk_source R
from f_risk_source R
left join f_risk_level rl on rl.id = R.risk_level_id
left join f_risk_level rl on rl.id = R.risk_level_id
where 1=1
where 1=1
AND R.risk_level_id is not null
AND R.is_region = 'FALSE'
AND R.is_region = 'FALSE'
</when>
</when>
<when
test=
"type == 'patrol'"
>
<when
test=
"type == 'patrol'"
>
...
@@ -151,7 +152,7 @@
...
@@ -151,7 +152,7 @@
</when>
</when>
</choose>
</choose>
<if
test=
"orgCode != null"
>
<if
test=
"orgCode != null"
>
AND
R.org_code = #{orgCode}
AND
(R.org_code = #{orgCode} OR R.org_code like CONCAT(#{orgCode},'-%'))
</if>
</if>
</select>
</select>
...
@@ -171,7 +172,7 @@
...
@@ -171,7 +172,7 @@
AND rs.id = #{pointId}
AND rs.id = #{pointId}
</if>
</if>
<if
test=
"orgCode != null"
>
<if
test=
"orgCode != null"
>
AND
rs.org_code = #{orgCode}
AND
(rs.org_code = #{orgCode} OR rs.org_code like CONCAT(#{orgCode},'-%'))
</if>
</if>
</when>
</when>
<when
test=
"type == 'patrol'"
>
<when
test=
"type == 'patrol'"
>
...
@@ -203,7 +204,7 @@
...
@@ -203,7 +204,7 @@
AND id = #{pointId}
AND id = #{pointId}
</if>
</if>
<if
test=
"orgCode != null"
>
<if
test=
"orgCode != null"
>
AND
org_code = #{orgCode}
AND
(org_code = #{orgCode} OR org_code like CONCAT(#{orgCode},'-%'))
</if>
</if>
</when>
</when>
<when
test=
"type == 'impEquipment'"
>
<when
test=
"type == 'impEquipment'"
>
...
@@ -219,7 +220,7 @@
...
@@ -219,7 +220,7 @@
AND id = #{pointId}
AND id = #{pointId}
</if>
</if>
<if
test=
"orgCode != null"
>
<if
test=
"orgCode != null"
>
AND
org_code = #{orgCode}
AND
(org_code = #{orgCode} OR org_code like CONCAT(#{orgCode},'-%'))
</if>
</if>
</when>
</when>
<when
test=
"type == 'monitorEquipment'"
>
<when
test=
"type == 'monitorEquipment'"
>
...
@@ -235,7 +236,7 @@
...
@@ -235,7 +236,7 @@
AND id = #{pointId}
AND id = #{pointId}
</if>
</if>
<if
test=
"orgCode != null"
>
<if
test=
"orgCode != null"
>
AND
org_code = #{orgCode}
AND
(org_code = #{orgCode} OR org_code like CONCAT(#{orgCode},'-%'))
</if>
</if>
</when>
</when>
<when
test=
"type == 'video'"
>
<when
test=
"type == 'video'"
>
...
@@ -251,7 +252,7 @@
...
@@ -251,7 +252,7 @@
AND id = #{pointId}
AND id = #{pointId}
</if>
</if>
<if
test=
"orgCode != null"
>
<if
test=
"orgCode != null"
>
AND
org_code = #{orgCode}
AND
(org_code = #{orgCode} OR org_code like CONCAT(#{orgCode},'-%'))
</if>
</if>
</when>
</when>
<when
test=
"type == 'hydrant'"
>
<when
test=
"type == 'hydrant'"
>
...
@@ -267,7 +268,7 @@
...
@@ -267,7 +268,7 @@
AND id = #{pointId}
AND id = #{pointId}
</if>
</if>
<if
test=
"orgCode != null"
>
<if
test=
"orgCode != null"
>
AND
org_code = #{orgCode}
AND
(org_code = #{orgCode} OR org_code like CONCAT(#{orgCode},'-%'))
</if>
</if>
</when>
</when>
<when
test=
"type == 'pool'"
>
<when
test=
"type == 'pool'"
>
...
@@ -283,7 +284,7 @@
...
@@ -283,7 +284,7 @@
AND id = #{pointId}
AND id = #{pointId}
</if>
</if>
<if
test=
"orgCode != null"
>
<if
test=
"orgCode != null"
>
AND
org_code = #{orgCode}
AND
(org_code = #{orgCode} OR org_code like CONCAT(#{orgCode},'-%'))
</if>
</if>
</when>
</when>
<when
test=
"type == 'fireCar'"
>
<when
test=
"type == 'fireCar'"
>
...
@@ -299,7 +300,7 @@
...
@@ -299,7 +300,7 @@
AND id = #{pointId}
AND id = #{pointId}
</if>
</if>
<if
test=
"orgCode != null"
>
<if
test=
"orgCode != null"
>
AND
org_code = #{orgCode}
AND
(org_code = #{orgCode} OR org_code like CONCAT(#{orgCode},'-%'))
</if>
</if>
</when>
</when>
<when
test=
"type == 'fireEquipment'"
>
<when
test=
"type == 'fireEquipment'"
>
...
@@ -315,7 +316,7 @@
...
@@ -315,7 +316,7 @@
AND id = #{pointId}
AND id = #{pointId}
</if>
</if>
<if
test=
"orgCode != null"
>
<if
test=
"orgCode != null"
>
AND
org_code = #{orgCode}
AND
(org_code = #{orgCode} OR org_code like CONCAT(#{orgCode},'-%'))
</if>
</if>
</when>
</when>
<when
test=
"type == 'fireChamber'"
>
<when
test=
"type == 'fireChamber'"
>
...
@@ -331,7 +332,7 @@
...
@@ -331,7 +332,7 @@
AND id = #{pointId}
AND id = #{pointId}
</if>
</if>
<if
test=
"orgCode != null"
>
<if
test=
"orgCode != null"
>
AND
org_code = #{orgCode}
AND
(org_code = #{orgCode} OR org_code like CONCAT(#{orgCode},'-%'))
</if>
</if>
</when>
</when>
<when
test=
"type == 'fireFoamRoom'"
>
<when
test=
"type == 'fireFoamRoom'"
>
...
@@ -347,7 +348,7 @@
...
@@ -347,7 +348,7 @@
AND id = #{pointId}
AND id = #{pointId}
</if>
</if>
<if
test=
"orgCode != null"
>
<if
test=
"orgCode != null"
>
AND
org_code = #{orgCode}
AND
(org_code = #{orgCode} OR org_code like CONCAT(#{orgCode},'-%'))
</if>
</if>
</when>
</when>
</choose>
</choose>
...
@@ -361,7 +362,7 @@
...
@@ -361,7 +362,7 @@
FROM mysql.help_topic,(SELECT @s := 0) temp
FROM mysql.help_topic,(SELECT @s := 0) temp
WHERE @s < 7
WHERE @s < 7
) temp1
) temp1
left join f_safety_index_change_log S on s.collect_date = temp1.date AND
S.org_code = #{orgCode}
left join f_safety_index_change_log S on s.collect_date = temp1.date AND
(S.org_code = #{orgCode} OR S.org_code like CONCAT(#{orgCode},'-%'))
ORDER BY temp1.date
ORDER BY temp1.date
]]>
]]>
</select>
</select>
...
@@ -382,6 +383,7 @@
...
@@ -382,6 +383,7 @@
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}
and date_format(a.create_date, '%Y-%m-%d') = #{date}
and b.risk_level_id is not NULL
) as frcl
) as frcl
</select>
</select>
<select
id=
"countCheckException"
resultType=
"long"
>
<select
id=
"countCheckException"
resultType=
"long"
>
...
@@ -418,7 +420,7 @@
...
@@ -418,7 +420,7 @@
rs.`name`
rs.`name`
FROM
FROM
(
(
SELECT
DISTINCT
SELECT
risk_source_id,
risk_source_id,
MAX(create_date) create_date,
MAX(create_date) create_date,
MAX(id) id
MAX(id) id
...
@@ -427,10 +429,12 @@
...
@@ -427,10 +429,12 @@
WHERE
WHERE
type = '0'
type = '0'
AND DATE_FORMAT(create_date, '%Y-%m-%d') = #{date}
AND DATE_FORMAT(create_date, '%Y-%m-%d') = #{date}
group by risk_source_id
) rcl
) rcl
LEFT JOIN f_risk_source rs ON rs.id = rcl.risk_source_id
LEFT JOIN f_risk_source rs ON rs.id = rcl.risk_source_id
WHERE
WHERE rs.risk_level_id is not NULL
rs.org_code = #{orgCode}
AND (rs.org_code = #{orgCode} OR rs.org_code like CONCAT(#{orgCode},'-%'))
</select>
</select>
<select
id=
"getAllErrorPatrolPoint"
resultType=
"com.yeejoin.amos.fas.business.bo.CheckErrorBo"
>
<select
id=
"getAllErrorPatrolPoint"
resultType=
"com.yeejoin.amos.fas.business.bo.CheckErrorBo"
>
...
@@ -485,7 +489,7 @@
...
@@ -485,7 +489,7 @@
FROM f_rpn_change_log n
FROM f_rpn_change_log n
LEFT JOIN f_risk_source r ON r.id = n.risk_source_id
LEFT JOIN f_risk_source r ON r.id = n.risk_source_id
WHERE n.type = 1
WHERE n.type = 1
AND
r.org_code = #{org_code}
AND
(r.org_code = #{org_code} OR r.org_code like CONCAT(#{org_code},'-%'))
ORDER BY n.create_date desc
ORDER BY n.create_date desc
limit 0,5
limit 0,5
</select>
</select>
...
@@ -498,7 +502,7 @@
...
@@ -498,7 +502,7 @@
left join p_point I ON I.id = p.point_id
left join p_point I ON I.id = p.point_id
where p.is_ok IN ('2', '3')
where p.is_ok IN ('2', '3')
AND I.is_delete = 0
AND I.is_delete = 0
AND
p.org_code = #{orgCode}
AND
(p.org_code = #{orgCode} OR p.org_code like CONCAT(#{orgCode},'-%') )
ORDER BY p.check_time desc
ORDER BY p.check_time desc
limit 0,5
limit 0,5
</select>
</select>
...
@@ -513,8 +517,8 @@
...
@@ -513,8 +517,8 @@
FROM
FROM
f_alarm a
f_alarm a
WHERE
WHERE
a.org_code = #{orgCode}
a.`status` = TRUE
AND
a.`status` = TRUE
AND
(a.org_code = #{orgCode} OR a.org_code like CONCAT(#{orgCode},'-%'))
AND a.type = 'alarm_type_fire'
AND a.type = 'alarm_type_fire'
ORDER BY a.update_date DESC
ORDER BY a.update_date DESC
limit 0,5
limit 0,5
...
@@ -529,7 +533,7 @@
...
@@ -529,7 +533,7 @@
FROM
FROM
f_fire_equipment_data fed
f_fire_equipment_data fed
WHERE
WHERE
fed.org_code = #{orgCode}
fed.org_code = #{orgCode}
OR fed.org_code like CONCAT(#{orgCode},'-%')
ORDER BY fed.create_date DESC
ORDER BY fed.create_date DESC
limit 0,5
limit 0,5
</select>
</select>
...
@@ -615,7 +619,7 @@
...
@@ -615,7 +619,7 @@
FROM f_fire_equipment fe
FROM f_fire_equipment fe
WHERE fe.id IN (
WHERE fe.id IN (
select fire_equipment_id from f_equipment_fire_equipment
select fire_equipment_id from f_equipment_fire_equipment
) AND
org_code = #{orgCode}
) AND
(org_code = #{orgCode} OR org_code LIKE CONCAT(#{orgCode},'-%'))
UNION ALL
UNION ALL
SELECT e.id,e.name,e.code,e.ue4_location,e.ue4_rotation,'impEquipment' as type,'impEquipment' as level,
SELECT e.id,e.name,e.code,e.ue4_location,e.ue4_rotation,'impEquipment' as type,'impEquipment' as level,
TMP.relationKeys,
TMP.relationKeys,
...
@@ -644,7 +648,7 @@
...
@@ -644,7 +648,7 @@
LEFT JOIN
LEFT JOIN
(select GROUP_CONCAT(fire_equipment_id) as relationKeys,equipment_id from f_equipment_fire_equipment GROUP BY equipment_id) tmp
(select GROUP_CONCAT(fire_equipment_id) as relationKeys,equipment_id from f_equipment_fire_equipment GROUP BY equipment_id) tmp
ON TMP.equipment_id = e.id
ON TMP.equipment_id = e.id
WHERE e.org_code = #{orgCode}
WHERE e.org_code = #{orgCode}
OR e.org_code like CONCAT(#{orgCode},'-%')
UNION ALL
UNION ALL
SELECT id,name,code,ue4_location,ue4_rotation,
SELECT id,name,code,ue4_location,ue4_rotation,
case type
case type
...
@@ -681,7 +685,7 @@
...
@@ -681,7 +685,7 @@
when 2 then concat('pool-',id)
when 2 then concat('pool-',id)
end as `key`
end as `key`
FROM f_water_resource
FROM f_water_resource
WHERE org_code = #{orgCode}
WHERE org_code = #{orgCode}
OR org_code like CONCAT(#{orgCode},'-%')
UNION ALL
UNION ALL
SELECT id,name,code,ue4_location,ue4_rotation,'fireChamber' as type,'fireChamber' as level,
SELECT id,name,code,ue4_location,ue4_rotation,'fireChamber' as type,'fireChamber' as level,
null as relationKeys,
null as relationKeys,
...
@@ -707,7 +711,7 @@
...
@@ -707,7 +711,7 @@
END position,
END position,
concat('fireChamber-',id) as `key`
concat('fireChamber-',id) as `key`
FROM f_fire_station
FROM f_fire_station
WHERE type = 1 AND org_code = #{orgCode}
WHERE type = 1 AND org_code = #{orgCode}
OR org_code LIKE CONCAT(#{orgCode},'-%')
UNION ALL
UNION ALL
SELECT id,name,car_num as code,ue4_location,ue4_rotation,'fireCar' as type,'fireCar' as level,
SELECT id,name,car_num as code,ue4_location,ue4_rotation,'fireCar' as type,'fireCar' as level,
null as relationKeys,
null as relationKeys,
...
@@ -733,7 +737,7 @@
...
@@ -733,7 +737,7 @@
END position,
END position,
concat('fireCar-',id) as `key`
concat('fireCar-',id) as `key`
FROM f_fire_car
FROM f_fire_car
WHERE org_code = #{orgCode}
WHERE org_code = #{orgCode}
OR org_code LIKE CONCAT(#{orgCode},'-%')
</select>
</select>
<select
id=
"initViewErrorNode"
resultType=
"com.yeejoin.amos.fas.business.vo.View3dNodeVo"
>
<select
id=
"initViewErrorNode"
resultType=
"com.yeejoin.amos.fas.business.vo.View3dNodeVo"
>
...
@@ -752,7 +756,7 @@
...
@@ -752,7 +756,7 @@
r.is_region
<![CDATA[<>]]>
'TRUE'
r.is_region
<![CDATA[<>]]>
'TRUE'
AND R.status = 'ANOMALY'
AND R.status = 'ANOMALY'
AND rl.id = r.risk_level_id
AND rl.id = r.risk_level_id
AND
R.org_code = #{orgCode}
AND
(R.org_code = #{orgCode} OR R.org_code like CONCAT(#{orgCode},'-%'))
UNION ALL
UNION ALL
select
select
p.id,p.name,p.point_no as code,p.ue4_location,p.ue4_rotation,
p.id,p.name,p.point_no as code,p.ue4_location,p.ue4_rotation,
...
@@ -777,7 +781,7 @@
...
@@ -777,7 +781,7 @@
end as title
end as title
from p_point p
from p_point p
where status in ('0','2','3')
where status in ('0','2','3')
AND
p.org_code = #{orgCode}
AND
(p.org_code = #{orgCode} OR p.org_code like CONCAT(#{orgCode},'-%'))
UNION ALL
UNION ALL
select
select
distinct e.id,e.name,e.code,e.ue4_location,e.ue4_rotation,
distinct e.id,e.name,e.code,e.ue4_location,e.ue4_rotation,
...
@@ -793,7 +797,7 @@
...
@@ -793,7 +797,7 @@
left join f_equipment_fire_equipment efe ON e.id = efe.equipment_id
left join f_equipment_fire_equipment efe ON e.id = efe.equipment_id
left join f_fire_equipment fe ON efe.fire_equipment_id = fe.id
left join f_fire_equipment fe ON efe.fire_equipment_id = fe.id
where fe.equip_status = 1
where fe.equip_status = 1
AND
e.org_code = #{orgCode}
AND
(e.org_code = #{orgCode} OR e.org_code like CONCAT(#{orgCode},'-%'))
) tmp
) tmp
where 1=1
where 1=1
<if
test=
"riskSourceId != null"
>
<if
test=
"riskSourceId != null"
>
...
@@ -854,9 +858,9 @@
...
@@ -854,9 +858,9 @@
AND rs.position3d != ''
AND rs.position3d != ''
AND rs.risk_level_id is not null
AND rs.risk_level_id is not null
<if
test=
"abnormalStatus != false"
>
<if
test=
"abnormalStatus != false"
>
AND rs.
is_region
<![CDATA[<>]]>
'TRUE'
AND rs.
status = 'ANOMALY'
</if>
</if>
AND rs.
status = 'ANOMALY'
AND rs.
is_region
<![CDATA[<>]]>
'TRUE'
UNION ALL
UNION ALL
SELECT
SELECT
id,
id,
...
@@ -1165,7 +1169,7 @@
...
@@ -1165,7 +1169,7 @@
AND temp.type in ('fireCar','fireEquipment','fireChamber','fireFoamRoom','hydrant','pool')
AND temp.type in ('fireCar','fireEquipment','fireChamber','fireFoamRoom','hydrant','pool')
</if>
</if>
<if
test=
"orgCode != null"
>
<if
test=
"orgCode != null"
>
AND
temp.orgCode = #{orgCode}
AND
(temp.orgCode = #{orgCode} OR temp.orgCode LIKE CONCAT(#{orgCode},'-%'))
</if>
</if>
</select>
</select>
...
@@ -1229,7 +1233,7 @@
...
@@ -1229,7 +1233,7 @@
AND tmp.typeCode = #{type}
AND tmp.typeCode = #{type}
</if>
</if>
<if
test=
"orgCode!=null"
>
<if
test=
"orgCode!=null"
>
AND
tmp.orgCode = #{orgCode}
AND
(tmp.orgCode = #{orgCode} OR tmp.orgCode like CONCAT(#{orgCode},'-%') )
</if>
</if>
</select>
</select>
...
@@ -1597,7 +1601,7 @@ from (select concat('riskSource',r.id) as id,r.name,r.code,r.ue4_location as ue4
...
@@ -1597,7 +1601,7 @@ from (select concat('riskSource',r.id) as id,r.name,r.code,r.ue4_location as ue4
AND tmp.typeCode = #{type}
AND tmp.typeCode = #{type}
</if>
</if>
<if
test=
"orgCode!=null"
>
<if
test=
"orgCode!=null"
>
AND
tmp.orgCode = #{orgCode}
AND
(tmp.orgCode = #{orgCode} OR tmp.orgCode like CONCAT(#{orgCode},'-%') )
</if>
</if>
LIMIT ${start},${length}
LIMIT ${start},${length}
</select>
</select>
...
...
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