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);
        }
Beispiel #2
0
        public bool Execute()
        {
            try
            {
                if (RepeatData.IsRepeatData(RepeatStr()))
                {
                    MyLibrary.Log.RepeatDataInfo("基站编号:" + StationId.ToString() + " 原始代码:" + OriginalCode);
                    return(true);
                }


                CZW_61506_0411_195_Mod Cm = CZW_61506_0411_195_Dal.GetMod(this._content);
                Cm.基站编号 = (uint)StationId;
                Cm.平台时间 = this.PlatformTime;

                Pro_IndataBase_ZNMP_Mod info = CZW_61506_0411_195_Dal.Get_Pro_Mod(Cm);


                Pro_IndataBase_ZNMP_Bll c = new Pro_IndataBase_ZNMP_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);
        }
        public bool Execute()
        {

            try
            {

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


                Pro_IndateBase_ZHMJ_Mod info = new Pro_IndateBase_ZHMJ_Mod();
                info.pi_bigtype = "2";
                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_stationno = StationId.ToString();
                info.pi_servicetime = PlatformTime;
                info.pi_param1 = _content[14].ToString();       //每天开门次数
                string[] DataArray = DoorInfo(_content[15]);   //门状态及数据标志
                info.pi_param2 = DataArray[0];                 //门状态
                info.pi_param3 = DataArray[1];                //数据标志
                info.pi_param4 = _content[16].ToString();     //开门动作时间
                info.pi_param5 = _content[17].ToString();     //开门最大角度

                byte[] Data = new byte[6];
                Array.Copy(_content, 18, Data, 0, 6);
     
                info.pi_param6 = stttt(Data);                //三个加速度。
                info.pi_param7 = _content[24].ToString();    //开盖报警等
                info.pi_version = _content[26].ToString();  //版本号

                Other.ChuZuWu.Pro_IndateBase_ZHMJ_Bll c = new Other.ChuZuWu.Pro_IndateBase_ZHMJ_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;
        }
Beispiel #4
0
        public bool Execute()
        {
            try
            {
                if (RepeatData.IsRepeatData(_content))
                {
                    MyLibrary.Log.RepeatDataInfo("基站编号:" + StationId.ToString() + " 原始代码:" + OriginalCode);
                    return(true);
                }

                Pro_IndataBase_ZNMP_Mod info = new Pro_IndataBase_ZNMP_Mod();
                info.PI_DEVICETIME   = ConverUtil.Time(_content, 0);
                info.PI_RELAYNO      = _content[6].ToString();
                info.PI_DEVICETYPE   = ConverUtil.ByteToStr_2(_content, 7);
                info.PI_DEVID        = ConverUtil.ByteToStr_4(_content, 9);
                info.PI_PROTOCOLTYPE = _content[13].ToString();
                info.PI_STATIONNO    = StationId.ToString();
                info.PI_SERVICETIME  = PlatformTime;
                info.PI_PARAM1       = _content[14].ToString();                         //环境状态
                info.PI_PARAM2       = _content[15].ToString();                         //对人校准身高
                info.PI_PARAM3       = _content[16].ToString();                         //对地校准值
                info.PI_PARAM4       = _content[17].ToString();                         //工作状态
                info.PI_PARAM5       = ConverUtil.ZF_Value(_content[18]);               //当前环境温度
                info.PI_PARAM6       = ConverUtil.GetBin(_content[19], 1);              //防拆
                info.PI_PARAM7       = (Convert.ToInt32(_content[20]) * 20).ToString(); //电池电压
                info.PI_PARAM8       = _content[21].ToString();                         //热视电触发次数(从上次心跳到这次心跳之间)
                info.PI_PARAM9       = ConverUtil.ByteToStr_2(_content, 22);            //超声波总工作时间
                info.PI_PARAM10      = ConverUtil.ByteToStr_2(_content, 24);            //热释电总触发次数
                info.PI_PARAM11      = ConverUtil.ByteToStr_2(_content, 26);            //总震动次数
                info.PI_PARAM12      = _content[28].ToString();                         //每月按键触发次数
                info.PI_PARAM13      = ConverUtil.GetBin(_content[29], 1);              //设备状态_超声波故障
                info.PI_PARAM14      = ConverUtil.GetBin(_content[29], 2);              //设备状态_热释电故障
                info.PI_VERSION      = _content[34].ToString();                         //版本号
                Other.LvYe.Pro_IndataBase_ZNMP_Bll c = new Other.LvYe.Pro_IndataBase_ZNMP_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);
        }
Beispiel #5
0
        public bool Execute()
        {
            try
            {
                if (RepeatData.IsRepeatData(_content))
                {
                    MyLibrary.Log.RepeatDataInfo("基站编号:" + StationId.ToString() + " 原始代码:" + OriginalCode);
                    return(true);
                }


                Pro_IndateBase_ZHMJ_Mod info = new Pro_IndateBase_ZHMJ_Mod();
                info.pi_bigtype      = "2";
                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_stationno    = StationId.ToString();
                info.pi_servicetime  = PlatformTime;
                info.pi_param1       = _content[14].ToString();               //变化方向
                info.pi_param2       = _content[15].ToString();               //房间内人数
                info.pi_param3       = _content[16].ToString();               //每天开门次数
                info.pi_param4       = _content[17].ToString();               //门状态
                info.pi_param5       = _content[18].ToString();               //自动撤布防。
                info.pi_param6       = _content[19].ToString();               //布防报警。
                info.pi_param7       = ((_content[20] >> 7) & 01).ToString(); //开门超过十分钟。
                info.pi_param10      = ((_content[20] >> 6) & 01).ToString(); //表示开盖报警。
                info.pi_param9       = _content[21].ToString();               //打开门的角度
                info.pi_version      = _content[26].ToString();


                Other.ChuZuWu.Pro_IndateBase_ZHMJ_Bll c = new Other.ChuZuWu.Pro_IndateBase_ZHMJ_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);
        }
Beispiel #6
0
        public bool Execute()
        {
            try
            {
                if (RepeatData.IsRepeatData(_content))
                {
                    MyLibrary.Log.RepeatDataInfo("基站编号:" + StationId.ToString() + " 原始代码:" + OriginalCode);
                    return(true);
                }


                Pro_IndateBase_ZHMJ_Mod info = new Pro_IndateBase_ZHMJ_Mod();
                info.pi_bigtype      = "1";
                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_cardtype     = _content[14].ToString(); //卡类型
                info.pi_cardid       = info.pi_cardtype == "0" ? ConverUtil.ByteToStr_Q(_content, 15, 8) : ConverUtil.ByteToStr_4(_content, 19);;
                info.pi_HEADCOUNT    = _content[23].ToString(); //房间内人数
                info.pi_OPENTIMES    = _content[24].ToString(); //每天开门次数
                info.pi_version      = _content[26].ToString();
                info.pi_stationno    = StationId.ToString();
                info.pi_servicetime  = PlatformTime;

                Other.ChuZuWu.Pro_IndateBase_ZHMJ_Bll c = new Other.ChuZuWu.Pro_IndateBase_ZHMJ_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);
        }
        public bool Execute()
        {
            try
            {
                if (RepeatData.IsRepeatData(_content))
                {
                    MyLibrary.Log.RepeatDataInfo("基站编号:" + StationId.ToString() + " 原始代码:" + OriginalCode);
                    return(true);
                }


                LV_61506_0419_199_Mod Cm = LV_61506_0419_199_Dal.GetMod(this._content);
                Cm.基站编号 = (uint)StationId;
                Cm.平台时间 = this.PlatformTime;

                Pro_IndataBase_ZNMP_Mod info = LV_61506_0419_199_Dal.Get_Pro_Mod(Cm);

                List <Pro_IndataBase_ZNMP_Mod> list = GetList(info);


                Pro_IndataBase_ZNMP_Bll c;
                string Result = "";
                foreach (var v in list)
                {
                    c      = new Pro_IndataBase_ZNMP_Bll(v);
                    Result = c.Exec();
                    if (Result != "0")
                    {
                        MyLibrary.Log.Debug(NAME + "出错:" + Result + " 原始代码:" + OriginalCode);
                    }
                }
            }
            catch (Exception ex)
            {
                MyLibrary.Log.Error(NAME + "出错:" + ex.Message + " 原始代码:" + OriginalCode);
            }

            return(true);
        }
Beispiel #8
0
        public bool Execute()
        {
            try
            {
                if (this.Content.Length != 189)
                {
                    MyLibrary.Log.Debug(NAME + "出错:正确长度189,目前长度" + Content.Length.ToString() + " 原始代码:" + OriginalCode);
                }


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

                CZW_2_Mod Cm = CZW_2_Dal.GetMod(this.Content);
                Cm.设备编号 = (uint)StationId;
                Tb_EIdentitycardBung_Dal dal = CZW_2_Dal.TableMod(Cm);

                bool IsOk = dal.Select_IdCard(Cm.身份证id);
                if (IsOk)
                {
                    dal.Update();
                }
                else
                {
                    dal.Insert();
                }
            }
            catch (Exception ex)
            {
                MyLibrary.Log.Error(NAME + "出错:" + ex.Message + " 原始代码:" + OriginalCode);
            }

            return(true);
        }