コード例 #1
0
        private void vsss()
        {
            try
            {
                Pro_IndateBase_ZHMJ_Mod info = new Pro_IndateBase_ZHMJ_Mod();
                info.pi_bigtype      = "2";
                info.pi_devicecode   = "14";
                info.pi_devicetype   = "1041";
                info.pi_protocoltype = "3";
                info.pi_devicetime   = Convert.ToDateTime("2017-3-18");
                info.pi_cardtype     = "9";
                info.pi_cardid       = "000000000000000000";
                info.pi_HEADCOUNT    = "1";
                info.pi_OPENTIMES    = "0";
                info.pi_param1       = "175";
                info.pi_param2       = "0";
                info.pi_param3       = "1";

                info.pi_param6         = "0";
                info.pi_param7         = "3";
                info.pi_param8         = "11";
                info.pi_stationno      = "0";
                info.pi_version        = "0";
                info.pi_servicetime    = Convert.ToDateTime("2017-3-18");
                info.pi_houseno        = "0";
                info.pi_identitycardid = "000000000000000000";
                info.pi_policecard     = "000000000000";
                info.pi_activecardid   = "0";


                //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);
            }
        }
コード例 #2
0
        public bool Execute()
        {
            try
            {
                string[] GetCardTypeAndHouseNo = DataJM.GetCardTypeAndHouseNo(_content[14].ToString());
                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_houseno      = GetCardTypeAndHouseNo[1]; //房东编号。
                info.pi_cardtype     = GetCardTypeAndHouseNo[0];
                info.pi_cardid       = info.pi_cardtype == "0" ? ConverUtil.ByteToStr_Q(_content, 15, 8) : ConverUtil.ByteToStr_4(_content, 19);;
                info.pi_policecard   = ConverUtil.ByteToStr_4(_content, 23); //警察卡
                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);
        }
コード例 #3
0
        public bool Execute()
        {
            try
            {
                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_param1       = ConverUtil.ByteToStr_2(_content, 14); //三轴的模值之和
                info.pi_param2       = _content[16].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);
        }
コード例 #4
0
        public bool Execute()
        {
            try
            {
                if (_content.Length != 27)
                {
                    MyLibrary.Log.Debug(Name + "长度无效:原始代码:" + OriginalCode);
                    return(true);
                }

                Pro_IndateBase_ZHMJ_Mod info = new Pro_IndateBase_ZHMJ_Mod();
                info.pi_bigtype     = "1";
                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_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);
        }
コード例 #5
0
        public bool Execute()
        {
            try
            {
                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_param1       = _content[14].ToString();                                            //门状态
                info.pi_param2       = _content[15].ToString();                                            //房间内人数
                info.pi_param3       = _content[16].ToString();                                            //每天开门次数
                info.pi_param4       = (Convert.ToInt32(_content[17].ToString()) * 0.02).ToString("0.00"); //电池电压。
                info.pi_param5       = ((_content[18] >> 7) & 01).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);
        }
コード例 #6
0
        /// <summary>
        /// 执行存储过程。
        /// </summary>
        /// <param name="info"></param>
        /// <param name="resultNo"></param>
        /// <param name="reason"></param>
        /// <param name="status"></param>
        /// <param name="wechatId"></param>
        /// <param name="alarmcontent"></param>
        public static void Exec(Pro_IndateBase_ZHMJ_Mod info, out int resultNo, out string reason, out int status, out string wechatId, out string alarmcontent)
        {
            Database  db  = DataConnect.GetConnect;
            DbCommand cmd = db.GetStoredProcCommand("pro_indatebase_zhmj");

            db.AddInParameter(cmd, ":pi_bigtype", DbType.String, info.pi_bigtype);
            db.AddInParameter(cmd, ":pi_devicecode", DbType.String, info.pi_devicecode);
            db.AddInParameter(cmd, ":pi_devicetype", DbType.String, info.pi_devicetype);
            db.AddInParameter(cmd, ":pi_protocoltype", DbType.String, info.pi_protocoltype);
            db.AddInParameter(cmd, ":pi_devicetime", DbType.Date, info.pi_devicetime);
            db.AddInParameter(cmd, ":pi_cardtype", DbType.String, info.pi_cardtype);
            db.AddInParameter(cmd, ":pi_cardid", DbType.String, info.pi_cardid);
            db.AddInParameter(cmd, ":pi_HEADCOUNT", DbType.String, info.pi_HEADCOUNT);
            db.AddInParameter(cmd, ":pi_OPENTIMES", DbType.String, info.pi_OPENTIMES);
            db.AddInParameter(cmd, ":pi_param1", DbType.String, info.pi_param1);
            db.AddInParameter(cmd, ":pi_param2", DbType.String, info.pi_param2);
            db.AddInParameter(cmd, ":pi_param3", DbType.String, info.pi_param3);
            db.AddInParameter(cmd, ":pi_param4", DbType.String, info.pi_param4);
            db.AddInParameter(cmd, ":pi_param5", DbType.String, info.pi_param5);
            db.AddInParameter(cmd, ":pi_param6", DbType.String, info.pi_param6);
            db.AddInParameter(cmd, ":pi_param7", DbType.String, info.pi_param7);
            db.AddInParameter(cmd, ":pi_param8", DbType.String, info.pi_param8);
            db.AddInParameter(cmd, ":pi_param9", DbType.String, info.pi_param9);
            db.AddInParameter(cmd, ":pi_param10", DbType.String, info.pi_param10);
            db.AddInParameter(cmd, ":pi_stationno", DbType.String, info.pi_stationno);
            db.AddInParameter(cmd, ":pi_version", DbType.String, info.pi_version);
            db.AddInParameter(cmd, ":pi_servicetime", DbType.Date, info.pi_servicetime);
            db.AddInParameter(cmd, ":pi_houseno", DbType.String, info.pi_houseno);
            db.AddInParameter(cmd, ":pi_identitycardid", DbType.String, info.pi_identitycardid);
            db.AddInParameter(cmd, ":pi_policecard", DbType.String, info.pi_policecard);
            db.AddInParameter(cmd, ":pi_activecardid", DbType.String, info.pi_activecardid);
            db.AddOutParameter(cmd, ":po_wechatid", DbType.String, 8192);
            db.AddOutParameter(cmd, ":po_alarmcontent", DbType.String, 512);
            db.AddOutParameter(cmd, ":po_resultnum", DbType.String, 256);
            db.AddOutParameter(cmd, ":po_reason", DbType.String, 512);
            db.AddOutParameter(cmd, ":po_status", DbType.String, 256);
            db.ExecuteNonQuery(cmd);

            resultNo     = Convert.ToInt32(db.GetParameterValue(cmd, ":po_resultnum"));
            reason       = db.GetParameterValue(cmd, ":po_reason").ToString();
            wechatId     = db.GetParameterValue(cmd, ":po_wechatid").ToString().Replace(" ", "");
            alarmcontent = db.GetParameterValue(cmd, ":po_alarmcontent").ToString();
            var po_status = db.GetParameterValue(cmd, ":po_status");

            if (po_status != null && po_status.ToString() != "")
            {
                status = Convert.ToInt32(po_status);
            }
            else
            {
                status = 0;
            }
        }
コード例 #7
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();       //每天开门次数
                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;
        }
コード例 #8
0
        public bool Execute()
        {
            try
            {
                if (FileManagementDal.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         = Value_Num_1(_content[15]);            //进出门时间。
                info.pi_param3         = ConverUtil.ZF_Value(_content[16]);    //单次进出人数.
                info.pi_param4         = ConverUtil.ByteToStr_2(_content, 17); //开门震动值。
                info.pi_param5         = ConverUtil.ByteToStr_2(_content, 19); //关门震动值。
                info.pi_param6         = _content[21].ToString();              //房间内人数。
                info.pi_param7         = ConverUtil.ZF_Value(_content[22]);    //温度。
                info.pi_param8         = ConverUtil.ByteToStr_2(_content, 23); //红外触发总次数。
                info.pi_param9         = _content[25].ToString();              //一天红外触发次数。
                info.pi_param10        = ConverUtil.ByteToStr_2(_content, 26); //总震动次数。
                info.pi_houseno        = ConverUtil.ByteToStr_2(_content, 28); //超声波工作时间。
                info.pi_identitycardid = _content[30].ToString();              //空旷距离
                info.pi_policecard     = Battery(_content[31]);                //剩余电量。
                info.pi_version        = _content[32].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);
        }
コード例 #9
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);
        }
コード例 #10
0
        public bool Execute()
        {
            try
            {
                if (FileManagementDal.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       = ConverUtil.ZF_Value(_content[16]);    //房间内人数
                info.pi_param4       = _content[17].ToString();              //进出门时间
                info.pi_version      = _content[27].ToString();              //版本号。
                info.pi_param9       = ConverUtil.ZF_Value(_content[28]);    //当前温度。
                info.pi_param10      = ConverUtil.ByteToStr_2(_content, 29); //总红外触发次数
                info.pi_policecard   = _content[31].ToString();              //从上次心跳到现在的触发次数

                info.pi_param8 = _content[32].ToString();                    //空旷时距离。
                info.pi_param6 = _content[33].ToString();                    //超声波最大值。
                info.pi_param7 = _content[34].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);
        }
コード例 #11
0
        public bool Execute()
        {
            try
            {
                if (FileManagementDal.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_stationno    = StationId.ToString();
                info.pi_servicetime  = PlatformTime;
                info.pi_param1       = _content[14].ToString();           //门状态。
                info.pi_param2       = ConverUtil.ZF_Value(_content[15]); //房间内人数
                info.pi_param3       = _content[16].ToString();           //每天开门次数
                info.pi_param4       = Battery(_content[17]);             //电池电压。
                info.pi_param5       = _content[18].ToString();           //防拆。
                info.pi_param6       = ConverUtil.ZF_Value(_content[19]); //温度。
                info.pi_version      = _content[34].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);
        }
コード例 #12
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);
        }
コード例 #13
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_param1       = _content[14].ToString();              //轴号
                info.pi_param2       = ConverUtil.ByteToStr_2(_content, 15); //轴值高低位
                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_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);
        }
コード例 #14
0
        public bool Execute()
        {
            try
            {
                DateTime time            = ConverUtil.Time(_content, 0);
                string   pi_devicetype   = ConverUtil.ByteToStr_2(_content, 7);
                string   pi_devicecode   = ConverUtil.ByteToStr_4(_content, 9);
                string   pi_protocoltype = _content[13].ToString();
                string   pi_stationno    = StationId.ToString();
                DateTime pi_servicetime  = PlatformTime;



                string s1 = _content[1].ToString();                                     //进门人数
                string s2 = (Convert.ToDouble(_content[1].ToString()) / 10).ToString(); //进超声波时刻(热释电触发始)
                string s3 = (Convert.ToDouble(_content[1].ToString()) / 10).ToString(); //门下驻停离开时刻(热释电触发始)


                string s5 = (Convert.ToDouble(_content[1].ToString()) / 10).ToString();  //最大身高发生时刻(热释电触发始)
                string s6 = (Convert.ToDouble(_content[1].ToString()) / 10).ToString();  //离开超声波范围时刻(热释电触发始)
                string s7 = (Convert.ToDouble(_content[1].ToString()) / 10).ToString();  //关门最初震动时刻(热释电触发始)

                string s8 = (Convert.ToDouble(_content[1].ToString()) / 10).ToString();  //开门最后震动时刻(热释电触发始)
                string s9 = (Convert.ToDouble(_content[1].ToString()) / 10).ToString();  //关门最初震动时刻(人员进门始)

                string s10 = (Convert.ToDouble(_content[1].ToString()) / 10).ToString(); //关门最大震动时刻(热释电触发始)
                string s11 = (Convert.ToDouble(_content[1].ToString()) / 10).ToString(); //关门最后震动时刻(人员进门始)

                string s12 = ConverUtil.ByteToStr_2(_content, 7);                        //开门震动值
                string s13 = ConverUtil.ByteToStr_2(_content, 7);                        //关门震动值
                string s14 = _content[1].ToString();                                     //进出门校准最大身高
                string s15 = _content[1].ToString();                                     //进出门实测最大身高
                string s16 = _content[1].ToString();                                     //对地校准值,近似门框高度。
                string s17 = _content[1].ToString();                                     //RSSI值。
                string s18 = _content[1].ToString();                                     //版本号。


                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_stationno    = StationId.ToString();
                info.pi_servicetime  = PlatformTime;
                info.pi_param1       = _content[14].ToString();           //门状态。
                info.pi_param2       = ConverUtil.ZF_Value(_content[15]); //房间内人数
                info.pi_param3       = _content[16].ToString();           //每天开门次数
                info.pi_param4       = Battery(_content[17]);             //电池电压。
                info.pi_param5       = _content[18].ToString();           //防拆。
                info.pi_param6       = ConverUtil.ZF_Value(_content[19]); //温度。
                info.pi_version      = _content[34].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);
        }
コード例 #15
0
 public Pro_IndateBase_ZHMJ_Bll(Pro_IndateBase_ZHMJ_Mod info)
 {
     this.Info = info;
 }