Commit a03458d2 authored by lisong's avatar lisong

修改物联信息卡片接口

parent f309c0d2
......@@ -795,7 +795,7 @@
FROM
wl_equipment_specific_alarm_log wespa
WHERE
wespa.equipment_specific_index_key LIKE concat('%', 'FireAlarm ')
wespa.equipment_specific_index_key LIKE concat('%', 'FireAlarm')
AND wespa.create_date LIKE concat(temp.date, '%')
AND wespa.equipment_specific_index_value = 'true'
<foreach collection="list" open="and (" close=")" item="code" index="index" separator="or">
......@@ -821,7 +821,7 @@
FROM
wl_equipment_specific_alarm_log wespa
WHERE
wespa.equipment_specific_index_key LIKE concat('%', 'Fault ')
wespa.equipment_specific_index_key LIKE concat('%', 'Fault')
AND wespa.create_date LIKE concat(temp.date, '%')
AND wespa.equipment_specific_index_value = 'true'
<foreach collection="list" open="and (" close=")" item="code" index="index" separator="or">
......@@ -834,7 +834,7 @@
FROM
wl_equipment_specific_alarm_log wespa
WHERE
wespa.equipment_specific_index_key LIKE concat('%', 'PowerLoss ')
wespa.equipment_specific_index_key LIKE concat('%', 'PowerLoss')
AND wespa.create_date LIKE concat(temp.date, '%')
AND wespa.equipment_specific_index_value = 'true'
<foreach collection="list" open="and (" close=")" item="code" index="index" separator="or">
......
......@@ -1819,36 +1819,55 @@
<select id="normalIndexInfoListByPage" resultType="java.util.Map">
SELECT
si.id,
`s`.`name` AS `equipName`,
`si`.`equipment_index_key` AS `equipmentIndexKey`,
(CASE si.`value` WHEN 'true' THEN '是' WHEN 'false' THEN '否' ELSE concat(ifnull(si.`value`,'--'), IFNULL(wei.unit, '')) END)
AS `value`,
(
CASE
WHEN si.value_label IS NULL
OR trim(si.value_label) = '' THEN
(
CASE si.`value`
WHEN 'true' THEN
'开'
WHEN 'false' THEN
'关'
ELSE
si.`value`
END
)
ELSE
si.value_label
END
) AS `value`,
si.unit,
'' AS standardValue,
DATE_FORMAT( si.update_date, '%Y-%m-%d %H:%i:%s' )
AS `time`,
DATE_FORMAT(
si.update_date,
'%Y-%m-%d %H:%i:%s'
) AS `time`,
`si`.`equipment_index_name` AS `equipmentIndexName`,
`s`.`code` AS `code`,
ifnull(ed.area, '--') as area,
(SELECT
group_concat( `fs`.`charge_person_name` SEPARATOR ',' )
FROM
`f_fire_fighting_system` `fs`
WHERE
ifnull(ed.area, '--') AS area,
(
0 <![CDATA[<>]]> find_in_set( `fs`.`id`, `s`.`system_id` ))) AS `chargePersonName`,
(SELECT
group_concat( `fs`.`name` SEPARATOR ',' )
SELECT
group_concat(`fs`.`name` SEPARATOR ',')
FROM
`f_fire_fighting_system` `fs`
WHERE
(
0 <![CDATA[<>]]> find_in_set( `fs`.`id`, `s`.`system_id` ))) AS `fightSysName`
0 <![CDATA[<>]]> find_in_set(`fs`.`id`, `s`.`system_id`)
)
) AS `fightSysName`
FROM
`wl_equipment_specific_index` `si` JOIN `wl_equipment_specific` `s`
LEFT JOIN wl_equipment_detail ed ON s.equipment_detail_id = ed.id
`wl_equipment_specific_index` `si`
JOIN `wl_equipment_specific` `s`
LEFT JOIN wl_equipment_detail ed ON s.equipment_detail_id = ed.id
LEFT JOIN wl_equipment_index wei ON wei.id = si.equipment_index_id
WHERE
`si`.`equipment_specific_id` = `s`.`id` AND si.is_alarm = 0
`si`.`equipment_specific_id` = `s`.`id`
AND si.is_alarm = 0
AND si.`value` IS NOT NULL
<if test="startDate!=null">
AND DATE_FORMAT(si.update_date,'%y-%m-%d') <![CDATA[>=]]> DATE_FORMAT(#{startDate},'%y-%m-%d')
</if>
......@@ -1861,6 +1880,7 @@
<if test="systemCode != null and systemCode != ''">
AND FIND_IN_SET((SELECT id FROM f_fire_fighting_system WHERE code = #{systemCode} ),s.system_id)
</if>
order by si.update_date desc
</select>
<select id="getFireAutoSysInfo" resultType="java.util.Map">
......
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