/// <summary> /// 请求数据 /// </summary> void RequestData() { CommonDAO commonDAO = CommonDAO.GetInstance(); string value = string.Empty, machineCode = string.Empty; List <HtmlDataItem> datas = new List <HtmlDataItem>(); List <InfEquInfHitch> equInfHitchs = new List <InfEquInfHitch>(); #region 化验室网络管理 datas.Clear(); machineCode = GlobalVars.MachineCode_JoinBacth; List <CmcsSignalData> list = commonDAO.GetInfTbqcjxcyPackingBatchCoord(); string str = ""; foreach (CmcsSignalData item in list) { if (item.Remark == "已使用") { str += item.SignalName + "," + item.Remark + "," + item.SignalValue + "," + dataFormat(item.UpdateTime) + "|"; } else { str += item.SignalName + "," + item.Remark + "," + item.SignalValue + ", |"; } } datas.Add(new HtmlDataItem("样品状态", str.TrimEnd('|'), eHtmlDataItemType.svg_text)); DataTable dt = commonDAO.GetSqlDatas(string.Format("select t.machinecode,t.hitchtime,t.hitchdescribe from InfTbEquinFhitch t where t.machinecode = '{0}' and to_char(t.hitchtime,'yyyy-mm-dd') = to_char(sysdate,'yyyy-mm-dd') ", machineCode)); str = ""; foreach (DataRow dr in dt.Rows) { str += dr["machinecode"] + ","; str += dataFormat(Convert.ToDateTime(dr["hitchtime"])) + ","; str += dr["hitchdescribe"] + "|"; } datas.Add(new HtmlDataItem("异常信息", str.TrimEnd('|'), eHtmlDataItemType.svg_text)); datas.Add(new HtmlDataItem("系统", commonDAO.GetSignalDataValue("矩阵合样归批机", "程序状态"), eHtmlDataItemType.svg_text)); datas.Add(new HtmlDataItem("X轴坐标", commonDAO.GetSignalDataValue("矩阵合样归批机", "X轴实时位置"), eHtmlDataItemType.svg_text)); datas.Add(new HtmlDataItem("Y轴坐标", commonDAO.GetSignalDataValue("矩阵合样归批机", "Y轴实时位置"), eHtmlDataItemType.svg_text)); datas.Add(new HtmlDataItem("Z轴坐标", commonDAO.GetSignalDataValue("矩阵合样归批机", "Z轴实时位置"), eHtmlDataItemType.svg_text)); #endregion // 发送到页面 cefWebBrowser.Browser.GetMainFrame().ExecuteJavaScript("requestData(" + Newtonsoft.Json.JsonConvert.SerializeObject(datas) + ");", "", 0); }