from (select concat('riskSource-',r.id) as id,concat(r.id) as originId,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ue4Rotation ,'riskSource' as type,r.org_code as orgCode,
WHERE
rl.level as level,rl.name as levelStr,r.is_indoor as isIndoor,'风险点' as typeName,'riskSource' as typeCode,
left join f_risk_level rl ON rl.id = r.risk_level_id
) AS address,
where r.is_region = 'FALSE'
MAX(
<iftest="dataLevel != null and dataLevel != ''">
CASE
AND rl.level = #{dataLevel}
WHEN a.field_name = 'orgCode' THEN
</if>
a.field_value
UNION all
END
select concat('patrol-',p.id) as id,concat(p.id) as originId,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,
) AS orgCode
p.status as level,CONCAT('level_',p.status) as levelStr,p.is_indoor as isIndoor,'巡检点' as typeName,'patrol' as typeCode,
left join f_risk_source r on r.id = p.risk_source_id
) THEN
WHERE is_delete = FALSE
NULL
UNION all
ELSE
select concat('impEquipment-',e.id) as id,concat(e.id) as originId,e.name,e.code,e.ue4_location as ue4Location,e.ue4_rotation as ue4Rotation ,'impEquipment' as type,e.org_code as orgCode,
CONCAT(
0 as level,'level_0' as levelStr,e.is_indoor as isIndoor,'重点设备' as typeName,'impEquipment' as typeCode,
left join f_risk_level rl ON rl.id = r.risk_level_id
'' as routeName,
where r.is_region = 'FALSE'
'' as person,
<iftest="dataLevel != null and dataLevel != ''">
e.name as title,
AND rl.level = #{dataLevel}
concat('impEquipment-',e.id) as `key`,
</if>
e.risk_source_id as riskSourceId,
UNION all
r.name as room
select concat('patrol-',p.id) as id,concat(p.id) as originId,p.name,p.point_no as code,p.ue4_location as
from f_equipment e
ue4Location,p.ue4_rotation as ue4Rotation ,'patrol' as type,p.org_code as orgCode,
left join f_risk_source r on r.id = e.risk_source_id
p.status as level,CONCAT('level_',p.status) as levelStr,p.is_indoor as isIndoor,'巡检点' as typeName,'patrol' as
UNION all
typeCode,
select concat('monitorEquipment-',m.id) as id,concat(m.id) as originId,det.name,m.code as code,'' as ue4Location,'' as ue4Rotation ,'monitorEquipment' as type,m.org_code as orgCode,
CASE
null as level , concat('level_',null) as levelStr,null as isIndoor,'探测器' as typeName,'monitorEquipment' as typeCode,
select concat('video-',vi.id) as id,concat(vi.id) as originId,vi.name,vi.code,null as ue4Location,null as ue4Rotation ,'video' as type,vi.org_code as orgCode,
) THEN
null as level , concat('level_',null) as levelStr,null as isIndoor,'摄像头' as typeName,'video' as typeCode,
select concat('hydrant-',spe.id) as id,concat(spe.id) as originId,det.name,spe.code as code,null as ue4Location,null as ue4Rotation ,'hydrant' as type,spe.org_code as orgCode,
) THEN
0 as level , 'level_0' as levelStr,null as isIndoor,'消防栓' as typeName,'fireEquipment' as typeCode,
`wl_form_instance` a where a.group_code in('pool','r_pool')
) THEN
GROUP BY
NULL
a.instance_id) s
ELSE
LEFT JOIN f_risk_source r ON s.instanceId = r.source_id
CONCAT(
UNION all
'{"x":',
select concat('fireCar-',car.id) as id,concat(car.id) as originId,car.name,car.car_num as code,null as ue4Location,null as ue4Rotation, 'fireCar' as type,car.org_code as orgCode,
substring_index(null, ',', 1),
0 as level , 'level_0' as levelStr,null as isIndoor,'消防车' as typeName,'fireEquipment' as typeCode,
left join wl_equipment_detail as det on spe.equipment_detail_id = det.id
car.name as protectObjName,
left join wl_equipment as equ on det.equipment_id = equ.id
'' as routeName,
left join wl_equipment_category as cat on equ.category_id = cat.id
'' as person,
left join wl_stock_detail as sto on sto.qr_code = spe.qr_code
car.name as title,
left join wl_warehouse_structure as str on sto.warehouse_structure_id = str.source_id
concat('fireCar-',car.id) as `key`,
where substr(cat.code ,1,4)= '3105'
#{riskSourceId} as riskSourceId,
UNION all
'' as room
select
from wl_car as car
concat('pool-',s.instanceId) as id,
left join wl_equipment as equ on car.equipment_id = equ.id
concat(s.instanceId) as originId,s.name,s.code,null as ue4Location,null as ue4Rotation,'pool' as type,s.orgCode,
left join wl_equipment_category as cat on equ.category_id = cat.id
0 as level , 'level_0' as levelStr,null as isIndoor,'消防水池' as typeName,'fireEquipment' as typeCode,
UNION all
null as positionDTO,
select concat('extinguisher-',spe.id) as id,concat(spe.id) as originId,det.name,spe.code as code,null as ue4Location,null as ue4Rotation,'extinguisher' as type,spe.org_code as orgCode,
s.name as label,
null as level , concat('level_',null) as levelStr,null as isIndoor,'灭火器' as typeName,'fireEquipment' as typeCode,