Commit 1cfc435d authored by KeYong's avatar KeYong

更改应急处置返回数据

parent 49e6c31a
......@@ -79,6 +79,10 @@
<select id="getAlarmSingleMapperPage" resultType="java.util.HashMap">
SELECT
d.*
FROM
(
SELECT
wlesa.id,
wlesa.equipment_specific_id as fireEquipmentId,
wles.code as fireEquipmentCode,
......@@ -99,15 +103,25 @@
WHEN 'FIREALARM' THEN '火灾报警'
WHEN 'BREAKDOWN' THEN '故障告警' ELSE wlesa.type
END AS type,
wlesa.create_date as createDate,
wlesa.update_date as createDate,
wlesa.recovery_date as recoveryDate,
wws.full_name as warehouseStructureName
wws.full_name as warehouseStructureName,
(
SELECT
group_concat(DISTINCT f.`name`)
FROM
f_equipment_fire_equipment efe
JOIN f_equipment f ON efe.equipment_id = f.id
JOIN wl_equipment_specific_index ind on ind.equipment_specific_id = efe.fire_equipment_id
) equipmentName
FROM wl_equipment_specific_alarm wlesa
left join wl_equipment_specific wles on wlesa.equipment_specific_id = wles.id
left join wl_stock_detail wlsd on wlsd.equipment_specific_id=wles.id
left join wl_warehouse_structure wws on wlsd.warehouse_structure_id = wws.id
left join wl_equipment_detail wled on wles.equipment_detail_id = wled.id
WHERE wled.`name` is not null
) d
WHERE 1=1
AND d.fireEquipmentName IS NOT NULL
<if test="protectObj !=null and protectObj != '' "> and wled.`name` like concat(concat("%",#{protectObj}),"%") </if>
<if test="beginDate!=null"> and wlesa.create_date >= #{beginDate} </if>
<if test="endDate!=null"> and wlesa.create_date <![CDATA[<=]]> #{endDate} </if>
......@@ -115,5 +129,6 @@
<when test="pageSize==-1"></when>
<when test="pageSize!=-1">limit #{offset},#{pageSize}</when>
</choose>
order by wlesa.update_date desc
</select>
</mapper>
\ No newline at end of file
......@@ -195,9 +195,9 @@
<if test="startTime!=null">
AND d.create_date BETWEEN '${startTime}' AND '${endTime}'
</if>
AND e_value IS NOT NULL
ORDER BY d.create_date desc
LIMIT ${start},${length}
</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