from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ue4Rotation ,'riskSource' as type,r.org_code as orgCode,
rl.name as level,CONCAT('level_',rl.level) as levelStr,r.is_indoor as isIndoor,'风险点' as typeName,'riskSource' as typeCode,
from (select concat('riskSource',r.id) as id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ue4Rotation ,'riskSource' as type,r.org_code as orgCode,
rl.level as level,rl.name as levelStr,r.is_indoor as isIndoor,'风险点' as typeName,'riskSource' as typeCode,
@@ -1044,7 +1044,8 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
'' as protectObjName,
'' as routeName,
'' as person,
'' as title
r.rpn as title,
CONCAT('riskSource-',r.id) as `key`
from f_risk_source r
left join f_risk_level rl ON rl.id = r.risk_level_id
where r.is_region = 'FALSE'
...
...
@@ -1052,7 +1053,7 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
AND rl.level = #{dataLevel}
</if>
UNION all
select p.id,p.name,p.point_no as code,p.ue4_location as ue4Location,p.ue4_rotation as ue4Rotation ,'patrol' as type,p.org_code as orgCode,
select concat('patrol-',p.id) as id,p.name,p.point_no as code,p.ue4_location as ue4Location,p.ue4_rotation as ue4Rotation ,'patrol' as type,p.org_code as orgCode,
p.status as level,CONCAT('level_',p.status) as levelStr,p.is_indoor as isIndoor,'巡检点' as typeName,'patrol' as typeCode,
CASE
WHEN (
...
...
@@ -1083,11 +1084,12 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
when p.status = '1' then '合格'
when p.status = '2' then '不合格'
when p.status = '3' then '漏检'
end as title
end as title,
concat('patrol-',p.id) as `key`
from p_point p
WHERE is_delete = FALSE
UNION all
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'impEquipment' as type,org_code as orgCode,
select concat('impEquipment-',id) as id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'impEquipment' as type,org_code as orgCode,
0 as level,'level_0' as levelStr,e.is_indoor as isIndoor,'重点设备' as typeName,'impEquipment' as typeCode,
CASE
WHEN (
...
...
@@ -1113,10 +1115,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
'' as protectObjName,
'' as routeName,
'' as person,
'' as title
name as title,
concat('impEquipment-',e.id) as `key`
from f_equipment e
UNION all
select m.id,m.name,m.code,m.ue4_location as ue4Location,m.ue4_rotation as ue4Rotation ,'monitorEquipment' as type,m.org_code as orgCode,
select concat('monitorEquipment-',m.id) as id,m.name,m.code,m.ue4_location as ue4Location,m.ue4_rotation as ue4Rotation ,'monitorEquipment' as type,m.org_code as orgCode,
m.equip_status as level , concat('level_',m.equip_status) as levelStr,m.is_indoor as isIndoor,'探测器' as typeName,'monitorEquipment' as typeCode,
CASE
WHEN (
...
...
@@ -1142,7 +1145,8 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
f.name as protectObjName,
'' as routeName,
'' as person,
'' as title
m.name as title,
concat('monitorEquipment-',m.id) as `key`
from f_fire_equipment m
left join f_equipment_fire_equipment fe on fe.fire_equipment_id = m.id
left join f_equipment f on f.id = fe.equipment_id
...
...
@@ -1151,7 +1155,7 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
AND f.name = #{protectObjName}
</if>
UNION all
select m.id,m.name,m.code,m.ue4_location as ue4Location,m.ue4_rotation as ue4Rotation ,'video' as type,m.org_code as orgCode,
select concat('video-',m.id) as id,m.name,m.code,m.ue4_location as ue4Location,m.ue4_rotation as ue4Rotation ,'video' as type,m.org_code as orgCode,
m.equip_status as level , concat('level_',m.equip_status) as levelStr,m.is_indoor as isIndoor,'摄像头' as typeName,'video' as typeCode,
CASE
WHEN (
...
...
@@ -1177,14 +1181,15 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
f.name as protectObjName,
'' as routeName,
'' as person,
'' as title
m.name as title,
concat('video-',m.id) as `key`
from f_fire_equipment m
left join f_equipment_fire_equipment fe on fe.fire_equipment_id = m.id
left join f_equipment f on f.id = fe.equipment_id
where m.equip_classify = 2
UNION all
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'hydrant' as type,org_code as orgCode,
select concat('hydrant-',id) as id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'hydrant' as type,org_code as orgCode,
0 as level , 'level_0' as levelStr,is_indoor as isIndoor,'消防栓' as typeName,'fireEquipment' as typeCode,
CASE
WHEN (
...
...
@@ -1210,10 +1215,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
'' as protectObjName,
'' as routeName,
'' as person,
'' as title
name as title,
concat('hydrant-',id) as `key`
from f_water_resource where type = 1
UNION all
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,'pool' as type,org_code as orgCode,
select concat('pool-',id) as id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,'pool' as type,org_code as orgCode,
0 as level , 'level_0' as levelStr,is_indoor as isIndoor,'消防水池' as typeName,'fireEquipment' as typeCode,
CASE
WHEN (
...
...
@@ -1239,10 +1245,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
'' as protectObjName,
'' as routeName,
'' as person,
'' as title
name as title,
concat('pool-',id) as `key`
from f_water_resource where type = 2
UNION all
select id,name,car_num as code,ue4_location as ue4Location,ue4_rotation as ue4Rotation, 'fireCar' as type,org_code as orgCode,
select concat('fireCar-',id) as id,name,car_num as code,ue4_location as ue4Location,ue4_rotation as ue4Rotation, 'fireCar' as type,org_code as orgCode,
0 as level , 'level_0' as levelStr,is_indoor as isIndoor,'消防车' as typeName,'fireEquipment' as typeCode,
CASE
WHEN (
...
...
@@ -1268,10 +1275,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
'' as protectObjName,
'' as routeName,
'' as person,
'' as title
name as title,
concat('fireCar-',id) as `key`
from f_fire_car
UNION all
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,'fireEquipment' as type,org_code as orgCode,
select concat('fireEquipment-',id) as id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,'fireEquipment' as type,org_code as orgCode,
equip_status as level , concat('level_',equip_status) as levelStr,is_indoor as isIndoor,'灭火器' as typeName,'fireEquipment' as typeCode,
CASE
WHEN (
...
...
@@ -1297,10 +1305,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
'' as protectObjName,
'' as routeName,
'' as person,
'' as title
name as title,
concat('fireEquipment-',id) as `key`
from f_fire_equipment where equip_classify = 3
UNION all
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation , 'fireChamber' as type,org_code as orgCode,
select concat('fireChamber-',id) as id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation , 'fireChamber' as type,org_code as orgCode,
0 as level , 'level_0' as levelStr,is_indoor as isIndoor,'泡沫间' as typeName,'fireEquipment' as typeCode,
CASE
WHEN (
...
...
@@ -1326,10 +1335,11 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as
'' as protectObjName,
'' as routeName,
'' as person,
'' as title
name as title,
concat('fireChamber-',id) as `key`
from f_fire_station where type = 2
UNION all
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'fireFoamRoom' as type,org_code as orgCode,
select concat('fireFoamRoom-',id) as id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'fireFoamRoom' as type,org_code as orgCode,
0 as level , 'level_0' as levelStr,is_indoor as isIndoor,'消防室' as typeName,'fireEquipment' as typeCode,
CASE
WHEN (
...
...
@@ -1355,7 +1365,8 @@ from (select r.id,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as