Browse Source

报警设置查询一级场景修改

yuejiaying 4 years ago
parent
commit
4e0fdf6232

+ 1 - 1
sms_water/src/main/java/com/huaxu/service/impl/OnlineMonitorImpl.java

@@ -506,7 +506,7 @@ public class OnlineMonitorImpl implements OnlineMonitorService {
                     List<MonitorDataDto> pumpStatus=new ArrayList<>(0);//水泵状态
                     for(MonitorDataDto monitorData : calculate.getMonitorDataEntities()){
                         if(monDataCol.getDeviceId()==null) {
-                            byte[] bytes = redisUtil.get(("sms_water_"+monDataCol.getDeviceCode()).getBytes());
+                            byte[] bytes = redisUtil.get(("sms_water_"+monitorData.getDeviceCode()).getBytes());
                             if(bytes != null && bytes.length>0) {
                                 monitorDataEntity = (MonitorDataEntity) ByteArrayUtils.bytesToObject(bytes).get();}
                         }

+ 1 - 1
sms_water/src/main/resources/mapper/SceneMapper.xml

@@ -302,7 +302,7 @@
     </select>
     <!--根据场景id查询一级场景信息-->
     <select id="findParentSceneById" resultType="com.huaxu.entity.SceneEntity">
-        select t2.id as "parentSceneId",t2.scene_name as "parentScenename"
+        select t1.scene_name as "sceneName",t2.id as "parentSceneId",t2.scene_name as "parentSceneName"
         from sms_scene t1
         left join sms_scene t2 on substring_index(substring_index(t1.parent_scene_ids, ',', 2), ',', -1)=t2.id
         where t1.id=#{id}