Commit 3d75e7c6 authored by 吴俊凯's avatar 吴俊凯

Merge branch 'dev_upgrade' of http://172.16.10.76/station/YeeAmosFireAutoSysRoot into dev_upgrade

parents 9248e0f9 0fa7894d
......@@ -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,18 +103,29 @@
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
<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>
) d
WHERE 1=1
AND d.fireEquipmentName IS NOT NULL
<if test="protectObj !=null and protectObj != '' "> and d.fireEquipmentName like concat(concat("%",#{protectObj}),"%") </if>
<if test="beginDate!=null"> and d.createDate >= #{beginDate} </if>
<if test="endDate!=null"> and d.createDate <![CDATA[<=]]> #{endDate} </if>
order by d.createDate desc
<choose>
<when test="pageSize==-1"></when>
<when test="pageSize!=-1">limit #{offset},#{pageSize}</when>
......
......@@ -136,6 +136,7 @@
wl_equipment_specific_index ind
left join wl_equipment_specific as spe on spe.id = ind.equipment_specific_id
left join wl_equipment_detail as det on spe.equipment_detail_id = det.id
WHERE 1=1 AND ind.value IS NOT NULL
) d
WHERE
1 = 1
......@@ -195,9 +196,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