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