Commit 00d56e00 authored by KeYong's avatar KeYong

修改bug

parent 27350fb3
...@@ -339,8 +339,6 @@ public class RiskSourceSceneServiceImpl extends ServiceImpl<RiskSourceSceneMappe ...@@ -339,8 +339,6 @@ public class RiskSourceSceneServiceImpl extends ServiceImpl<RiskSourceSceneMappe
Map<String, String> map = new HashMap<>(); Map<String, String> map = new HashMap<>();
map.put("equipCode", action.getQrCode()); map.put("equipCode", action.getQrCode());
map.put("color", EquipmentStateUtil.judgeEquipState(action)); map.put("color", EquipmentStateUtil.judgeEquipState(action));
// map.put("num", action.getNum()+"");
data.add(map); data.add(map);
}); });
return data; return data;
......
...@@ -50,6 +50,9 @@ ...@@ -50,6 +50,9 @@
<if test="bizOrgCode != null and bizOrgCode != ''"> <if test="bizOrgCode != null and bizOrgCode != ''">
AND sys.biz_org_code like CONCAT(#{bizOrgCode},'%') AND sys.biz_org_code like CONCAT(#{bizOrgCode},'%')
</if> </if>
<if test="companyCode != null and companyCode != ''">
AND sys.biz_org_code = #{companyCode}
</if>
<if test="formGroupId != null and formGroupId != '' and formGroupId != '-1'"> <if test="formGroupId != null and formGroupId != '' and formGroupId != '-1'">
AND sys.form_group_id = #{formGroupId} AND sys.form_group_id = #{formGroupId}
</if> </if>
......
...@@ -337,21 +337,20 @@ ...@@ -337,21 +337,20 @@
</select> </select>
<select id = "getEquipLatestStatusBySceneId" resultType="com.yeejoin.equipmanage.common.entity.EquipmentSpecificIndex"> <select id = "getEquipLatestStatusBySceneId" resultType="com.yeejoin.equipmanage.common.entity.EquipmentSpecificIndex">
SELECT SELECT
ei.type_code AS 'typeCode', ei.type_code AS 'typeCode',
es.`name` as 'equipmentSpecificName', es.`name` AS 'equipmentSpecificName',
es.realtime_iot_index_key AS 'indexKey', es.realtime_iot_index_key AS 'indexKey',
es.realtime_iot_index_name AS 'indexName', es.realtime_iot_index_name AS 'indexName',
es.qr_code AS 'qrCode', es.qr_code AS 'qrCode',
es.iot_code AS 'iotCode', es.iot_code AS 'iotCode',
es.realtime_iot_index_value AS 'value', (SELECT IF(SUM( IF ( wesa.equipment_specific_index_value = 'true', 1, 0 ) ) > 0, 'true', 'false' ) AS indexValue FROM wl_equipment_specific_alarm wesa WHERE wesa.equipment_specific_id = es.id) AS 'value',
ei.is_alarm AS isAlarm, ei.is_alarm AS isAlarm,
ei.emergency_level_color AS 'emergencyLevelColor' ei.emergency_level_color AS 'emergencyLevelColor'
FROM
FROM wl_equipment_index ei,
wl_equipment_specific es, wl_equipment_specific es
wl_equipment_index ei WHERE
WHERE
es.realtime_iot_index_id = ei.id es.realtime_iot_index_id = ei.id
AND find_in_set( AND find_in_set(
es.id, es.id,
......
...@@ -519,7 +519,7 @@ ...@@ -519,7 +519,7 @@
FROM FROM
p_point p p_point p
</select> </select>
<select id="getYaoCeSpeIndex" resultType="com.yeejoin.equipmanage.common.vo.SpeIndexVo"> <select id="getSpeIndex" resultType="com.yeejoin.equipmanage.common.vo.SpeIndexVo">
SELECT SELECT
* *
FROM FROM
...@@ -5808,7 +5808,10 @@ ...@@ -5808,7 +5808,10 @@
</select> </select>
<select id="judgeIsTrend" resultType="Map"> <select id="judgeIsTrend" resultType="Map">
SELECT SELECT
wei.is_trend AS isTrend CASE
WHEN wei.is_trend = 1 then "1"
WHEN wei.is_trend = 0 then "0"
END AS isTrend
FROM FROM
wl_equipment_specific_index AS wesi wl_equipment_specific_index AS wesi
LEFT JOIN wl_equipment_specific AS wes ON wes.id = wesi.equipment_specific_id LEFT JOIN wl_equipment_specific AS wes ON wes.id = wesi.equipment_specific_id
...@@ -5816,10 +5819,11 @@ ...@@ -5816,10 +5819,11 @@
WHERE WHERE
wes.id = #{id} wes.id = #{id}
AND wei.is_iot = true AND wei.is_iot = true
ORDER BY wesi.update_date DESC
limit 1 limit 1
</select> </select>
<select id="getSpeIndex" resultType="com.yeejoin.equipmanage.common.vo.SpeIndexVo"> <select id="getYaoCeSpeIndex" resultType="com.yeejoin.equipmanage.common.vo.SpeIndexVo">
SELECT SELECT
* *
FROM FROM
...@@ -5857,14 +5861,13 @@ ...@@ -5857,14 +5861,13 @@
spein.is_alarm AS isAlarm, spein.is_alarm AS isAlarm,
spein.emergency_level AS emergencyLevel, spein.emergency_level AS emergencyLevel,
spein.emergency_level_describe AS emergencyLevelDescribe, spein.emergency_level_describe AS emergencyLevelDescribe,
IF(SUM(IF(wesa.equipment_specific_index_value = 'true', 1, 0 ) ) > 0, 'true', 'false' ) AS indexValue, (SELECT IF(SUM( IF ( wesa.equipment_specific_index_value = 'true', 1, 0 ) ) > 0, 'true', 'false' ) AS indexValue FROM wl_equipment_specific_alarm wesa WHERE wesa.equipment_specific_id = wes.id) AS indexValue,
spein.equipment_index_name AS indexName, spein.equipment_index_name AS indexName,
wes.qr_code AS qrCode wes.qr_code AS qrCode
FROM FROM
wl_equipment_specific_index AS spein wl_equipment_specific_index AS spein
LEFT JOIN wl_equipment_index AS eqin ON spein.equipment_index_id = eqin.id LEFT JOIN wl_equipment_index AS eqin ON spein.equipment_index_id = eqin.id
LEFT JOIN wl_equipment_specific AS wes ON wes.id = spein.equipment_specific_id LEFT JOIN wl_equipment_specific AS wes ON wes.id = spein.equipment_specific_id
LEFT JOIN wl_equipment_specific_alarm wesa ON wesa.equipment_specific_id = wes.id
WHERE WHERE
spein.equipment_specific_id = #{id} spein.equipment_specific_id = #{id}
ORDER BY ORDER BY
......
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