public bool Execute()
        {
            try
            {
                if (RepeatData.IsRepeatData(_content))
                {
                    MyLibrary.Log.RepeatDataInfo("基站编号:" + StationId.ToString() + " 原始代码:" + OriginalCode);
                    return(true);
                }


                Pro_IndateBase_Sec_Mod info = new Pro_IndateBase_Sec_Mod();
                info.pi_bigtype      = "4";
                info.pi_devicetime   = ConverUtil.Time(_content, 0);
                info.pi_devicetype   = ConverUtil.ByteToStr_2(_content, 7);
                info.pi_devicecode   = ConverUtil.ByteToStr_4(_content, 9);
                info.pi_protocoltype = _content[13].ToString();
                info.pi_param1       = ConverUtil.ByteToStr_2(_content, 14); //功率过大阀值
                info.pi_stationno    = StationId.ToString();
                info.pi_servicetime  = PlatformTime;
                Other.ChuZuWu.Pro_IndateBase_Sec_Bll c = new Other.ChuZuWu.Pro_IndateBase_Sec_Bll(info);
                string Result = c.Exec();
                if (Result != "0")
                {
                    MyLibrary.Log.Debug(Name + "出错:" + Result + " 原始代码:" + OriginalCode);
                }
            }
            catch (Exception ex)
            {
                MyLibrary.Log.Error(Name + "出错:" + ex.Message + " 原始代码:" + OriginalCode);
            }

            return(true);
        }
Ejemplo n.º 2
0
        public bool Execute()
        {
            try
            {
                Pro_IndateBase_Sec_Mod info = new Pro_IndateBase_Sec_Mod();
                info.pi_bigtype      = "4";
                info.pi_devicetime   = ConverUtil.Time(_content, 0);
                info.pi_devicetype   = ConverUtil.ByteToStr_2(_content, 7);
                info.pi_devicecode   = ConverUtil.ByteToStr_4(_content, 9);
                info.pi_protocoltype = _content[13].ToString();
                char[] ModelStateChar = DataJM.ModelState(_content[14].ToString());
                info.pi_param1      = ModelStateChar[0].ToString(); //模块状态
                info.pi_param2      = ModelStateChar[1].ToString(); //模块状态
                info.pi_param3      = DataJM.电池电压(_content, 15);    //电池电压。
                info.pi_version     = _content[18].ToString();
                info.pi_stationno   = StationId.ToString();
                info.pi_servicetime = PlatformTime;
                Other.ChuZuWu.Pro_IndateBase_Sec_Bll c = new Other.ChuZuWu.Pro_IndateBase_Sec_Bll(info);
                string Result = c.Exec();
                if (Result != "0")
                {
                    MyLibrary.Log.Debug(Name + "出错:" + Result + " 原始代码:" + OriginalCode);
                }
            }
            catch (Exception ex)
            {
                MyLibrary.Log.Error(Name + "出错:" + ex.Message + " 原始代码:" + OriginalCode);
            }

            return(true);
        }
Ejemplo n.º 3
0
        public bool Execute()
        {
            try
            {
                Pro_IndateBase_Sec_Mod info = new Pro_IndateBase_Sec_Mod();
                info.pi_bigtype      = "4";
                info.pi_devicetime   = ConverUtil.Time(_content, 0);
                info.pi_devicetype   = ConverUtil.ByteToStr_2(_content, 7);
                info.pi_devicecode   = ConverUtil.ByteToStr_4(_content, 9);
                info.pi_protocoltype = _content[13].ToString();
                info.pi_param1       = ConverUtil.ByteToStr_2(_content, 14); //单位时间内最大幅度值
                info.pi_param2       = _content[16].ToString();              //有轻微震动状态
                info.pi_param3       = _content[17].ToString();              //每天报警次数
                info.pi_version      = _content[18].ToString();
                info.pi_stationno    = StationId.ToString();
                info.pi_servicetime  = PlatformTime;
                Other.ChuZuWu.Pro_IndateBase_Sec_Bll c = new Other.ChuZuWu.Pro_IndateBase_Sec_Bll(info);
                string Result = c.Exec();
                if (Result != "0")
                {
                    MyLibrary.Log.Debug(Name + "出错:" + Result + " 原始代码:" + OriginalCode);
                }
            }
            catch (Exception ex)
            {
                MyLibrary.Log.Error(Name + "出错:" + ex.Message + " 原始代码:" + OriginalCode);
            }


            return(true);
        }
Ejemplo n.º 4
0
        public bool Execute()
        {
            try
            {
                if (_content.Length != 20)
                {
                    MyLibrary.Log.Debug(Name + "长度无效:原始代码:" + OriginalCode);
                    return(true);
                }

                string   DeviceType = ConverUtil.ByteToStr_2(_content, 0);     //设备类型
                string   DeviceId   = ConverUtil.ByteToStr_4(_content, 2);     //设备Id
                DateTime time       = ConverUtil.Time(_content, 6);            //设备时间
                string   IdentityId = ConverUtil.ByteToStr_Q(_content, 12, 8); //身份证Id


                Pro_IndateBase_Sec_Mod info = new Pro_IndateBase_Sec_Mod();
                info.pi_bigtype      = "10";
                info.pi_devicetime   = time;
                info.pi_devicetype   = DeviceType;
                info.pi_devicecode   = DeviceId;
                info.pi_protocoltype = "519";
                info.pi_param1       = IdentityId;
                info.pi_stationno    = StationId.ToString();
                info.pi_servicetime  = PlatformTime;

                Other.ChuZuWu.Pro_IndateBase_Sec_Bll c = new Other.ChuZuWu.Pro_IndateBase_Sec_Bll(info);
                string Result = c.Exec();
                if (Result != "0")
                {
                    MyLibrary.Log.Debug(Name + "出错:" + Result + " 原始代码:" + OriginalCode);
                }
            }
            catch (Exception ex)
            {
                MyLibrary.Log.Error(Name + "出错:" + ex.Message + " 原始代码:" + OriginalCode);
            }

            return(true);
        }
Ejemplo n.º 5
0
        public bool Execute()
        {
            try
            {
                if (_content.Length != 17)
                {
                    MyLibrary.Log.Debug(Name + "长度无效:原始代码:" + OriginalCode);
                    return(true);
                }

                Pro_IndateBase_Sec_Mod info = new Pro_IndateBase_Sec_Mod();
                info.pi_bigtype      = "9";
                info.pi_protocoltype = "518";
                info.pi_devicetime   = ConverUtil.Time(_content, 6);         //设备时间
                info.pi_devicetype   = ConverUtil.ByteToStr_2(_content, 0);  //设备类型
                info.pi_devicecode   = ConverUtil.ByteToStr_4(_content, 2);  //设备Id
                info.pi_param1       = ConverUtil.ByteToStr_4(_content, 12); //房间号
                info.pi_param2       = _content[16].ToString();              //模块状态
                info.pi_stationno    = StationId.ToString();
                info.pi_servicetime  = PlatformTime;

                Other.ChuZuWu.Pro_IndateBase_Sec_Bll c = new Other.ChuZuWu.Pro_IndateBase_Sec_Bll(info);
                string Result = c.Exec();
                if (Result != "0")
                {
                    MyLibrary.Log.Debug(Name + "出错:" + Result + " 原始代码:" + OriginalCode);
                }
            }
            catch (Exception ex)
            {
                MyLibrary.Log.Error(Name + "出错:" + ex.Message + " 原始代码:" + OriginalCode);
            }



            return(true);
        }