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