Commit a03458d2 authored by lisong's avatar lisong

修改物联信息卡片接口

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