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

                Pro_IndateBase_DZMP_Mod info = new Pro_IndateBase_DZMP_Mod();
                info.pi_bigtype      = "2";
                info.pi_protocoltype = "531";
                info.pi_devicetime   = ConverUtil.Time(_content, 0);
                info.pi_cardtype     = _content[6].ToString();                                                                                  //卡类型
                info.pi_cardid       = info.pi_cardtype == "0" ? ConverUtil.ByteToStr_Q(_content, 7, 8) : ConverUtil.ByteToStr_4(_content, 11); //设备时间
                info.pi_devicetype   = ConverUtil.ByteToStr_2(_content, 15);                                                                    //设备类型
                info.pi_devicecode   = ConverUtil.ByteToStr_4(_content, 17);                                                                    //设备Id
                info.pi_stationno    = StationId.ToString();
                info.pi_servicetime  = PlatformTime;
                Other.ChuZuWu.Pro_IndateBase_DZMP_Bll c = new Other.ChuZuWu.Pro_IndateBase_DZMP_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 (_content.Length != 22)
                {
                    MyLibrary.Log.Debug(Name + "长度无效:原始代码:" + OriginalCode);
                    return(true);
                }

                string   ElectronicsDoorPlate   = ConverUtil.ByteToStr_4(_content, 0);    //电子门牌ID
                string   MasterIdentificationId = ConverUtil.ByteToStr_Q(_content, 4, 8); //房东身份证ID
                string   PoliceCard             = ConverUtil.ByteToStr_4(_content, 12);   // 警察卡ID
                DateTime time = ConverUtil.Time(_content, 16);                            //设备时间


                Pro_IndateBase_DZMP_Mod info = new Pro_IndateBase_DZMP_Mod();
                info.pi_bigtype        = "2";
                info.pi_devicetype     = "1029";
                info.pi_protocoltype   = "522";
                info.pi_devicetime     = time;
                info.pi_stationno      = StationId.ToString();
                info.pi_servicetime    = PlatformTime;
                info.pi_devicecode     = ElectronicsDoorPlate;
                info.pi_identitycardid = MasterIdentificationId;
                info.pi_cardid         = PoliceCard;

                Other.ChuZuWu.Pro_IndateBase_DZMP_Bll c = new Other.ChuZuWu.Pro_IndateBase_DZMP_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);
        }
Esempio n. 3
0
        public bool Execute()
        {
            try
            {
                if (_content.Length != 38)
                {
                    MyLibrary.Log.Debug(Name + "长度无效:原始代码:" + OriginalCode);
                    return(true);
                }



                Pro_IndateBase_DZMP_Mod info = new Pro_IndateBase_DZMP_Mod();
                info.pi_bigtype            = "2";
                info.pi_devicetype         = "1029";
                info.pi_protocoltype       = "524";
                info.pi_devicetime         = ConverUtil.Time(_content, 32);           //设备时间
                info.pi_devicecode         = ConverUtil.ByteToStr_4(_content, 0);     //电子门牌ID
                info.pi_lordidentitycardid = ConverUtil.ByteToStr_Q(_content, 4, 8);  //房东身份证ID
                info.pi_identitycardid     = ConverUtil.ByteToStr_Q(_content, 12, 8); //租客身份证ID
                info.pi_cardid             = ConverUtil.ByteToStr_4(_content, 20);    // e居住卡ID
                info.pi_activecardid       = ConverUtil.ByteToStr_4(_content, 24);    // 有源卡ID
                info.pi_roomno             = ConverUtil.ByteToStr_4(_content, 28);    // 房间ID
                info.pi_stationno          = StationId.ToString();
                info.pi_servicetime        = PlatformTime;

                Other.ChuZuWu.Pro_IndateBase_DZMP_Bll c = new Other.ChuZuWu.Pro_IndateBase_DZMP_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);
        }
Esempio n. 4
0
        public bool Execute()
        {
            try
            {
                if (_content.Length != 14)
                {
                    MyLibrary.Log.Debug(Name + "长度无效:原始代码:" + OriginalCode);
                    return(true);
                }


                string   HomeId = ConverUtil.ByteToStr_4(_content, 0);                //房间ID
                DateTime time   = ConverUtil.Time(_content, 4);                       //撤布防时间
                string   OrganizeDefenceState = ConverUtil.ByteToStr_4(_content, 10); //撤布防状态

                Pro_IndateBase_DZMP_Mod info = new Pro_IndateBase_DZMP_Mod();
                info.pi_bigtype      = "1";
                info.pi_devicetime   = time;
                info.pi_devicetype   = "1029";
                info.pi_protocoltype = "521";
                info.pi_roomno       = HomeId;
                info.pi_status       = OrganizeDefenceState;
                info.pi_stationno    = StationId.ToString();
                info.pi_servicetime  = PlatformTime;

                Other.ChuZuWu.Pro_IndateBase_DZMP_Bll c = new Other.ChuZuWu.Pro_IndateBase_DZMP_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 static void Exec(Pro_IndateBase_DZMP_Mod info, out int resultnum, out string reason)
        {
            Database  db  = DataConnect.GetConnect;
            DbCommand cmd = db.GetStoredProcCommand("pro_indatebase_dzmp");

            db.AddInParameter(cmd, ":pi_bigtype", DbType.String, info.pi_bigtype);
            db.AddInParameter(cmd, ":pi_devicetime", DbType.Date, info.pi_devicetime);
            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_roomno", DbType.String, info.pi_roomno);
            db.AddInParameter(cmd, ":pi_cardtype", DbType.String, info.pi_cardtype);
            db.AddInParameter(cmd, ":pi_cardid", DbType.String, info.pi_cardid);
            db.AddInParameter(cmd, ":pi_identitycardid", DbType.String, info.pi_identitycardid);
            db.AddInParameter(cmd, ":pi_lordidentitycardid", DbType.String, info.pi_lordidentitycardid);
            db.AddInParameter(cmd, ":pi_activecardid", DbType.String, info.pi_activecardid);
            db.AddInParameter(cmd, ":pi_status", DbType.String, info.pi_status);
            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_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.AddOutParameter(cmd, ":po_resultnum", DbType.String, 256);
            db.AddOutParameter(cmd, ":po_reason", DbType.String, 512);
            db.ExecuteNonQuery(cmd);

            var resultNum = db.GetParameterValue(cmd, ":po_resultnum");

            if (resultNum != null && resultNum.ToString() != "")
            {
                resultnum = Convert.ToInt16(resultNum);
            }
            else
            {
                resultnum = 0;
            }
            reason = db.GetParameterValue(cmd, ":po_reason").ToString();
        }
Esempio n. 6
0
 public Pro_IndateBase_DZMP_Bll(Pro_IndateBase_DZMP_Mod info)
 {
     this.Info = info;
 }