Пример #1
0
        //获取竖井最高温度  //
        public string GetMaxTempByDID()
        {
            StringBuilder sbtitle = new StringBuilder();

            sbtitle.Append("<div class=\"station_room_monitor_top\">");
            string strsql = "select top 1 AlarmAddress,AlarmArea,AlarmValue,ALarmType,AlarmState from t_AlarmTable_en where AlarmState>0 and (did >= 422 and did <= 437 or did = 397) order by AlarmState desc,AlarmValue desc";
            //判断是否存在报警数据
            List <AlarmInfo> alist = bll.ExecuteStoreQuery <AlarmInfo>(strsql).ToList();

            if (alist.Count > 0)
            {
                AlarmInfo alarm = alist.First();
                sbtitle.Append("<h2>" + alarm.ALarmType + "</h2>");
                sbtitle.Append("<span>设备运行状况</span></div>");

                sbtitle.Append("<div class=\"station_room_monitor_hr state_bg_" + alarm.AlarmState + "\"></div>");
                sbtitle.Append("<div class=\"station_room_monitor_content\"><strong>HT:<h1 class=\"state_fc_" + alarm.AlarmState + "\">" + alarm.AlarmValue + "℃</h1><br />" + alarm.AlarmArea + "<br />" + alarm.AlarmAddress + "</strong>");
            }
            else
            {
                //获取配电房最高温度
                strsql = "select top 1 Position AlarmAddress,DeviceName AlarmArea,PV AlarmValue,'正常' ALarmType,0 AlarmState  from V_DeviceInfoState_PDR1 where (did >= 422 and did <= 437 or did = 397) and DataTypeID=1 order by PV desc,TagID";
                alist  = bll.ExecuteStoreQuery <AlarmInfo>(strsql).ToList();
                if (alist.Count > 0)
                {
                    AlarmInfo alarm = alist.First();
                    sbtitle.Append("<h2>正常</h2>");
                    sbtitle.Append(" <span>设备运行状况</span></div>");
                    sbtitle.Append("<div class=\"station_room_monitor_hr\"></div>");
                    sbtitle.Append("<div class=\"station_room_monitor_content\"><strong>HT:<h1 class=\"state_fc_0\">" + alarm.AlarmValue + "℃</h1><br />" + alarm.AlarmArea + "<br />" + alarm.AlarmAddress + "</strong>");
                }
                else
                {
                    sbtitle.Append("<h2>正常</h2>");
                    sbtitle.Append(" <span>设备运行状况</span></div>");
                    sbtitle.Append("<div class=\"station_room_monitor_hr\"></div>");
                    sbtitle.Append("<div class=\"station_room_monitor_content\"><strong>HT:<h1 class=\"state_fc_0\"> N/A</h1><br /></strong>");
                }
            }
            //获取室内环境温度
            strsql = "select top 1 Position AlarmAddress,DeviceName AlarmArea,PV AlarmValue,'正常' ALarmType,0 AlarmState from V_DeviceInfoState_PDR1 where (did >= 422 and did <= 437 or did = 397) and DataTypeID=12 order by PV desc,TagID";
            alist  = bll.ExecuteStoreQuery <AlarmInfo>(strsql).ToList();
            if (alist.Count > 0)
            {
                AlarmInfo alarm = alist.First();
                sbtitle.Append("<span>负荷:N/A</span> <span>环境温度:" + alarm.AlarmValue + "℃</span></div>");
            }
            else
            {
                sbtitle.Append("<span>负荷:N/A</span> <span>环境温度:N/A</span></div>");
            }
            sbtitle.Append("</div></div>");
            return(sbtitle.ToString());
        }
Пример #2
0
 public RoomInfo(AlarmInfo alarm, TempInfo tempInfo)
 {
     // TODO: Complete member initialization
     this.alarm    = alarm;
     this.tempInfo = tempInfo;
 }