LEFT JOIN wl_equipment_detail AS det ON m.equipment_detail_id = det.id
LEFT JOIN wl_stock_detail AS sto ON sto.equipment_specific_id = m.id
LEFT JOIN wl_equipment AS equ ON det.equipment_id = equ.id
LEFT JOIN wl_equipment_category AS cat ON equ.category_id = cat.id
LEFT JOIN wl_stock_detail AS sto ON sto.qr_code = m.qr_code
LEFT JOIN wl_warehouse_structure AS str ON sto.warehouse_structure_id = str.source_id
LEFT JOIN wl_warehouse_structure AS str ON sto.warehouse_structure_id = str.source_id
LEFT JOIN f_risk_source AS risk ON str.source_id = risk.source_id
LEFT JOIN f_risk_source AS risk ON str.source_id = risk.source_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
WHERE
substr(cat.`code`, 1, 4) = '9204'
substr(m.equipment_code, 1, 4) = '9204'
<iftest ="protectObjName != null and protectObjName != ''">
AND f.`name` = #{protectObjName}
</if>
GROUP BY
GROUP BY
m.`code`
m.`code`
UNION ALL
UNION ALL
...
@@ -726,7 +718,12 @@
...
@@ -726,7 +718,12 @@
)
)
END positionDTO,
END positionDTO,
det.name as label,
det.name as label,
IFNULL(group_concat(f.name),'') as protectObjName,
(select
group_concat(fet.`name`)
from f_equipment_fire_equipment as fefe
left join f_equipment as fet on fet.id = fefe.equipment_id
where fefe.fire_equipment_id = m.id
) as protectObjName,
'' as routeName,
'' as routeName,
'' as person,
'' as person,
det.name as title,
det.name as title,
...
@@ -735,17 +732,10 @@
...
@@ -735,17 +732,10 @@
str.full_name as room
str.full_name as room
from wl_equipment_specific m
from wl_equipment_specific m
left join wl_equipment_detail as det on m.equipment_detail_id = det.id
left join wl_equipment_detail as det on m.equipment_detail_id = det.id
left join wl_equipment as equ on det.equipment_id = equ.id
left join wl_equipment_category as cat on equ.category_id = cat.id
left join wl_stock_detail as sto on sto.qr_code = m.qr_code
left join wl_stock_detail as sto on sto.qr_code = m.qr_code
left join wl_warehouse_structure as str on sto.warehouse_structure_id = str.source_id
left join wl_warehouse_structure as str on sto.warehouse_structure_id = str.source_id
left join f_risk_source as risk on str.source_id = risk.source_id
left join f_risk_source as risk on str.source_id = risk.source_id
left join f_equipment_fire_equipment fe on fe.fire_equipment_id = m.id
where substr(m.equipment_code ,1,4) = '9204'
left join f_equipment f on f.id = fe.equipment_id
where substr(cat.code ,1,4) = '9204'
<iftest="protectObjName != null and protectObjName != ''">
AND f.name = #{protectObjName}
</if>
group By m.code
group By m.code
UNION all
UNION all
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,
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,