public List <Abnormal> AbnormalNumber(string plantId, string id) { List <Abnormal> AbnormalList = new List <Abnormal>(); // string DBName = BeanTools.getPlantDB(plantId).realTimeDB; Plant plant = BeanTools.getPlantDB(plantId); string DBName = plant.realTimeDB; if (!string.IsNullOrEmpty(id) && DBName.Length > 13) { IDao dao = new Dao(plant, false); string sql = string.Format("select m.AS_Equipment_ID,m.AS_Equipment_FileName,m.AS_Equipment_Name,m.AS_Equipment_State from PSOG_AS_Equipment m,PSOG_ProcessMonitorObject n where n.PSOG_MonitorObject_MSPCModelID='{0}'AND n.PSOG_MonitorObject_Name=m.AS_Equipment_Process AND n.PSOG_MonitorObject_Name=m.AS_Equipment_Process AND m.AS_Equipment_State=-1 ", id); DataSet ds = dao.executeQuery(sql.ToString()); if (BeanTools.DataSetIsNotNull(ds)) { foreach (DataRow dr in ds.Tables[0].Rows) { Abnormal node = new Abnormal(); node.AS_Equipment_ID = BeanTools.ObjectToString(dr["AS_Equipment_ID"]); node.AS_Equipment_Name = BeanTools.ObjectToString(dr["AS_Equipment_Name"]); node.AS_Equipment_State = BeanTools.ObjectToString(dr["AS_Equipment_State"]); //node.AS_Equipment_FileName = BeanTools.ObjectToString(dr["AS_Equipment_FileName"]); AbnormalList.Add(node); } } } return(AbnormalList); }
protected void Page_Load(object sender, EventArgs e) { DateTime time = DateTime.Now; String plantId = Request.QueryString["plantId"]; plantId = null == plantId ? "" : plantId; string DBName = BeanTools.getPlantDB(plantId).historyDB; //数据库名 Plant plant = BeanTools.getPlantDB(plantId); endTime = Request.QueryString["endTime"]; endTime = null == endTime?time.ToString("yyyy-MM-dd HH:mm:ss") : endTime; startTime = Request.QueryString["startTime"]; startTime = null == startTime?time.AddHours(-12).ToString("yyyy-MM-dd HH:mm:ss") : startTime; String tableName = Request.QueryString["tableName"]; tableName = null == tableName ? "" : tableName; //表名 String upLine = Request.QueryString["upLine"]; String downLine = Request.QueryString["downLine"]; chartStr = new AlarmAnalysis().alarmAnychartLine3(plant, startTime, endTime, tableName, upLine, downLine); }
protected void Page_Load(object sender, EventArgs e) { String modelId = Request.QueryString["modelId"]; modelId = null == modelId ? "" : modelId; String plantId = Request.QueryString["plantCode"]; plantId = null == plantId ? "" : plantId; string DBName = BeanTools.getPlantDB(plantId).historyDB; //数据库名 Plant plant = BeanTools.getPlantDB(plantId); IList list = new ArrayList(); list = new AlarmAnalysis().ftaModelTags(plant, id2ModelId[int.Parse(modelId) - 1]); pcaModelJson = BeanTools.ToJson(list); string ftaStateTemp = ""; ftaStateTemp = new AlarmAnalysis().FaultTreeResultById(plant, id2ModelId[int.Parse(modelId) - 1]); ftaState = ftaStateTemp.Split(',')[0]; ftaStateStartTime = ftaStateTemp.Split(',')[1]; EasyUIData grid = new AlarmAnalysis().ftaAbnormalHistory(plant, id2ModelId[int.Parse(modelId) - 1]); ftaHistory = BeanTools.ToJson(grid); }
protected void Page_Load(object sender, EventArgs e) { DateTime time = DateTime.Now; String plantCode = Request.QueryString["plantCode"]; // String plantId = Request.QueryString["plantId"]; String DBName = BeanTools.getPlantDB(plantCode).historyDB; Plant plant = BeanTools.getPlantDB(plantCode); endTime = Request.QueryString["endTime"]; endTime = null == endTime?time.ToString("yyyy-MM-dd HH:mm:ss") : endTime; startTime = Request.QueryString["startTime"]; startTime = null == startTime?time.AddDays(-1).ToString("yyyy-MM-dd HH:mm:ss") : startTime; String modelId = Request.QueryString["modelId"]; modelId = null == modelId ? "" : modelId; //表名 //String url = "%process_monitor_state.aspx?modelId=" + modelId +"&plantCode=" + plantCode; String url = "%process_monitor_state.aspx?modelId=" + modelId + "&%"; //String modelName = Request.QueryString["modelName"]; String modelName = Common.getEquipName(plant, url); modelName = null == modelName ? "" : modelName; //表名 chartStr = new AlarmAnalysis().alarmNotIEMchartLine(plant, startTime, endTime, modelId, modelName); }
protected void Page_Load(object sender, EventArgs e) { String plantId = Request.QueryString["plantId"]; string DBName = BeanTools.getPlantDB(plantId).realTimeDB; Plant plant = BeanTools.getPlantDB(plantId); dataJson = new ArtTch().produceJson(plant); }
protected void Page_Load(object sender, EventArgs e) { String plantId = Request.Form["plantId"]; string DBName = BeanTools.getPlantDB(plantId).realTimeDB; Plant plant = BeanTools.getPlantDB(plantId); MainPage mainPage = new MainPage(); String returnStr = mainPage.getNewPageJson(plant); Response.Write(returnStr); }
protected void Page_Load(object sender, EventArgs e) { String plantId = Request.QueryString["plantId"]; plantId = null == plantId ? "" : plantId; String DBName = BeanTools.getPlantDB(plantId).realTimeDB; Plant plant = BeanTools.getPlantDB(plantId); list = new DeviceTch().loadEquipmentFuntion(plant); }
public String functionNos = ""; //主页要显示的各功能表单 形式如002,003;002代表工艺检测 protected void Page_Load(object sender, EventArgs e) { String plantId = Request.QueryString["plantId"]; string DBName = BeanTools.getPlantDB(plantId).realTimeDB; Plant plant = BeanTools.getPlantDB(plantId); string userId = ((SysUser)Session[CommonStr.session_user]).userId; jsonStr = new MainPage().getPageJson(plant); //ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert(1);window.onload = show('" + jsonStr + "')", true); //添加数据 functionNos = new SysManage().qryFunctionNos(userId); }
protected void Page_Load(object sender, EventArgs e) { String plantId = Request.QueryString["plantId"]; plantId = null == plantId ? "" : plantId; plantName = new SysManage().getPlantName(plantId); string DBName = BeanTools.getPlantDB(plantId).historyDB; //数据库名 Plant plant = BeanTools.getPlantDB(plantId); jsonStr = new AlarmAnalysis().FaultTreeResult(plant); }
protected void Page_Load(object sender, EventArgs e) { String plantId = Request.QueryString["plantId"]; string DBName = BeanTools.getPlantDB(plantId).realTimeDB; Plant plant = BeanTools.getPlantDB(plantId); list = new ArtTch().loadEquipmentFuntion(plant); string userId = ((SysUser)Session[CommonStr.session_user]).userId; functionList = new SysManage().qryFunctionNodeWithArt(userId); }
public String functionNos = ""; //主页要显示的各功能表单 形式如002,003;002代表工艺检测 protected void Page_Load(object sender, EventArgs e) { String plantId = Request.QueryString["plantId"]; string userId = ((SysUser)Session[CommonStr.session_user]).userId; string DBName = BeanTools.getPlantDB(plantId).realTimeDB; plantName = BeanTools.getPlantDB(plantId).organtreeName; Plant plant = BeanTools.getPlantDB(plantId); jsonStr = new MainPage().getPageJson(plant); functionNos = new SysManage().qryFunctionNos(userId); }
protected void Page_Load(object sender, EventArgs e) { DateTime time = DateTime.Now; endTime = time.ToString("yyyy-MM-dd HH:mm:ss"); startTime = time.AddDays(-1).ToString("yyyy-MM-dd HH:mm:ss"); String plantId = Request.QueryString["plantId"]; string DBName = BeanTools.getPlantDB(plantId).realTimeDB; Plant plant = BeanTools.getPlantDB(plantId); string userId = ((SysUser)Session[CommonStr.session_user]).userId; jsonStr = new MainPage().getNewPageJson(plant); functionNos = new SysManage().qryFunctionNos(userId); }
protected void Page_Load(object sender, EventArgs e) { String modelId = Request.QueryString["modelId"]; string plantId = Request.QueryString["plantId"]; Plant plant = BeanTools.getPlantDB(plantId); String DBName = plant.realTimeDB; String hisDBName = plant.historyDB; try { Equipment equip = Common.getClickProcess(modelId, plant, plantId); dataStr[0] = new ArtTch().unusualConNode(equip.monitorObject_Name, plant); dataStr[1] = equip.monitorObject_Url; } catch { } }
//public string[] id2ModelId = { "7750", "7879", "7960", "7993", "8038", "7807", "7852", "9501", "9534", "9579", "8188", "8317", "8398", "8431", "8476", // "8245", "8626", "8755", "8836", "8869", "8914", "8683", "9064", "9193", "9274", "9307", "9352", "9121"}; protected void Page_Load(object sender, EventArgs e) { String modelId = Request.QueryString["modelId"]; modelId = null == modelId ? "" : modelId; String plantId = Request.QueryString["plantCode"]; plantId = null == plantId ? "" : plantId; string DBName = BeanTools.getPlantDB(plantId).historyDB; //数据库名 Plant plant = BeanTools.getPlantDB(plantId); //关键变量状态 IList list = new ArrayList(); list = new AlarmAnalysis().ftaModelTags(plant, modelId); pcaModelJson = BeanTools.ToJson(list); string ftaStateTemp = ""; ftaStateTemp = new AlarmAnalysis().FaultTreeResultById(plant, modelId); ftaState = ftaStateTemp.Split(',')[0]; ftaStateStartTime = ftaStateTemp.Split(',')[1]; ftaName = ftaStateTemp.Split(',')[2]; ftaJson = new AlarmAnalysis().FaultTreeJsonById(plant, modelId); FileStream fs = new FileStream(Request.PhysicalApplicationPath + "aspx\\FT_Jsons\\" + modelId + ".html", FileMode.OpenOrCreate, FileAccess.ReadWrite); StreamWriter m_StreamWriter = new StreamWriter(fs); m_StreamWriter.BaseStream.Seek(0, SeekOrigin.Begin); m_StreamWriter.Write(ftaJson); m_StreamWriter.Flush(); m_StreamWriter.Close(); fs.Close(); //ftaJson = BeanTools.ToJson(ftaJson); EasyUIData grid = new AlarmAnalysis().ftaAbnormalHistory(plant, "" + (int.Parse(modelId) + 1)); ftaHistory = BeanTools.ToJson(grid); }
protected void Page_Load(object sender, EventArgs e) { DateTime time = DateTime.Now; string plantId = Request.QueryString["plantId"]; String DBName = BeanTools.getPlantDB(plantId).historyDB;; //数据库名 Plant plant = BeanTools.getPlantDB(plantId); endTime = Request.QueryString["endTime"]; endTime = null == endTime?time.ToString("yyyy-MM-dd HH:mm:ss") : endTime; startTime = Request.QueryString["startTime"]; startTime = null == startTime?time.AddDays(-1).ToString("yyyy-MM-dd HH:mm:ss") : startTime; compAnaly = new AlarmAnalysis().comprehensiveAnaysis(startTime, endTime, plant); string pageid = Request.QueryString["sys_menu_code"]; string userId = ((SysUser)Session[CommonStr.session_user]).userId; list = new SysManage().qryListLimit(userId, pageid); }
protected void Page_Load(object sender, EventArgs e) { DateTime time = DateTime.Now; String plantId = Request.QueryString["plantId"]; plantId = null == plantId ? "" : plantId; string DBName = BeanTools.getPlantDB(plantId).historyDB; //数据库名 Plant plant = BeanTools.getPlantDB(plantId); string midTime = Request.QueryString["time"]; if (!string.IsNullOrEmpty(midTime)) { time = Convert.ToDateTime(midTime); endTime = time.AddHours(6).ToString("yyyy-MM-dd HH:mm:ss"); startTime = time.AddHours(-6).ToString("yyyy-MM-dd HH:mm:ss"); } else { endTime = Request.QueryString["endTime"]; endTime = null == endTime?time.ToString("yyyy-MM-dd HH:mm:ss") : endTime; startTime = Request.QueryString["startTime"]; startTime = null == startTime?time.AddHours(-12).ToString("yyyy-MM-dd HH:mm:ss") : startTime; } String tableName = Request.QueryString["tableName"]; tableName = null == tableName ? "" : tableName; //表名 String tagId = Request.QueryString["tagId"]; tagId = null == tagId ? "" : tagId; //仪器主键 chartStr = new AlarmAnalysis().alarmMonitorchartLine(plant, startTime, endTime, tableName, tagId); }