Commit 2cf9eb8e authored by KeYong's avatar KeYong

Merge branch 'develop_station' of http://39.98.45.134:8090/moa/amos-boot-biz into develop_station

parents 16e5c53c 03d53167
...@@ -166,10 +166,6 @@ ...@@ -166,10 +166,6 @@
</select> </select>
<select id="page" resultType="java.util.HashMap"> <select id="page" resultType="java.util.HashMap">
SELECT SELECT
d.*
FROM
(
SELECT
wlesal.id, wlesal.id,
wlesal.org_code, wlesal.org_code,
wlesal.equipment_specific_id AS fireEquipmentId, wlesal.equipment_specific_id AS fireEquipmentId,
...@@ -179,7 +175,7 @@ ...@@ -179,7 +175,7 @@
if(wles.code is null,wlesal.equipment_specific_name,concat(wlesal.equipment_specific_name,'(',wles.code,')')) as if(wles.code is null,wlesal.equipment_specific_name,concat(wlesal.equipment_specific_name,'(',wles.code,')')) as
fireEquipmentName, fireEquipmentName,
concat(wlesal.equipment_specific_name,wlesal.equipment_specific_index_name) as alamContent, concat(wlesal.equipment_specific_name,wlesal.equipment_specific_index_name) as alamContent,
if(confirm_type is null,'未处理','已处理') handleStatus, if(wlesal.confirm_type is null,'未处理','已处理') handleStatus,
IF ( IF (
wlesal.clean_time IS NOT NULL, wlesal.clean_time IS NOT NULL,
'已消除', '已消除',
...@@ -213,48 +209,48 @@ ...@@ -213,48 +209,48 @@
LEFT JOIN wl_equipment_specific wles ON wlesal.equipment_specific_id = wles.id LEFT JOIN wl_equipment_specific wles ON wlesal.equipment_specific_id = wles.id
LEFT JOIN wl_equipment_detail wled ON wles.equipment_detail_id = wled.id LEFT JOIN wl_equipment_detail wled ON wles.equipment_detail_id = wled.id
LEFT JOIN wl_equipment we ON wled.equipment_id = we.id LEFT JOIN wl_equipment we ON wled.equipment_id = we.id
) d
<where> <where>
<if test="param.warehouseStructureName != null and param.warehouseStructureName != ''"> <if test="param.warehouseStructureName != null and param.warehouseStructureName != ''">
d.warehouseStructureName like CONCAT_WS(' ', wles.position,wled.area) like
concat(concat("%",#{param.warehouseStructureName}),"%") concat(concat("%",#{param.warehouseStructureName}),"%")
</if> </if>
<if test="param.equipCode != null and param.equipCode != ''">AND d.fireEquipmentCode like <if test="param.equipCode != null and param.equipCode != ''">AND wles.code like
concat(concat("%",#{param.equipCode}),"%") concat(concat("%",#{param.equipCode}),"%")
</if> </if>
<if test="param.beginDate!=null">AND d.createDate <![CDATA[>=]]> #{param.beginDate}</if> <if test="param.beginDate!=null">AND wlesal.create_date <![CDATA[>=]]> #{param.beginDate}</if>
<if test="param.endDate!=null">AND d.createDate <![CDATA[<=]]> #{param.endDate}</if> <if test="param.endDate!=null">AND wlesal.create_date <![CDATA[<=]]> #{param.endDate}</if>
<if test="param.alarmType == 'BREAKDOWN'">AND d.typeCode = #{param.alarmType}</if> <if test="param.alarmType == 'BREAKDOWN'">AND wlesal.type = #{param.alarmType}</if>
<if test="param.alarmType == 'FIREALARM'">AND d.typeCode = #{param.alarmType}</if> <if test="param.alarmType == 'FIREALARM'">AND wlesal.type = #{param.alarmType}</if>
<if test="param.orgCode != null and param.orgCode != ''">AND d.org_code = #{param.orgCode}</if> <if test="param.orgCode != null and param.orgCode != ''">AND wlesal.org_code = #{param.orgCode}</if>
<if test="param.type != null and param.type != ''">AND d.typeCode = #{param.type}</if> <if test="param.type != null and param.type != ''">AND wlesal.type = #{param.type}</if>
<if test="param.handleStatus != null and param.handleStatus != '' and param.handleStatus == 1">AND <if test="param.handleStatus != null and param.handleStatus != '' and param.handleStatus == 1">AND
d.handleStatus = '已处理' wlesal.confirm_type IS NOT NULL
</if> </if>
<if test="param.handleStatus != null and param.handleStatus != '' and param.handleStatus == 2">AND <if test="param.handleStatus != null and param.handleStatus != '' and param.handleStatus == 2">AND
d.handleStatus = '未处理' wlesal.confirm_type IS NULL
</if> </if>
<if test="param.system != null and param.system != ''"> <if test="param.system != null and param.system != ''">
AND find_in_set(#{param.system},d.systemId) AND find_in_set(#{param.system},wles.system_id)
</if> </if>
<if test="param.buildIds!=null"> <if test="param.buildIds!=null">
AND d.buildId IN AND wlesal.build_id IN
<foreach item="item" collection="param.buildIds" separator="," <foreach item="item" collection="param.buildIds" separator=","
open="(" close=")" index="">#{item} open="(" close=")" index="">#{item}
</foreach> </foreach>
</if> </if>
<if test="param.id!=null and param.id!=''">AND d.fireEquipmentId = #{param.id}</if> <if test="param.id!=null and param.id!=''">AND wlesal.equipment_specific_id = #{param.id}</if>
<if test="param.cleanStatus != null and param.cleanStatus != '' and param.cleanStatus == 1">AND <if test="param.cleanStatus != null and param.cleanStatus != '' and param.cleanStatus == 1">AND
d.cleanStatus = '已消除' wlesal.clean_time IS NOT NULL
</if> </if>
<if test="param.cleanStatus != null and param.cleanStatus != '' and param.cleanStatus == 2">AND <if test="param.cleanStatus != null and param.cleanStatus != '' and param.cleanStatus == 2">AND
d.cleanStatus = '未消除' wlesal.clean_time IS NULL
</if> </if>
<if test="param.isRemoveShield != null and param.isRemoveShield != ''">AND <if test="param.isRemoveShield != null and param.isRemoveShield != ''">AND
d.typeCode != 'SHIELD' wlesal.type != 'SHIELD'
</if> </if>
</where> </where>
ORDER BY d.createDate DESC ORDER BY wlesal.create_date DESC
</select> </select>
<select id="pageAlarmsInfo" resultType="Map"> <select id="pageAlarmsInfo" resultType="Map">
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