예제 #1
0
        /// <summary>
        /// 根据批次Id加载采样单列表
        /// </summary>
        /// <param name="superGridControl"></param>
        /// <param name="batchId"></param>
        private void LoadRCSamplingList(SuperGridControl superGridControl, string batchId)
        {
            this.CurrentRCSampling = null;

            List <CmcsRCSampling> list = MonitorDAO.GetInstance().GetSamplings(batchId);

            superGridControl.PrimaryGrid.DataSource = list;
        }
예제 #2
0
        /// <summary>
        /// 绑定集样罐信息
        /// </summary>
        /// <param name="superGridControl"></param>
        /// <param name="machineCode">设备编码</param>
        private void BindBeltSampleBarrel(SuperGridControl superGridControl, string machineCode)
        {
            List <CmcsEquInfSampleBarrel> list = MonitorDAO.GetInstance().GetEquInfSampleBarrels(machineCode);

            superGridControl.PrimaryGrid.DataSource = list;

            dicCellColors.Clear();

            foreach (CmcsEquInfSampleBarrel cmcsequinfsamplebarrel in list)
            {
                if (string.IsNullOrEmpty(cmcsequinfsamplebarrel.SampleCode))
                {
                    continue;
                }
                string key = cmcsequinfsamplebarrel.SampleCode;

                if (!dicCellColors.ContainsKey(key) && dicCellColors.Count < CellColors.Length)
                {
                    dicCellColors.Add(key, CellColors[dicCellColors.Count]);
                }
            }
        }
예제 #3
0
        private void GetmachineInfo(CommonDAO commonDAO, string machineCode, List <HtmlDataItem> datas, string type)
        {
            string    value = "", carNumber = "", kfl = "";
            string    cym   = commonDAO.GetSignalDataValue(machineCode, "采样编码");
            string    cphid = commonDAO.GetSignalDataValue(machineCode, "当前车Id");
            string    sql   = string.Format(@"select b.ticketweight from cmcstbrcsampling d 
                left join fultbinfactorybatch c on c.id = d.infactorybatchid
                left join fultbtransport b on b.infactorybatchid = c.id 
                where d.samplecode = '{0}' and b.id = '{1}' ", cym, cphid);
            DataTable dt    = commonDAO.GetSqlDatas(sql);

            if (dt != null && dt.Rows.Count > 0)
            {
                kfl = dt.Rows[0][0].ToString();
            }

            datas.Add(new HtmlDataItem("采样机" + type + "_采样编码", cym, eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("采样机" + type + "_矿发量", kfl, eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("采样机" + type + "_车牌号", commonDAO.GetSignalDataValue(machineCode, "当前车号"), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("采样机" + type + "_开始时间", commonDAO.GetSignalDataValue(machineCode, "采样人"), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("采样机" + type + "_采样点数", commonDAO.GetSignalDataValue(machineCode, "采样点数"), eHtmlDataItemType.svg_text));

            value = commonDAO.GetSignalDataValue(machineCode, eSignalDataName.设备状态.ToString());
            if ("|就绪待机|系统就绪|准备就绪|".Contains("|" + value + "|"))
            {
                datas.Add(new HtmlDataItem("采样机" + type + "_系统", "#00c000", eHtmlDataItemType.svg_color));
            }
            else if ("|正在运行|正在卸样|系统运行|".Contains("|" + value + "|"))
            {
                datas.Add(new HtmlDataItem("采样机" + type + "_系统", "#ff0000", eHtmlDataItemType.svg_color));
            }
            else if ("|发生故障|系统故障|".Contains("|" + value + "|"))
            {
                datas.Add(new HtmlDataItem("采样机" + type + "_系统", "#ffff00", eHtmlDataItemType.svg_color));
            }
            else
            {
                datas.Add(new HtmlDataItem("采样机" + type + "_系统", "#c0c0c0", eHtmlDataItemType.svg_color));
            }

            carNumber = commonDAO.GetSignalDataValue(machineCode, "车牌号");
            if (string.IsNullOrEmpty(carNumber))
            {
                datas.Add(new HtmlDataItem("Car" + type, "false", eHtmlDataItemType.svg_visible));
            }
            else
            {
                CmcsAutotruck autotruck = CommonDAO.GetInstance().GetAutotruckByCarNumber(carNumber);
                if (autotruck != null)
                {
                    if (PreviewCarCarriage(autotruck, type))
                    {
                        datas.Add(new HtmlDataItem("Car" + type, "true", eHtmlDataItemType.svg_visible));
                    }
                    else
                    {
                        datas.Add(new HtmlDataItem("Car" + type, "false", eHtmlDataItemType.svg_visible));
                    }
                }
                else
                {
                    datas.Add(new HtmlDataItem("Car" + type, "false", eHtmlDataItemType.svg_visible));
                }
            }
            value = GetColor(commonDAO.GetSignalDataValue(machineCode, "采样头"));
            datas.Add(new HtmlDataItem("采样机" + type + "_小车1", value != "" ? value : "url(#SVGID_8_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("采样机" + type + "_小车2", value != "" ? value : "url(#SVGID_6_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("采样机" + type + "_小车3", value != "" ? value : "url(#SVGID_7_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("采样机" + type + "_小车4", value != "" ? value : "url(#SVGID_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("采样机" + type + "_小车5", value != "" ? value : "url(#SVGID_3_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("采样机" + type + "_小车6", value != "" ? value : "url(#SVGID_4_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("采样机" + type + "_小车7", value != "" ? value : "url(#SVGID_5_)", eHtmlDataItemType.svg_color));

            value = GetColor(commonDAO.GetSignalDataValue(machineCode, "采样头"));
            datas.Add(new HtmlDataItem("采样机" + type + "_接料斗1", value != "" ? value : "url(#_164344952_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("采样机" + type + "_接料斗2", value != "" ? value : "url(#_130855712_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("采样机" + type + "_接料斗3", value != "" ? value : "url(#_164355560_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("采样机" + type + "_接料斗4", value != "" ? value : "url(#_164351936_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("采样机" + type + "_接料斗5", value != "" ? value : "#A9A9A9", eHtmlDataItemType.svg_color));

            value = GetColor(commonDAO.GetSignalDataValue(machineCode, "给料皮带"));
            datas.Add(new HtmlDataItem("采样机" + type + "_给料皮带", value != "" ? value : "#808080", eHtmlDataItemType.svg_color));

            value = GetColor(commonDAO.GetSignalDataValue(machineCode, "锤式破碎机"));
            datas.Add(new HtmlDataItem("采样机" + type + "_锤式破碎机1", value != "" ? value : "url(#_125277864-0_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("采样机" + type + "_锤式破碎机2", value != "" ? value : "url(#_164348960_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("采样机" + type + "_锤式破碎机3", value != "" ? value : "url(#_130859336_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("采样机" + type + "_锤式破碎机4", value != "" ? value : "url(#_130854176_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("采样机" + type + "_锤式破碎机5", value != "" ? value : "url(#_130859336-4_2_)", eHtmlDataItemType.svg_color));

            value = GetColor(commonDAO.GetSignalDataValue(machineCode, "缩分皮带"));
            datas.Add(new HtmlDataItem("采样机" + type + "_缩分皮带", value != "" ? value : "#808080", eHtmlDataItemType.svg_color));

            // 集样罐
            List <InfEquInfSampleBarrel> barrels2 = MonitorDAO.GetInstance().GetEquInfSampleBarrels(machineCode);

            datas.Add(new HtmlDataItem("采样机" + type + "_集样罐", Newtonsoft.Json.JsonConvert.SerializeObject(barrels2.Select(a => new { BarrelNumber = a.BarrelNumber, IsCurrent = a.IsCurrent, BarrelStatus = a.BarrelStatus, SampleCount = a.SampleCount })), eHtmlDataItemType.json_data));
        }
예제 #4
0
        /// <summary>
        /// 绑定集样罐信息
        /// </summary>
        /// <param name="superGridControl"></param>
        /// <param name="machineCode">设备编码</param>
        private void BindBeltSampleBarrel(SuperGridControl superGridControl, string machineCode)
        {
            List <InfEquInfSampleBarrel> list = MonitorDAO.GetInstance().GetEquInfSampleBarrels(machineCode);

            superGridControl.PrimaryGrid.DataSource = list;
        }
예제 #5
0
        private void getPDCYJ(CommonDAO commonDAO, ref string value, string machineCode, List <HtmlDataItem> datas, string type)
        {
            string kfl = "";
            string cym = commonDAO.GetSignalDataValue(machineCode, "采样编码");

            datas.Add(new HtmlDataItem(type + "_采样编码", cym, eHtmlDataItemType.svg_text));
            string    sql = string.Format(@"select c.ticketqty from cmcstbrcsampling d 
                left join fultbinfactorybatch c on c.id = d.infactorybatchid
                where d.samplecode = '{0}'", cym);
            DataTable dt  = commonDAO.GetSqlDatas(sql);

            if (dt != null && dt.Rows.Count > 0)
            {
                kfl = dt.Rows[0][0].ToString();
            }

            datas.Add(new HtmlDataItem(type + "_矿发量", kfl, eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem(type + "_开始时间", commonDAO.GetSignalDataValue(machineCode, "开始时间"), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem(type + "_来煤车数", commonDAO.GetSignalDataValue(machineCode, "来煤车数"), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem(type + "_采样次数", commonDAO.GetSignalDataValue(machineCode, "采样次数"), eHtmlDataItemType.svg_text));

            // 集样罐
            List <InfEquInfSampleBarrel> barrels1 = MonitorDAO.GetInstance().GetEquInfSampleBarrels(machineCode, eEquInfGatherType.底卸式.ToString());

            datas.Add(new HtmlDataItem(type + "_底卸集样罐", Newtonsoft.Json.JsonConvert.SerializeObject(barrels1.Select(a => new { BarrelNumber = a.BarrelNumber, IsCurrent = a.IsCurrent, BarrelStatus = a.BarrelStatus, SampleCount = a.SampleCount })), eHtmlDataItemType.json_data));
            barrels1 = MonitorDAO.GetInstance().GetEquInfSampleBarrels(machineCode, eEquInfGatherType.密码罐.ToString());
            datas.Add(new HtmlDataItem(type + "_密码集样罐", Newtonsoft.Json.JsonConvert.SerializeObject(barrels1.Select(a => new { BarrelNumber = a.BarrelNumber, IsCurrent = a.IsCurrent, BarrelStatus = a.BarrelStatus, SampleCount = a.SampleCount })), eHtmlDataItemType.json_data));

            value = commonDAO.GetSignalDataValue(machineCode, eSignalDataName.序状态.ToString());
            if ("|就绪待机|".Contains("|" + value + "|"))
            {
                datas.Add(new HtmlDataItem(type + "系统", "#00c000", eHtmlDataItemType.svg_color));
            }
            else if ("|正在运行|正在卸样|".Contains("|" + value + "|"))
            {
                datas.Add(new HtmlDataItem(type + "系统", "#ff0000", eHtmlDataItemType.svg_color));
            }
            else if ("|发生故障|".Contains("|" + value + "|"))
            {
                datas.Add(new HtmlDataItem(type + "系统", "#ffff00", eHtmlDataItemType.svg_color));
            }
            else
            {
                datas.Add(new HtmlDataItem(type + "系统", "#c0c0c0", eHtmlDataItemType.svg_color));
            }

            value = GetColor(commonDAO.GetSignalDataValue(machineCode, "初级采样机"));
            datas.Add(new HtmlDataItem(type + "输煤皮带", value != "" ? value : "#808080", eHtmlDataItemType.svg_color));

            value = GetColor(commonDAO.GetSignalDataValue(machineCode, "初级给料机"));
            datas.Add(new HtmlDataItem(type + "初级给料", value != "" ? value : "#808080", eHtmlDataItemType.svg_color));

            value = GetColor(commonDAO.GetSignalDataValue(machineCode, "破碎机"));
            datas.Add(new HtmlDataItem(type + "初级破碎1", value != "" ? value : "url(#linearGradient5969-9)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem(type + "初级破碎2", value != "" ? value : "url(#linearGradient5919-2)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem(type + "初级破碎3", value != "" ? value : "url(#linearGradient5921-4)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem(type + "初级破碎4", value != "" ? value : "url(#linearGradient5923-5)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem(type + "初级破碎5", value != "" ? value : "url(#linearGradient5925-5)", eHtmlDataItemType.svg_color));

            value = GetColor(commonDAO.GetSignalDataValue(machineCode, "二级给料机"));
            datas.Add(new HtmlDataItem(type + "次级给料", value != "" ? value : "#808080", eHtmlDataItemType.svg_color));

            value = GetColor(commonDAO.GetSignalDataValue(machineCode, "密码罐缩分器"));
            datas.Add(new HtmlDataItem(type + "密码罐缩分器1", value != "" ? value : "url(#linearGradient7572)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem(type + "密码罐缩分器2", value != "" ? value : "url(#linearGradient5931-6)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem(type + "密码罐缩分器3", value != "" ? value : "url(#linearGradient6946)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem(type + "密码罐缩分器4", value != "" ? value : "url(#linearGradient5939-1)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem(type + "密码罐缩分器5", value != "" ? value : "url(#linearGradient5941-4)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem(type + "密码罐缩分器6", value != "" ? value : "url(#linearGradient5905-1)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem(type + "密码罐缩分器7", value != "" ? value : "url(#linearGradient7623)", eHtmlDataItemType.svg_color));

            value = GetColor(commonDAO.GetSignalDataValue(machineCode, "底卸料缩分器"));
            datas.Add(new HtmlDataItem(type + "底卸料缩分器1", value != "" ? value : "url(#linearGradient7568-1)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem(type + "底卸料缩分器2", value != "" ? value : "url(#linearGradient5931-6)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem(type + "底卸料缩分器3", value != "" ? value : "url(#linearGradient6946-2)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem(type + "底卸料缩分器4", value != "" ? value : "url(#linearGradient5939-1)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem(type + "底卸料缩分器5", value != "" ? value : "url(#linearGradient5941-4)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem(type + "底卸料缩分器6", value != "" ? value : "url(#linearGradient5905-1)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem(type + "底卸料缩分器7", value != "" ? value : "url(#linearGradient7623-7)", eHtmlDataItemType.svg_color));
        }
예제 #6
0
        /// <summary>
        /// 请求数据
        /// </summary>
        void RequestData()
        {
            CommonDAO             commonDAO = CommonDAO.GetInstance();
            MonitorDAO            monitorDAO = MonitorDAO.GetInstance();
            string                value = string.Empty, machineCode1 = string.Empty, machineCode2 = string.Empty;
            List <HtmlDataItem>   datas        = new List <HtmlDataItem>();
            List <InfEquInfHitch> equInfHitchs = new List <InfEquInfHitch>();

            #region 翻车机

            datas.Clear();
            machineCode1 = GlobalVars.MachineCode_TrunOver_1;
            machineCode2 = GlobalVars.MachineCode_TrunOver_2;

            datas.Add(new HtmlDataItem("翻车机1_正翻", ConvertMachineStatusToColor(commonDAO.GetSignalDataValue(machineCode1, "正翻")), eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("翻车机1_反翻", ConvertMachineStatusToColor(commonDAO.GetSignalDataValue(machineCode1, "反翻")), eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("翻车机1_重调原位", ConvertMachineStatusToColor(commonDAO.GetSignalDataValue(machineCode1, "重调原位")), eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("翻车机1_正翻效果", ConvertMachineStatusToColor(commonDAO.GetSignalDataValue(machineCode1, "正翻")), eHtmlDataItemType.svg_Temp));
            datas.Add(new HtmlDataItem("翻车机1_反翻效果", ConvertMachineStatusToColor(commonDAO.GetSignalDataValue(machineCode1, "反翻")), eHtmlDataItemType.svg_Temp));
            datas.Add(new HtmlDataItem("翻车机1_转盘信号", ConvertMachineStatusToColor(commonDAO.GetSignalDataValue(machineCode1, "转盘信号")), eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("翻车机1_当前翻车车号", commonDAO.GetSignalDataValue(machineCode1, eSignalDataName.当前车号.ToString()), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("翻车机1_待翻车数", "待翻车数:" + commonDAO.GetSignalDataValue(machineCode1, "待翻车数"), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("翻车机1_已翻车数", "已翻车数:" + commonDAO.GetSignalDataValue(machineCode1, "已翻车数"), eHtmlDataItemType.svg_text));
            string trainWeightRecord1 = commonDAO.GetSignalDataValue(machineCode1, "当前车Id");
            // 此处 当前车Id 的值为火车入厂记录Id
            if (!string.IsNullOrEmpty(trainWeightRecord1))
            {
                DataTable dtl = monitorDAO.GetInFactoryBatchInfoByTrainWeightRecordId(trainWeightRecord1);
                if (dtl.Rows.Count > 0)
                {
                    datas.Add(new HtmlDataItem("翻车机1_供应商", dtl.Rows[0]["SupplierName"].ToString(), eHtmlDataItemType.svg_text));
                    datas.Add(new HtmlDataItem("翻车机1_发站", dtl.Rows[0]["StationName"].ToString(), eHtmlDataItemType.svg_text));
                    datas.Add(new HtmlDataItem("翻车机1_矿点", dtl.Rows[0]["MineName"].ToString(), eHtmlDataItemType.svg_text));
                    datas.Add(new HtmlDataItem("翻车机1_煤种", dtl.Rows[0]["FuelName"].ToString(), eHtmlDataItemType.svg_text));
                }
                else
                {
                    datas.Add(new HtmlDataItem("翻车机1_供应商", "", eHtmlDataItemType.svg_text));
                    datas.Add(new HtmlDataItem("翻车机1_发站", "", eHtmlDataItemType.svg_text));
                    datas.Add(new HtmlDataItem("翻车机1_矿点", "", eHtmlDataItemType.svg_text));
                    datas.Add(new HtmlDataItem("翻车机1_煤种", "", eHtmlDataItemType.svg_text));
                }
            }


            datas.Add(new HtmlDataItem("翻车机2_正翻", ConvertMachineStatusToColor(commonDAO.GetSignalDataValue(machineCode2, "正翻")), eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("翻车机2_反翻", ConvertMachineStatusToColor(commonDAO.GetSignalDataValue(machineCode2, "反翻")), eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("翻车机2_重调原位", ConvertMachineStatusToColor(commonDAO.GetSignalDataValue(machineCode2, "重调原位")), eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("翻车机2_正翻效果", ConvertMachineStatusToColor(commonDAO.GetSignalDataValue(machineCode1, "正翻")), eHtmlDataItemType.svg_Temp));
            datas.Add(new HtmlDataItem("翻车机2_反翻效果", ConvertMachineStatusToColor(commonDAO.GetSignalDataValue(machineCode1, "反翻")), eHtmlDataItemType.svg_Temp));
            datas.Add(new HtmlDataItem("翻车机2_转盘信号", ConvertMachineStatusToColor(commonDAO.GetSignalDataValue(machineCode2, "转盘信号")), eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("翻车机2_当前翻车车号", commonDAO.GetSignalDataValue(machineCode2, eSignalDataName.当前车号.ToString()), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("翻车机2_待翻车数", "待翻车数:" + commonDAO.GetSignalDataValue(machineCode2, "待翻车数"), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("翻车机2_已翻车数", "已翻车数:" + commonDAO.GetSignalDataValue(machineCode2, "已翻车数"), eHtmlDataItemType.svg_text));
            string trainWeightRecord2 = commonDAO.GetSignalDataValue(machineCode2, "当前车Id");
            // 此处 当前车Id 的值为火车入厂记录Id
            if (!string.IsNullOrEmpty(trainWeightRecord2))
            {
                DataTable dtl = monitorDAO.GetInFactoryBatchInfoByTrainWeightRecordId(trainWeightRecord2);
                if (dtl.Rows.Count > 0)
                {
                    datas.Add(new HtmlDataItem("翻车机2_供应商", dtl.Rows[0]["SupplierName"].ToString(), eHtmlDataItemType.svg_text));
                    datas.Add(new HtmlDataItem("翻车机2_发站", dtl.Rows[0]["StationName"].ToString(), eHtmlDataItemType.svg_text));
                    datas.Add(new HtmlDataItem("翻车机2_矿点", dtl.Rows[0]["MineName"].ToString(), eHtmlDataItemType.svg_text));
                    datas.Add(new HtmlDataItem("翻车机2_煤种", dtl.Rows[0]["FuelName"].ToString(), eHtmlDataItemType.svg_text));
                }
                else
                {
                    datas.Add(new HtmlDataItem("翻车机2_供应商", "", eHtmlDataItemType.svg_text));
                    datas.Add(new HtmlDataItem("翻车机2_发站", "", eHtmlDataItemType.svg_text));
                    datas.Add(new HtmlDataItem("翻车机2_矿点", "", eHtmlDataItemType.svg_text));
                    datas.Add(new HtmlDataItem("翻车机2_煤种", "", eHtmlDataItemType.svg_text));
                }
            }
            // 发送到页面
            cefWebBrowser.Browser.GetMainFrame().ExecuteJavaScript("requestData(" + Newtonsoft.Json.JsonConvert.SerializeObject(datas) + ");", "", 0);

            #endregion
        }
예제 #7
0
        /// <summary>
        /// 请求数据
        /// </summary>
        void RequestData()
        {
            CommonDAO             commonDAO = CommonDAO.GetInstance();
            MonitorDAO            monitorDAO = MonitorDAO.GetInstance();
            string                value = string.Empty, machineCode = string.Empty, machineCode2 = string.Empty;
            List <HtmlDataItem>   datas        = new List <HtmlDataItem>();
            List <InfEquInfHitch> equInfHitchs = new List <InfEquInfHitch>();

            #region 翻车机

            datas.Clear();

            #region 入厂
            machineCode = GlobalVars.MachineCode_QC_Queue_1;
            datas.Add(new HtmlDataItem("Infactory_State1", commonDAO.GetSignalDataValue(machineCode, "系统"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Infactory_State2", commonDAO.GetSignalDataValue(machineCode, "IO控制器_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Infactory_State3", commonDAO.GetSignalDataValue(machineCode, "LED屏1_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Infactory_State4", commonDAO.GetSignalDataValue(machineCode, "LED屏2_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Infactory_State5", commonDAO.GetSignalDataValue(machineCode, "抓拍相机_连接状态"), eHtmlDataItemType.json_data));
            #endregion

            #region 采样
            machineCode = GlobalVars.MachineCode_QC_JxSampler_1;
            datas.Add(new HtmlDataItem("Sample1_State1", commonDAO.GetSignalDataValue(machineCode, "系统"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Sample1_State2", commonDAO.GetSignalDataValue(machineCode, "IO控制器_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Sample1_State3", commonDAO.GetSignalDataValue(machineCode, "LED屏1_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Sample1_State4", commonDAO.GetSignalDataValue(machineCode, "LED屏2_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Sample1_State5", commonDAO.GetSignalDataValue(machineCode, "抓拍相机_连接状态"), eHtmlDataItemType.json_data));

            machineCode = GlobalVars.MachineCode_QC_JxSampler_2;
            datas.Add(new HtmlDataItem("Sample2_State1", commonDAO.GetSignalDataValue(machineCode, "系统"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Sample2_State2", commonDAO.GetSignalDataValue(machineCode, "IO控制器_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Sample2_State3", commonDAO.GetSignalDataValue(machineCode, "LED屏1_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Sample2_State4", commonDAO.GetSignalDataValue(machineCode, "LED屏2_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Sample2_State5", commonDAO.GetSignalDataValue(machineCode, "抓拍相机_连接状态"), eHtmlDataItemType.json_data));

            machineCode = GlobalVars.MachineCode_QC_JxSampler_3;
            datas.Add(new HtmlDataItem("Sample3_State1", commonDAO.GetSignalDataValue(machineCode, "系统"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Sample3_State2", commonDAO.GetSignalDataValue(machineCode, "IO控制器_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Sample3_State3", commonDAO.GetSignalDataValue(machineCode, "LED屏1_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Sample3_State4", commonDAO.GetSignalDataValue(machineCode, "LED屏2_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Sample3_State5", commonDAO.GetSignalDataValue(machineCode, "抓拍相机_连接状态"), eHtmlDataItemType.json_data));

            machineCode = GlobalVars.MachineCode_QC_JxSampler_4;
            datas.Add(new HtmlDataItem("Sample4_State1", commonDAO.GetSignalDataValue(machineCode, "系统"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Sample4_State2", commonDAO.GetSignalDataValue(machineCode, "IO控制器_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Sample4_State3", commonDAO.GetSignalDataValue(machineCode, "LED屏1_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Sample4_State4", commonDAO.GetSignalDataValue(machineCode, "LED屏2_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Sample4_State5", commonDAO.GetSignalDataValue(machineCode, "抓拍相机_连接状态"), eHtmlDataItemType.json_data));

            machineCode = GlobalVars.MachineCode_QC_JxSampler_5;
            datas.Add(new HtmlDataItem("Sample5_State1", commonDAO.GetSignalDataValue(machineCode, "系统"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Sample5_State2", commonDAO.GetSignalDataValue(machineCode, "IO控制器_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Sample5_State3", commonDAO.GetSignalDataValue(machineCode, "LED屏1_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Sample5_State4", commonDAO.GetSignalDataValue(machineCode, "LED屏2_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Sample5_State5", commonDAO.GetSignalDataValue(machineCode, "抓拍相机_连接状态"), eHtmlDataItemType.json_data));

            machineCode = GlobalVars.MachineCode_QC_JxSampler_6;
            datas.Add(new HtmlDataItem("Sample6_State1", commonDAO.GetSignalDataValue(machineCode, "系统"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Sample6_State2", commonDAO.GetSignalDataValue(machineCode, "IO控制器_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Sample6_State3", commonDAO.GetSignalDataValue(machineCode, "LED屏1_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Sample6_State4", commonDAO.GetSignalDataValue(machineCode, "LED屏2_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Sample6_State5", commonDAO.GetSignalDataValue(machineCode, "抓拍相机_连接状态"), eHtmlDataItemType.json_data));
            #endregion

            #region 汽车衡
            machineCode = GlobalVars.MachineCode_QC_Weighter_1;
            datas.Add(new HtmlDataItem("Weighter1_State1", commonDAO.GetSignalDataValue(machineCode, "系统"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter1_State2", commonDAO.GetSignalDataValue(machineCode, "IO控制器_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter1_State3", commonDAO.GetSignalDataValue(machineCode, "LED屏1_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter1_State4", commonDAO.GetSignalDataValue(machineCode, "LED屏2_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter1_State5", commonDAO.GetSignalDataValue(machineCode, "抓拍相机_连接状态"), eHtmlDataItemType.json_data));

            machineCode = GlobalVars.MachineCode_QC_Weighter_2;
            datas.Add(new HtmlDataItem("Weighter2_State1", commonDAO.GetSignalDataValue(machineCode, "系统"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter2_State2", commonDAO.GetSignalDataValue(machineCode, "IO控制器_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter2_State3", commonDAO.GetSignalDataValue(machineCode, "LED屏1_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter2_State4", commonDAO.GetSignalDataValue(machineCode, "LED屏2_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter2_State5", commonDAO.GetSignalDataValue(machineCode, "抓拍相机_连接状态"), eHtmlDataItemType.json_data));

            machineCode = GlobalVars.MachineCode_QC_Weighter_3;
            datas.Add(new HtmlDataItem("Weighter3_State1", commonDAO.GetSignalDataValue(machineCode, "系统"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter3_State2", commonDAO.GetSignalDataValue(machineCode, "IO控制器_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter3_State3", commonDAO.GetSignalDataValue(machineCode, "LED屏1_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter3_State4", commonDAO.GetSignalDataValue(machineCode, "LED屏2_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter3_State5", commonDAO.GetSignalDataValue(machineCode, "抓拍相机_连接状态"), eHtmlDataItemType.json_data));

            machineCode = GlobalVars.MachineCode_QC_Weighter_4;
            datas.Add(new HtmlDataItem("Weighter4_State1", commonDAO.GetSignalDataValue(machineCode, "系统"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter4_State2", commonDAO.GetSignalDataValue(machineCode, "IO控制器_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter4_State3", commonDAO.GetSignalDataValue(machineCode, "LED屏1_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter4_State4", commonDAO.GetSignalDataValue(machineCode, "LED屏2_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter4_State5", commonDAO.GetSignalDataValue(machineCode, "抓拍相机_连接状态"), eHtmlDataItemType.json_data));

            machineCode = GlobalVars.MachineCode_QC_Weighter_5;
            datas.Add(new HtmlDataItem("Weighter5_State1", commonDAO.GetSignalDataValue(machineCode, "系统"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter5_State2", commonDAO.GetSignalDataValue(machineCode, "IO控制器_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter5_State3", commonDAO.GetSignalDataValue(machineCode, "LED屏1_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter5_State4", commonDAO.GetSignalDataValue(machineCode, "LED屏2_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter5_State5", commonDAO.GetSignalDataValue(machineCode, "抓拍相机_连接状态"), eHtmlDataItemType.json_data));

            machineCode = GlobalVars.MachineCode_QC_Weighter_6;
            datas.Add(new HtmlDataItem("Weighter6_State1", commonDAO.GetSignalDataValue(machineCode, "系统"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter6_State2", commonDAO.GetSignalDataValue(machineCode, "IO控制器_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter6_State3", commonDAO.GetSignalDataValue(machineCode, "LED屏1_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter6_State4", commonDAO.GetSignalDataValue(machineCode, "LED屏2_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter6_State5", commonDAO.GetSignalDataValue(machineCode, "抓拍相机_连接状态"), eHtmlDataItemType.json_data));

            machineCode = GlobalVars.MachineCode_QC_Weighter_7;
            datas.Add(new HtmlDataItem("Weighter7_State1", commonDAO.GetSignalDataValue(machineCode, "系统"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter7_State2", commonDAO.GetSignalDataValue(machineCode, "IO控制器_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter7_State3", commonDAO.GetSignalDataValue(machineCode, "LED屏1_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter7_State4", commonDAO.GetSignalDataValue(machineCode, "LED屏2_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter7_State5", commonDAO.GetSignalDataValue(machineCode, "抓拍相机_连接状态"), eHtmlDataItemType.json_data));

            machineCode = GlobalVars.MachineCode_QC_Weighter_8;
            datas.Add(new HtmlDataItem("Weighter8_State1", commonDAO.GetSignalDataValue(machineCode, "系统"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter8_State2", commonDAO.GetSignalDataValue(machineCode, "IO控制器_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter8_State3", commonDAO.GetSignalDataValue(machineCode, "LED屏1_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter8_State4", commonDAO.GetSignalDataValue(machineCode, "LED屏2_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Weighter8_State5", commonDAO.GetSignalDataValue(machineCode, "抓拍相机_连接状态"), eHtmlDataItemType.json_data));

            #endregion

            #region 出厂
            machineCode = GlobalVars.MachineCode_QC_Out_1;
            datas.Add(new HtmlDataItem("Outfactory_State1", commonDAO.GetSignalDataValue(machineCode, "系统"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Outfactory_State2", commonDAO.GetSignalDataValue(machineCode, "IO控制器_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Outfactory_State3", commonDAO.GetSignalDataValue(machineCode, "LED屏1_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Outfactory_State4", commonDAO.GetSignalDataValue(machineCode, "LED屏2_连接状态"), eHtmlDataItemType.json_data));
            datas.Add(new HtmlDataItem("Outfactory_State5", commonDAO.GetSignalDataValue(machineCode, "抓拍相机_连接状态"), eHtmlDataItemType.json_data));
            #endregion

            // 发送到页面
            cefWebBrowser.Browser.GetMainFrame().ExecuteJavaScript("requestData(" + Newtonsoft.Json.JsonConvert.SerializeObject(datas) + ");", "", 0);

            #endregion
        }
예제 #8
0
        /// <summary>
        /// 请求数据
        /// </summary>
        void RequestData()
        {
            string value = string.Empty, machineCode = string.Empty;
            List <HtmlDataItem>   datas        = new List <HtmlDataItem>();
            List <InfEquInfHitch> equInfHitchs = new List <InfEquInfHitch>();

            #region 汽车机械采样机 #1

            datas.Clear();
            machineCode = this.CurrentMachineCode;

            datas.Add(new HtmlDataItem("机械采样机_当前采样机", machineCode, eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("1号机械采样机_系统", monitorCommon.ConvertMachineStatusToColor(commonDAO.GetSignalDataValue(GlobalVars.MachineCode_QCJXCYJ_1, eSignalDataName.系统.ToString())), eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("2号机械采样机_系统", monitorCommon.ConvertMachineStatusToColor(commonDAO.GetSignalDataValue(GlobalVars.MachineCode_QCJXCYJ_2, eSignalDataName.系统.ToString())), eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("3号机械采样机_系统", monitorCommon.ConvertMachineStatusToColor(commonDAO.GetSignalDataValue(GlobalVars.MachineCode_QCJXCYJ_3, eSignalDataName.系统.ToString())), eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_采样编码", commonDAO.GetSignalDataValue(machineCode, eSignalDataName.采样编码.ToString()), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("机械采样机_矿发量", commonDAO.GetSignalDataValue(machineCode, eSignalDataName.矿发量.ToString()), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("机械采样机_采样时间", commonDAO.GetSignalDataValue(machineCode, eSignalDataName.采样时间.ToString()), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("机械采样机_车牌号", commonDAO.GetSignalDataValue(machineCode, eSignalDataName.当前车号.ToString()), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("机械采样机_采样点数", commonDAO.GetSignalDataValue(machineCode, eSignalDataName.采样点数.ToString()), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("机械采样机_小车1", commonDAO.GetSignalDataValue(machineCode, "小车") == "1" ? "Red" : "url(#rect1770_1_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_小车2", commonDAO.GetSignalDataValue(machineCode, "小车") == "1" ? "Red" : "url(#rect1752_1_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_小车3", commonDAO.GetSignalDataValue(machineCode, "小车") == "1" ? "Red" : "url(#rect1761_1_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_小车4", commonDAO.GetSignalDataValue(machineCode, "小车") == "1" ? "Red" : "url(#rect1716_1_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_小车5", commonDAO.GetSignalDataValue(machineCode, "小车") == "1" ? "Red" : "url(#rect1725_1_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_小车6", commonDAO.GetSignalDataValue(machineCode, "小车") == "1" ? "Red" : "url(#rect1734_1_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_小车7", commonDAO.GetSignalDataValue(machineCode, "小车") == "1" ? "Red" : "url(#polygon1743_1_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_接料斗1", commonDAO.GetSignalDataValue(machineCode, "接料斗") == "1" ? "Red" : "url(#_164344952_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_接料斗2", commonDAO.GetSignalDataValue(machineCode, "接料斗") == "1" ? "Red" : "url(#_130855712_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_接料斗3", commonDAO.GetSignalDataValue(machineCode, "接料斗") == "1" ? "Red" : "url(#_164355560_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_接料斗4", commonDAO.GetSignalDataValue(machineCode, "接料斗") == "1" ? "Red" : "url(#_164351936_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_除铁给料皮带", commonDAO.GetSignalDataValue(machineCode, "给料皮带") == "1" ? "Red" : "#808080", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_溜煤管", commonDAO.GetSignalDataValue(machineCode, "溜煤管") == "1" ? "Red" : "url(#polygon984_1_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_锤式破碎机1", commonDAO.GetSignalDataValue(machineCode, "锤式破碎机") == "1" ? "Red" : "url(#_125277864-0_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_锤式破碎机2", commonDAO.GetSignalDataValue(machineCode, "锤式破碎机") == "1" ? "Red" : "url(#_164348960_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_锤式破碎机3", commonDAO.GetSignalDataValue(machineCode, "锤式破碎机") == "1" ? "Red" : "url(#_130854176_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_锤式破碎机4", commonDAO.GetSignalDataValue(machineCode, "锤式破碎机") == "1" ? "Red" : "url(#_130859336-4_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_锤式破碎机5", commonDAO.GetSignalDataValue(machineCode, "锤式破碎机") == "1" ? "Red" : "url(#_164347592_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_锤式破碎机6", commonDAO.GetSignalDataValue(machineCode, "锤式破碎机") == "1" ? "Red" : "url(#_164343680_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_锤式破碎机7", commonDAO.GetSignalDataValue(machineCode, "锤式破碎机") == "1" ? "Red" : "url(#_164356088_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_缩分皮带", commonDAO.GetSignalDataValue(machineCode, "缩分皮带") == "1" ? "Red" : "#808080", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_弃料斗", commonDAO.GetSignalDataValue(machineCode, "弃料斗") == "1" ? "Red" : "url(#_164344952-8_1_)", eHtmlDataItemType.svg_color));

            string carNumber                   = commonDAO.GetSignalDataValue(machineCode, "车牌号");
            if (string.IsNullOrEmpty(carNumber))
            {
                datas.Add(new HtmlDataItem("Car1", "false", eHtmlDataItemType.svg_visible));
                this.LastCarNumber = string.Empty;
            }
            else
            {
                if (this.LastCarNumber != carNumber)
                {
                    CmcsAutotruck autotruck = CommonDAO.GetInstance().GetAutotruckByCarNumber(carNumber);
                    if (autotruck != null)
                    {
                        if (PreviewCarCarriage(autotruck))
                        {
                            datas.Add(new HtmlDataItem("Car1", "true", eHtmlDataItemType.svg_visible));
                        }
                        else
                        {
                            datas.Add(new HtmlDataItem("Car1", "false", eHtmlDataItemType.svg_visible));
                        }
                    }
                    else
                    {
                        datas.Add(new HtmlDataItem("Car1", "false", eHtmlDataItemType.svg_visible));
                    }

                    this.LastCarNumber = carNumber;
                }
            }

            // 集样罐
            List <InfEquInfSampleBarrel> barrels1 = MonitorDAO.GetInstance().GetEquInfSampleBarrels(machineCode);
            datas.Add(new HtmlDataItem("采样机1_集样罐", Newtonsoft.Json.JsonConvert.SerializeObject(barrels1.Select(a => new { BarrelNumber = a.BarrelNumber, IsCurrent = a.IsCurrent, BarrelStatus = a.BarrelStatus, SampleCount = a.SampleCount })), eHtmlDataItemType.json_data));
            #endregion

            // 发送到页面
            cefWebBrowser.Browser.GetMainFrame().ExecuteJavaScript("requestData(" + Newtonsoft.Json.JsonConvert.SerializeObject(datas) + ");", "", 0);
        }
예제 #9
0
        /// <summary>
        /// 请求数据
        /// </summary>
        void RequestData()
        {
            CommonDAO commonDAO = CommonDAO.GetInstance();

            string value = string.Empty, machineCode = string.Empty, equInfSamplerSystemStatus = string.Empty;
            List <HtmlDataItem> datas = new List <HtmlDataItem>();

            #region 皮带采样机 #1

            datas.Clear();
            machineCode = GlobalVars.MachineCode_HCPDCYJ_1;
            equInfSamplerSystemStatus = commonDAO.GetSignalDataValue(machineCode, eSignalDataName.系统.ToString());
            datas.Add(new HtmlDataItem("#1皮采_采样编码", ConvertSignalValue(!SysStatus(equInfSamplerSystemStatus) ? "" : commonDAO.GetSignalDataValue(machineCode, "采样编码")), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("#1皮采_矿发量", ConvertSignalValue(!SysStatus(equInfSamplerSystemStatus) ? "" : commonDAO.GetSignalDataValue(machineCode, "矿发量")), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("#1皮采_开始时间", ConvertSignalValue(!SysStatus(equInfSamplerSystemStatus) ? "" : commonDAO.GetSignalDataValue(machineCode, "截取开始时间")), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("#1皮采_来煤车数", ConvertSignalValue(!SysStatus(equInfSamplerSystemStatus) ? "" : commonDAO.GetSignalDataValue(machineCode, "来煤车数")), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("#1皮采_采样次数", ConvertSignalValue(!SysStatus(equInfSamplerSystemStatus) ? "" : commonDAO.GetSignalDataValue(machineCode, "次采次数")), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("#1皮采_系统", ConvertMachineStatusToColor(equInfSamplerSystemStatus), eHtmlDataItemType.svg_color));

            // 集样罐
            List <InfEquInfSampleBarrel> barrels1 = MonitorDAO.GetInstance().GetEquInfSampleBarrels(machineCode);
            datas.Add(new HtmlDataItem("#1皮采_集样罐", Newtonsoft.Json.JsonConvert.SerializeObject(barrels1.Select(a => new { SampleCode = a.SampleCode, BarrelNumber = a.BarrelNumber, IsCurrent = a.IsCurrent, BarrelStatus = a.BarrelStatus, SampleCount = a.SampleCount })), eHtmlDataItemType.json_data));

            value = commonDAO.GetSignalDataValue(machineCode, "采样头");
            datas.Add(new HtmlDataItem("#1皮采_采样头", value == "1" ? "Red" : "#808080", eHtmlDataItemType.svg_color));
            value = commonDAO.GetSignalDataValue(machineCode, "1A输送机");
            datas.Add(new HtmlDataItem("#1皮采_1A输送机", value == "1" ? "Red" : "#808080", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("#1皮采_1A输送机", value, tempBool, eHtmlDataItemType.svg_dyncolor));
            value = commonDAO.GetSignalDataValue(machineCode, "煤流检测");
            datas.Add(new HtmlDataItem("#1皮采_煤堆", value, tempBool, eHtmlDataItemType.svg_visible));
            value = commonDAO.GetSignalDataValue(machineCode, "螺旋给料机");
            datas.Add(new HtmlDataItem("#1皮采_螺旋给料机", value == "1" ? "Red" : "#c0c0c0", eHtmlDataItemType.svg_color));
            value = commonDAO.GetSignalDataValue(machineCode, "皮带机");
            datas.Add(new HtmlDataItem("#1皮采_皮带机", value == "1" ? "Red" : "#808080", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("#1皮采_皮带机", value, tempBool, eHtmlDataItemType.svg_dyncolor));
            datas.Add(new HtmlDataItem("#1皮采_皮带机_煤堆", value, tempBool, eHtmlDataItemType.svg_visible));
            value = commonDAO.GetSignalDataValue(machineCode, "骨架粉碎机");
            datas.Add(new HtmlDataItem("#1皮采_骨架粉碎机1", value == "1" ? "Red" : "url(#linearGradient21005)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("#1皮采_骨架粉碎机2", value == "1" ? "Red" : "url(#linearGradient21007)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("#1皮采_骨架粉碎机3", value == "1" ? "Red" : "url(#linearGradient21009)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("#1皮采_骨架粉碎机4", value == "1" ? "Red" : "url(#linearGradient21011)", eHtmlDataItemType.svg_color));
            value = commonDAO.GetSignalDataValue(machineCode, "缩分输送机");
            datas.Add(new HtmlDataItem("#1皮采_缩分输送机", value == "1" ? "Red" : "#808080", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("#1皮采_缩分输送机", value, tempBool, eHtmlDataItemType.svg_dyncolor));
            datas.Add(new HtmlDataItem("#1皮采_缩分输送机_煤堆", value, tempBool, eHtmlDataItemType.svg_visible));
            value = commonDAO.GetSignalDataValue(machineCode, "缩分器");
            datas.Add(new HtmlDataItem("#1皮采_缩分器1", value == "1" ? "Red" : "url(#linearGradient21093)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("#1皮采_缩分器2", value == "1" ? "Red" : "url(#linearGradient7693)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("#1皮采_缩分器3", value == "1" ? "Red" : "url(#linearGradient7697)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("#1皮采_缩分器4", value == "1" ? "Red" : "url(#linearGradient21081)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("#1皮采_缩分器5", value == "1" ? "Red" : "url(#linearGradient7689)", eHtmlDataItemType.svg_color));
            value = commonDAO.GetSignalDataValue(machineCode, "无轴螺旋输送机");
            datas.Add(new HtmlDataItem("#1皮采_无轴螺旋输送机", value == "1" ? "Red" : "#c0c0c0", eHtmlDataItemType.svg_color));
            value = commonDAO.GetSignalDataValue(machineCode, "斗提机");
            datas.Add(new HtmlDataItem("#1皮采_斗提机", value == "1" ? "Red" : "url(#linearGradient21061)", eHtmlDataItemType.svg_color));

            // 添加更多...

            // 发送到页面
            cefWebBrowser.Browser.GetMainFrame().ExecuteJavaScript("requestData(" + Newtonsoft.Json.JsonConvert.SerializeObject(datas) + ");", "", 0);

            #endregion

            #region 皮带采样机 #2

            datas.Clear();
            machineCode = GlobalVars.MachineCode_HCPDCYJ_2;
            equInfSamplerSystemStatus = commonDAO.GetSignalDataValue(machineCode, eSignalDataName.系统.ToString());
            datas.Add(new HtmlDataItem("#2皮采_采样编码", ConvertSignalValue(!SysStatus(equInfSamplerSystemStatus) ? "" : commonDAO.GetSignalDataValue(machineCode, "采样编码")), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("#2皮采_矿发量", ConvertSignalValue(!SysStatus(equInfSamplerSystemStatus) ? "" : commonDAO.GetSignalDataValue(machineCode, "矿发量")), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("#2皮采_开始时间", ConvertSignalValue(!SysStatus(equInfSamplerSystemStatus) ? "" : commonDAO.GetSignalDataValue(machineCode, "截取开始时间")), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("#2皮采_来煤车数", ConvertSignalValue(!SysStatus(equInfSamplerSystemStatus) ? "" : commonDAO.GetSignalDataValue(machineCode, "来煤车数")), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("#2皮采_采样次数", ConvertSignalValue(!SysStatus(equInfSamplerSystemStatus) ? "" : commonDAO.GetSignalDataValue(machineCode, "次采次数")), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("#2皮采_系统", ConvertMachineStatusToColor(equInfSamplerSystemStatus), eHtmlDataItemType.svg_color));

            // 集样罐
            List <InfEquInfSampleBarrel> barrels2 = MonitorDAO.GetInstance().GetEquInfSampleBarrels(machineCode);
            datas.Add(new HtmlDataItem("#2皮采_集样罐", Newtonsoft.Json.JsonConvert.SerializeObject(barrels2.Select(a => new { SampleCode = a.SampleCode, BarrelNumber = a.BarrelNumber, IsCurrent = a.IsCurrent, BarrelStatus = a.BarrelStatus, SampleCount = a.SampleCount })), eHtmlDataItemType.json_data));

            value = commonDAO.GetSignalDataValue(machineCode, "采样头");
            datas.Add(new HtmlDataItem("#2皮采_采样头", value == "1" ? "Red" : "#808080", eHtmlDataItemType.svg_color));
            value = commonDAO.GetSignalDataValue(machineCode, "1B输送机");
            datas.Add(new HtmlDataItem("#2皮采_1B输送机", value == "1" ? "Red" : "#808080", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("#2皮采_1B输送机", value, tempBool, eHtmlDataItemType.svg_dyncolor));
            value = commonDAO.GetSignalDataValue(machineCode, "煤流检测");
            datas.Add(new HtmlDataItem("#2皮采_煤堆", value, tempBool, eHtmlDataItemType.svg_visible));
            value = commonDAO.GetSignalDataValue(machineCode, "螺旋给料机");
            datas.Add(new HtmlDataItem("#2皮采_螺旋给料机", value == "1" ? "Red" : "#c0c0c0", eHtmlDataItemType.svg_color));
            value = commonDAO.GetSignalDataValue(machineCode, "皮带机");
            datas.Add(new HtmlDataItem("#2皮采_皮带机", value == "1" ? "Red" : "#808080", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("#2皮采_皮带机", value, tempBool, eHtmlDataItemType.svg_dyncolor));
            datas.Add(new HtmlDataItem("#2皮采_皮带机_煤堆", value, tempBool, eHtmlDataItemType.svg_visible));
            value = commonDAO.GetSignalDataValue(machineCode, "骨架粉碎机");
            datas.Add(new HtmlDataItem("#2皮采_骨架粉碎机1", value == "1" ? "Red" : "url(#linearGradient21185)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("#2皮采_骨架粉碎机2", value == "1" ? "Red" : "url(#linearGradient21187)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("#2皮采_骨架粉碎机3", value == "1" ? "Red" : "url(#linearGradient21189)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("#2皮采_骨架粉碎机4", value == "1" ? "Red" : "url(#linearGradient21191)", eHtmlDataItemType.svg_color));
            value = commonDAO.GetSignalDataValue(machineCode, "缩分输送机");
            datas.Add(new HtmlDataItem("#2皮采_缩分输送机", value == "1" ? "Red" : "#808080", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("#2皮采_缩分输送机", value, tempBool, eHtmlDataItemType.svg_dyncolor));
            datas.Add(new HtmlDataItem("#2皮采_缩分输送机_煤堆", value, tempBool, eHtmlDataItemType.svg_visible));
            value = commonDAO.GetSignalDataValue(machineCode, "缩分器");
            datas.Add(new HtmlDataItem("#2皮采_缩分器1", value == "1" ? "Red" : "url(#linearGradient21273)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("#2皮采_缩分器2", value == "1" ? "Red" : "url(#linearGradient8507)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("#2皮采_缩分器3", value == "1" ? "Red" : "url(#linearGradient8511)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("#2皮采_缩分器4", value == "1" ? "Red" : "url(#linearGradient21261)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("#2皮采_缩分器5", value == "1" ? "Red" : "url(#linearGradient8503)", eHtmlDataItemType.svg_color));
            value = commonDAO.GetSignalDataValue(machineCode, "无轴螺旋输送机");
            datas.Add(new HtmlDataItem("#2皮采_无轴螺旋输送机", value == "1" ? "Red" : "#c0c0c0", eHtmlDataItemType.svg_color));
            value = commonDAO.GetSignalDataValue(machineCode, "斗提机");
            datas.Add(new HtmlDataItem("#2皮采_斗提机", value == "1" ? "Red" : "url(#linearGradient21061)", eHtmlDataItemType.svg_color));

            // 添加更多...

            // 发送到页面
            cefWebBrowser.Browser.GetMainFrame().ExecuteJavaScript("requestData(" + Newtonsoft.Json.JsonConvert.SerializeObject(datas) + ");", "", 0);

            tempBool = tempBool ? false : true;

            #endregion
        }
예제 #10
0
        /// <summary>
        /// 请求数据
        /// </summary>
        void RequestData()
        {
            string value = string.Empty, machineCode = string.Empty;
            List <HtmlDataItem>   datas        = new List <HtmlDataItem>();
            List <InfEquInfHitch> equInfHitchs = new List <InfEquInfHitch>();

            #region 汽车机械采样机

            datas.Clear();
            machineCode = this.CurrentMachineCode;

            datas.Add(new HtmlDataItem("机械采样机_当前采样机", machineCode, eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("机械采样机_当前采样机", monitorCommon.ConvertMachineStatusToColor(commonDAO.GetSignalDataValue(machineCode, eSignalDataName.系统.ToString())), eHtmlDataItemType.svg_color));

            datas.Add(new HtmlDataItem("机械采样机_采样编码", commonDAO.GetSignalDataValue(machineCode, eSignalDataName.采样编码.ToString()), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("机械采样机_矿发量", commonDAO.GetSignalDataValue(machineCode, eSignalDataName.矿发量.ToString()), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("机械采样机_采样时间", commonDAO.GetSignalDataValue(machineCode, eSignalDataName.采样时间.ToString()), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("机械采样机_车牌号", commonDAO.GetSignalDataValue(machineCode, eSignalDataName.当前车号.ToString()), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("机械采样机_采样点数", commonDAO.GetSignalDataValue(machineCode, eSignalDataName.采样点数.ToString()), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("机械采样机_供应商名称", commonDAO.GetSignalDataValue(machineCode, "供应商名称"), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("机械采样机_X坐标", commonDAO.GetSignalDataValue(machineCode, "当前X坐标"), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("机械采样机_Y坐标", commonDAO.GetSignalDataValue(machineCode, "当前Y坐标"), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("机械采样机_Z坐标", commonDAO.GetSignalDataValue(machineCode, "当前Z坐标"), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("机械采样机_小车1", commonDAO.GetSignalDataValue(machineCode, "小车运行") == "1" ? "Red" : "url(#rect1770_1_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_小车2", commonDAO.GetSignalDataValue(machineCode, "小车运行") == "1" ? "Red" : "url(#rect1752_1_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_小车3", commonDAO.GetSignalDataValue(machineCode, "小车运行") == "1" ? "Red" : "url(#rect1761_1_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_小车4", commonDAO.GetSignalDataValue(machineCode, "小车运行") == "1" ? "Red" : "url(#rect1716_1_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_小车5", commonDAO.GetSignalDataValue(machineCode, "小车运行") == "1" ? "Red" : "url(#rect1725_1_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_小车6", commonDAO.GetSignalDataValue(machineCode, "小车运行") == "1" ? "Red" : "url(#rect1734_1_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_小车7", commonDAO.GetSignalDataValue(machineCode, "小车运行") == "1" ? "Red" : "url(#polygon1743_1_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_接料斗1", commonDAO.GetSignalDataValue(machineCode, "样料运行") == "1" ? "Red" : "url(#_164344952_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_接料斗2", commonDAO.GetSignalDataValue(machineCode, "样料运行") == "1" ? "Red" : "url(#_130855712_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_接料斗3", commonDAO.GetSignalDataValue(machineCode, "样料运行") == "1" ? "Red" : "url(#_164355560_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_接料斗4", commonDAO.GetSignalDataValue(machineCode, "样料运行") == "1" ? "Red" : "url(#_164351936_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_除铁给料皮带", commonDAO.GetSignalDataValue(machineCode, "给料皮带运行") == "1" ? "Red" : "#808080", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_溜煤管", commonDAO.GetSignalDataValue(machineCode, "匀料器运行") == "1" ? "Red" : "url(#polygon984_1_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_锤式破碎机1", commonDAO.GetSignalDataValue(machineCode, "环锤运行") == "1" ? "Red" : "url(#_125277864-0_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_锤式破碎机2", commonDAO.GetSignalDataValue(machineCode, "环锤运行") == "1" ? "Red" : "url(#_164348960_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_锤式破碎机3", commonDAO.GetSignalDataValue(machineCode, "环锤运行") == "1" ? "Red" : "url(#_130854176_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_锤式破碎机4", commonDAO.GetSignalDataValue(machineCode, "环锤运行") == "1" ? "Red" : "url(#_130859336-4_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_锤式破碎机5", commonDAO.GetSignalDataValue(machineCode, "环锤运行") == "1" ? "Red" : "url(#_164347592_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_锤式破碎机6", commonDAO.GetSignalDataValue(machineCode, "环锤运行") == "1" ? "Red" : "url(#_164343680_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_锤式破碎机7", commonDAO.GetSignalDataValue(machineCode, "环锤运行") == "1" ? "Red" : "url(#_164356088_2_)", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_缩分皮带", commonDAO.GetSignalDataValue(machineCode, "缩分运行") == "1" ? "Red" : "#808080", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("机械采样机_弃料斗", commonDAO.GetSignalDataValue(machineCode, "弃料运行") == "1" ? "Red" : "url(#_164344952-8_1_)", eHtmlDataItemType.svg_color));

            datas.Add(new HtmlDataItem("盛样桶号", commonDAO.GetSignalDataValue(machineCode, "当前桶号"), eHtmlDataItemType.svg_text));
            CmcsAutotruck autotruck1           = CommonDAO.GetInstance().GetAutotruckByCarNumber(commonDAO.GetSignalDataValue(machineCode, eSignalDataName.当前车号.ToString()));
            if (autotruck1 != null)
            {
                datas.Add(new HtmlDataItem("车厢长", autotruck1.CarriageLength.ToString(), eHtmlDataItemType.svg_text));
                datas.Add(new HtmlDataItem("车厢高", autotruck1.CarriageHeight.ToString(), eHtmlDataItemType.svg_text));;
                datas.Add(new HtmlDataItem("车厢宽", autotruck1.CarriageWidth.ToString(), eHtmlDataItemType.svg_text));
                datas.Add(new HtmlDataItem("车底高", autotruck1.CarriageBottomToFloor.ToString(), eHtmlDataItemType.svg_text));
                datas.Add(new HtmlDataItem("拉筋1", autotruck1.LeftObstacle1.ToString(), eHtmlDataItemType.svg_text));
                datas.Add(new HtmlDataItem("拉筋2", autotruck1.LeftObstacle2.ToString(), eHtmlDataItemType.svg_text));;
                datas.Add(new HtmlDataItem("拉筋3", autotruck1.LeftObstacle3.ToString(), eHtmlDataItemType.svg_text));
                datas.Add(new HtmlDataItem("拉筋4", autotruck1.LeftObstacle4.ToString(), eHtmlDataItemType.svg_text));
                datas.Add(new HtmlDataItem("拉筋5", autotruck1.LeftObstacle5.ToString(), eHtmlDataItemType.svg_text));
                datas.Add(new HtmlDataItem("拉筋6", autotruck1.LeftObstacle6.ToString(), eHtmlDataItemType.svg_text));
            }
            else
            {
                datas.Add(new HtmlDataItem("车厢长", "0", eHtmlDataItemType.svg_text));
                datas.Add(new HtmlDataItem("车厢高", "0", eHtmlDataItemType.svg_text));;
                datas.Add(new HtmlDataItem("车厢宽", "0", eHtmlDataItemType.svg_text));
                datas.Add(new HtmlDataItem("车底高", "0", eHtmlDataItemType.svg_text));
                datas.Add(new HtmlDataItem("拉筋1", "0", eHtmlDataItemType.svg_text));
                datas.Add(new HtmlDataItem("拉筋2", "0", eHtmlDataItemType.svg_text));;
                datas.Add(new HtmlDataItem("拉筋3", "0", eHtmlDataItemType.svg_text));
                datas.Add(new HtmlDataItem("拉筋4", "0", eHtmlDataItemType.svg_text));
                datas.Add(new HtmlDataItem("拉筋5", "0", eHtmlDataItemType.svg_text));
                datas.Add(new HtmlDataItem("拉筋6", "0", eHtmlDataItemType.svg_text));
            }

            datas.Add(new HtmlDataItem("前边界", commonDAO.GetSignalDataValue(machineCode, "前边界") == "1" ? "#00ff00" : "#c8c8c8", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("左边界", commonDAO.GetSignalDataValue(machineCode, "左边界") == "1" ? "#00ff00" : "#c8c8c8", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("上边界", commonDAO.GetSignalDataValue(machineCode, "上边界") == "1" ? "#00ff00" : "#c8c8c8", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("后边界", commonDAO.GetSignalDataValue(machineCode, "后边界") == "1" ? "#00ff00" : "#c8c8c8", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("右边界", commonDAO.GetSignalDataValue(machineCode, "右边界") == "1" ? "#00ff00" : "#c8c8c8", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("下边界", commonDAO.GetSignalDataValue(machineCode, "下边界") == "1" ? "#00ff00" : "#c8c8c8", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("车尾上", commonDAO.GetSignalDataValue(machineCode, "道闸抬到位") == "1" ? "#00ff00" : "#c8c8c8", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("车尾下", commonDAO.GetSignalDataValue(machineCode, "道闸落到位") == "1" ? "#00ff00" : "#c8c8c8", eHtmlDataItemType.svg_color));

            datas.Add(new HtmlDataItem("大车", commonDAO.GetSignalDataValue(machineCode, "大车故障") == "1" ? "#ffff00" : commonDAO.GetSignalDataValue(machineCode, "大车运行") == "1" ? "#ff0000" : "#c8c8c8", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("小车", commonDAO.GetSignalDataValue(machineCode, "小车故障") == "1" ? "#ffff00" : commonDAO.GetSignalDataValue(machineCode, "小车运行") == "1" ? "#ff0000" : "#c8c8c8", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("升降", commonDAO.GetSignalDataValue(machineCode, "升降故障") == "1" ? "#ffff00" : commonDAO.GetSignalDataValue(machineCode, "升降运行") == "1" ? "#ff0000" : "#c8c8c8", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("旋转", commonDAO.GetSignalDataValue(machineCode, "动力头故障") == "1" ? "#ffff00" : commonDAO.GetSignalDataValue(machineCode, "动力头运行") == "1" ? "#ff0000" : "#c8c8c8", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("匀料器", commonDAO.GetSignalDataValue(machineCode, "匀料器故障") == "1" ? "#ffff00" : commonDAO.GetSignalDataValue(machineCode, "匀料器运行") == "1" ? "#ff0000" : "#c8c8c8", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("给料", commonDAO.GetSignalDataValue(machineCode, "给料皮带故障") == "1" ? "#ffff00" : commonDAO.GetSignalDataValue(machineCode, "给料皮带运行") == "1" ? "#ff0000" : "#c8c8c8", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("环锤", commonDAO.GetSignalDataValue(machineCode, "环锤故障") == "1" ? "#ffff00" : commonDAO.GetSignalDataValue(machineCode, "环锤运行") == "1" ? "#ff0000" : "#c8c8c8", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("反击板", commonDAO.GetSignalDataValue(machineCode, "反击板故障") == "1" ? "#ffff00" : commonDAO.GetSignalDataValue(machineCode, "反击板运行") == "1" ? "#ff0000" : "#c8c8c8", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("缩分", commonDAO.GetSignalDataValue(machineCode, "缩分故障") == "1" ? "#ffff00" : commonDAO.GetSignalDataValue(machineCode, "缩分运行") == "1" ? "#ff0000" : "#c8c8c8", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("样料", commonDAO.GetSignalDataValue(machineCode, "样料故障") == "1" ? "#ffff00" : commonDAO.GetSignalDataValue(machineCode, "样料运行") == "1" ? "#ff0000" : "#c8c8c8", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("弃料", commonDAO.GetSignalDataValue(machineCode, "弃料故障") == "1" ? "#ffff00" : commonDAO.GetSignalDataValue(machineCode, "弃料运行") == "1" ? "#ff0000" : "#c8c8c8", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("样桶", commonDAO.GetSignalDataValue(machineCode, "桶故障") == "1" ? "#ffff00" : commonDAO.GetSignalDataValue(machineCode, "样煤仓运行") == "1" ? "#ff0000" : "#c8c8c8", eHtmlDataItemType.svg_color));
            datas.Add(new HtmlDataItem("车尾检测", commonDAO.GetSignalDataValue(machineCode, "道闸故障") == "1" ? "#ffff00" : commonDAO.GetSignalDataValue(machineCode, "道闸运行") == "1" ? "#ff0000" : "#c8c8c8", eHtmlDataItemType.svg_color));

            datas.Add(new HtmlDataItem("传感器_车尾", commonDAO.GetSignalDataValue(machineCode, "传感器车尾"), eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("传感器_侧面", commonDAO.GetSignalDataValue(machineCode, "传感器侧面"), eHtmlDataItemType.svg_text));

            string cyfs = "手动";
            string cyys = "#00ff00";
            if (commonDAO.GetSignalDataValue(machineCode, "采样自动") == "1")
            {
                cyfs = "自动";
                cyys = "#00ff00";
            }
            if (commonDAO.GetSignalDataValue(machineCode, "采样急停") == "1")
            {
                cyfs = "急停";
                cyys = "#ff0000";
            }
            datas.Add(new HtmlDataItem("采样方式", cyfs, eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("采样方式", cyys, eHtmlDataItemType.svg_color));

            string zyfs = "手动";
            string zyys = "#00ff00";
            if (commonDAO.GetSignalDataValue(machineCode, "制样自动") == "1")
            {
                zyfs = "自动";
                zyys = "#00ff00";
            }
            if (commonDAO.GetSignalDataValue(machineCode, "制样急停") == "1")
            {
                zyfs = "急停";
                zyys = "#ff0000";
            }
            datas.Add(new HtmlDataItem("制样方式", zyfs, eHtmlDataItemType.svg_text));
            datas.Add(new HtmlDataItem("制样方式", zyys, eHtmlDataItemType.svg_color));

            #region 车厢拉筋信息
            string carNumber = commonDAO.GetSignalDataValue(machineCode, eSignalDataName.当前车号.ToString());
            if (!string.IsNullOrEmpty(carNumber))
            {
                CmcsAutotruck autotruck = CommonDAO.GetInstance().GetAutotruckByCarNumber(carNumber);
                if (autotruck != null)
                {
                    if (PreviewCarCarriage(autotruck))
                    {
                        this.pbxAutotruck.Visible = true;
                    }
                    else
                    {
                        this.pbxAutotruck.Visible = false;
                    }
                }
                else
                {
                    this.pbxAutotruck.Visible = false;
                }
            }
            else
            {
                this.pbxAutotruck.Visible = false;
            }

            this.LastCarNumber = carNumber;
            #endregion

            // 集样罐
            List <InfEquInfSampleBarrel> barrels1 = MonitorDAO.GetInstance().GetEquInfSampleBarrels(machineCode);
            datas.Add(new HtmlDataItem("采样机1_集样罐", Newtonsoft.Json.JsonConvert.SerializeObject(barrels1.Select(a => new { BarrelNumber = a.BarrelNumber, IsCurrent = a.IsCurrent, BarrelStatus = a.BarrelStatus, SampleCount = a.SampleCount })), eHtmlDataItemType.json_data));
            #endregion

            // 发送到页面
            cefWebBrowser.Browser.GetMainFrame().ExecuteJavaScript("requestData(" + Newtonsoft.Json.JsonConvert.SerializeObject(datas) + ");", "", 0);
        }
예제 #11
0
        private void CheckedSampleInfo(SuperGridControl superGridControl, string batchId)
        {
            List <CmcsRCSampling> list = MonitorDAO.GetInstance().GetSamplings(batchId);

            superGridControl.PrimaryGrid.DataSource = list;
        }
예제 #12
0
 public ControladorPersonal()
 {
     personal       = new PersonalDAO();
     administrador  = new AdministradorSuperDao();
     monitorControl = new MonitorDAO();
 }