left join wl_warehouse_structure as str on sto.warehouse_structure_id = str.id
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 substr(cat.code ,1,4) = 8501
where substr(cat.code ,1,4) = '8501'
group By m.code
<iftest="protectObjName != null and protectObjName != ''">
AND f.name = #{protectObjName}
...
...
@@ -1544,7 +1544,7 @@
left join wl_equipment_category as cat on equ.category_id = cat.id
left join wl_stock_detail as sto on sto.qr_code = spe.qr_code
left join wl_warehouse_structure as str on sto.warehouse_structure_id = str.id
where substr(cat.code ,1,4)= 3105
where substr(cat.code ,1,4)= '3105'
UNION all
select concat('pool-',bu.id) as id,bu.id as originId,bu.name,bu.code,null as ue4Location,null as ue4Rotation,'pool' as type,bu.org_code as orgCode,
0 as level , 'level_0' as levelStr,null as isIndoor,'消防水池' as typeName,'fireEquipment' as typeCode,
...
...
@@ -1647,7 +1647,7 @@
left join wl_equipment_category as cat on equ.category_id = cat.id
left join wl_stock_detail as sto on sto.qr_code = spe.qr_code
left join wl_warehouse_structure as str on sto.warehouse_structure_id = str.id
where substr(cat.code ,1,4) = 3104
where substr(cat.code ,1,4) = '3104'
UNION all
select concat('fireChamber-',bu.id) as id,bu.id as originId,bu.name,bu.code,null as ue4Location,null as ue4Rotation , 'fireChamber' as type,bu.org_code as orgCode,
0 as level , 'level_0' as levelStr,null as isIndoor,'泡沫间' as typeName,'fireEquipment' as typeCode,
...
...
@@ -1713,7 +1713,7 @@
bu.region_id as riskSourceId
from wl_building as bu
left join wl_equipment_category as cat on bu.equipment_code = cat.id