Commit 00d56e00 authored by KeYong's avatar KeYong

修改bug

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