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

                Pro_IndataBase_ZNMP_Mod info = new Pro_IndataBase_ZNMP_Mod();
                info.Pi_StationNo    = StationId.ToString();
                info.Pi_ServiceTime  = PlatformTime;
                info.Pi_DeviceTime   = ConverUtil.Time(_content, 0);
                info.Pi_RelayNo      = _content[6].ToString();
                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();              //第1级别进门累计
                info.Pi_Param3  = _content[16].ToString();              //第1级别出门累计
                info.Pi_Param4  = _content[17].ToString();              //第3级别进门累计
                info.Pi_Param5  = _content[18].ToString();              //第3级别出门累计
                info.Pi_Param6  = _content[19].ToString();              //第5级别进门累计
                info.Pi_Param7  = _content[20].ToString();              //第5级别出门累计
                info.Pi_Param8  = _content[21].ToString();              //驻停时平均身高
                info.Pi_Param9  = _content[22].ToString();              //门下数据波动性特征值1
                info.Pi_Param10 = _content[23].ToString();              //门下数据波形性特征值2
                info.Pi_Param11 = _content[24].ToString();              //本次进出门中最大身高(计算值)
                info.Pi_Param12 = _content[25].ToString();              //本次进出门中最大身高(计算值)
                info.Pi_Param13 = _content[26].ToString();              //对地校准值
                info.Pi_Param14 = _content[27].ToString();              //离开超声波侦测场时身高
                info.Pi_Param15 = ConverUtil.ByteToStr_2(_content, 28); //关联0x15协议的CRC值

                info.Pi_Rssi    = _content[33].ToString();              //RSSI值。
                info.Pi_Version = _content[34].ToString();              //版本号。

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

                Pro_IndataBase_ZNMP_Mod info = new Pro_IndataBase_ZNMP_Mod();
                info.Pi_StationNo    = StationId.ToString();
                info.Pi_ServiceTime  = PlatformTime;
                info.Pi_DeviceTime   = ConverUtil.Time(_content, 0);
                info.Pi_RelayNo      = _content[6].ToString();
                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       = (Convert.ToDouble(_content[15]) / 10).ToString(); //进超声波时刻(热释电触发始)
                info.Pi_Param3       = (Convert.ToDouble(_content[16]) / 10).ToString(); //门下驻停时刻(热释电触发始)
                info.Pi_Param4       = (Convert.ToDouble(_content[17]) / 10).ToString(); //进门时刻(热释电触发始)
                info.Pi_Param5       = (Convert.ToDouble(_content[18]) / 10).ToString(); //最大身高发生时刻(热释电触发始)
                info.Pi_Param6       = (Convert.ToDouble(_content[19]) / 10).ToString(); //开门最初震动时刻(热释电触发始)
                info.Pi_Param7       = (Convert.ToDouble(_content[20]) / 10).ToString(); //开门最大震动时刻(热释电触发始)
                info.Pi_Param8       = (Convert.ToDouble(_content[21]) / 10).ToString(); //开门最后震动时刻(热释电触发始)
                info.Pi_Param9       = (Convert.ToDouble(_content[22]) / 10).ToString(); //关门最初震动时刻(人员进门始)
                info.Pi_Param10      = (Convert.ToDouble(_content[23]) / 10).ToString(); //关门最大震动时刻(人员进门始)
                info.Pi_Param11      = (Convert.ToDouble(_content[24]) / 10).ToString(); //关门最后震动时刻(人员进门始)
                info.Pi_Param12      = ConverUtil.ByteToStr_2(_content, 25);             //开门震动值
                info.Pi_Param13      = ConverUtil.ByteToStr_2(_content, 27);             //关门震动值
                info.Pi_Param14      = _content[29].ToString();                          //进出门校准最大身高
                info.Pi_Param15      = _content[30].ToString();                          //进出门实测最大身高
                info.Pi_Param16      = _content[31].ToString();                          //对地校准值,近似门框高度。
                info.Pi_Rssi         = _content[33].ToString();                          //RSSI值。
                info.Pi_Version      = _content[34].ToString();                          //版本号。

                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 (FileManagementDal.RepeatData.IsRepeatData(_content))
                {
                    MyLibrary.Log.RepeatDataInfo("基站编号:" + StationId.ToString() + " 原始代码:" + OriginalCode);
                    return(true);
                }

                Pro_IndataBase_ZNMP_Mod info = new Pro_IndataBase_ZNMP_Mod();
                info.Pi_StationNo    = StationId.ToString();
                info.Pi_ServiceTime  = PlatformTime;
                info.Pi_DeviceTime   = ConverUtil.Time(_content, 0);
                info.Pi_RelayNo      = _content[6].ToString();
                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       = _content[17].ToString();                                                  //工作状态
                info.Pi_Param5       = ConverUtil.ZF_Value(_content[18]);                                        //当前环境温度
                info.Pi_Param6       = _content[19].ToString();                                                  //防拆
                info.Pi_Param7       = Battery(_content[20]);                                                    //电池电压
                info.Pi_Param8       = (Convert.ToUInt16(_content[21]) * 3).ToString();                          //热视电触发次数(从上次心跳到这次心跳之间)
                info.Pi_Param9       = ConverUtil.ByteToStr_2(_content, 22);;                                    //超声波总工作时间
                info.Pi_Param10      = (Convert.ToUInt16(ConverUtil.ByteToStr_2(_content, 24)) * 10).ToString(); //热释电总触发次数
                info.Pi_Param11      = (Convert.ToUInt16(ConverUtil.ByteToStr_2(_content, 26)) * 10).ToString(); //总震动次数
                info.Pi_Param12      = _content[28].ToString();                                                  //每月按键触发次数
                char[] array = DevState(_content[29]);
                info.Pi_Param13 = array[0].ToString();                                                           //超声波故障
                info.Pi_Param14 = array[1].ToString();                                                           //热释电故障
                info.Pi_Rssi    = _content[33].ToString();                                                       //RSSI值
                info.Pi_Version = _content[34].ToString();                                                       //版本号

                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);
                }


                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);
        }