Commit 55a835a3 authored by maoying's avatar maoying

修改装备告警产生装备数据查询脚本

parent 6deddb4c
...@@ -734,18 +734,18 @@ ...@@ -734,18 +734,18 @@
</select> </select>
<select id="getEquipSpecificDetail" <select id="getEquipSpecificDetail"
resultType="com.yeejoin.equipmanage.common.datasync.entity.FireEquipment"> resultType="com.yeejoin.equipmanage.common.datasync.entity.FireEquipment">
SELECT SELECT
es.id, es.id,
es.`code` AS mrid, es.`code` AS mrid,
ed.`name`, es.`name`,
ed.`name` AS aliasname, es.`name` AS aliasname,
es.`code`, es.`code`,
e.`name` AS categoryname, ed.equipment_name AS categoryname,
e.`code` AS categorycode, ed.`code` AS categorycode,
( SELECT GROUP_CONCAT( url ) FROM wl_upload_file WHERE file_type = 'image' AND object_type = 'equipment' AND object_id = ed.id ) AS img, ( SELECT GROUP_CONCAT( url ) FROM wl_upload_file WHERE file_type = 'image' AND object_type = 'equipment' AND object_id = ed.id ) AS img,
es.iot_code AS iotcode, es.iot_code AS iotcode,
f.`name` AS stationname, '' AS stationname,
f.`code` AS stationcode, '' AS stationcode,
ws.source_id AS buildid, ws.source_id AS buildid,
es.system_id AS fightingsystemids, es.system_id AS fightingsystemids,
TRIM(CONCAT_WS(' ',ws.full_name,sd.description)) AS position, TRIM(CONCAT_WS(' ',ws.full_name,sd.description)) AS position,
...@@ -760,11 +760,9 @@ ...@@ -760,11 +760,9 @@
FROM FROM
wl_equipment_specific es wl_equipment_specific es
LEFT JOIN wl_equipment_detail ed ON es.equipment_detail_id = ed.id LEFT JOIN wl_equipment_detail ed ON es.equipment_detail_id = ed.id
LEFT JOIN wl_equipment e ON e.id = ed.equipment_id
LEFT JOIN wl_stock_detail sd ON sd.equipment_specific_id = es.id LEFT JOIN wl_stock_detail sd ON sd.equipment_specific_id = es.id
LEFT JOIN wl_warehouse_structure ws ON ws.id = sd.warehouse_structure_id LEFT JOIN wl_warehouse_structure ws ON ws.id = sd.warehouse_structure_id
LEFT JOIN wl_area a ON es.area_id = a.id, LEFT JOIN wl_area a ON es.area_id = a.id
f_station_info f
WHERE WHERE
es.id = #{id} es.id = #{id}
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment