private void Single(byte[] content) { try { Pro_ShipDevice_Sail_Mod info = new Pro_ShipDevice_Sail_Mod(); info.Pi_DevId = StationId.ToString(); //设备编号 info.Pi_DevTime = ConverUtil.Time(content, 0); //设备时间 info.Pi_Lng = FormatNum(content, 6, 4); //经度 info.Pi_Lat = FormatNum(content, 10, 4); //维度 info.Pi_Azimuth = FormatNum(content, 14, 2); //航向 info.Pi_Speed = FormatNum(content, 16, 2); //航速。 info.Pi_StarNum = content[18].ToString(); //卫星数量。 info.Pi_Temperswitch = content[19].ToString(); //防拆开关状态。 UInt16 ResultNum; string Reason; Pro_ShipDevice_Sail_Dal.Exec(info, out ResultNum, out Reason); if (ResultNum != 0) { MyLibrary.Log.Debug(Name + "出错;" + Reason + " 原始代码:" + OriginalCode); } } catch (Exception ex) { MyLibrary.Log.Error(Name + "错误:" + ex.Message + " 原始代码:" + OriginalCode); } }
private Pro_IndateBase_MJNew_Mod GetInfo_New() { Pro_IndateBase_MJNew_Mod info = new Pro_IndateBase_MJNew_Mod(); int IsIdentitycard = Convert.ToInt32(_content[22].ToString());//有无身份证(128:无身份证) string CardType = ""; string ICCard = ""; string HouseNum = ""; //房东编号。 if (IsIdentitycard >= 128) { CardType = _content[13].ToString(); ICCard = ConverUtil.ByteToStr_4(_content, 14); //IC卡。 HouseNum = (IsIdentitycard - 128).ToString(); } else { CardType = "0"; ICCard = ConverUtil.ByteToStr_Q(_content, 10, 8); //租客身份证。 HouseNum = IsIdentitycard.ToString(); } info.pi_bigtype = "2"; info.pi_devicetime = ConverUtil.Time(_content, 0); info.pi_protocoltype = CmdId; info.pi_devicecode = ConverUtil.ByteToStr_4(_content, 6); //门戒编号。 info.pi_cardtype = CardType; info.pi_cardid = ICCard; info.pi_houseno = HouseNum; info.pi_activecardid = ConverUtil.ByteToStr_4(_content, 18); //有源卡。 info.pi_stationno = StationId.ToString(); info.pi_servicetime = PlatformTime; return(info); }
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); }
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); }
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); }
public bool Execute() { try { DateTime DeviceTime = ConverUtil.Time(_content, 0); //设备时间。 string RoomCardType = _content[6].ToString(); //房卡类型。 string OldIdentitycardId = ConverUtil.ByteToStr_Q(_content, 7, 8); //原身份证Id. string NewCardType = _content[15].ToString(); //房卡类型。 string NewIdentitycardId = ConverUtil.ByteToStr_Q(_content, 16, 8); //新身份证Id. string NewIdentitycard = SFZUtil.ByteToStr(_content, 24); //新身份证。 MenJinInfo info = new MenJinInfo(); info.pi_bigtype = "61443"; //0xF003 info.pi_devicetime = DeviceTime; info.pi_devicecode = StationId.ToString(); info.pi_protocoltype = "9"; //0x01 info.pi_lordcardtype = RoomCardType; info.pi_lordidentitycardid = OldIdentitycardId; info.pi_cardtype = NewCardType; info.pi_identitycardid = NewIdentitycardId; info.pi_identitycard = NewIdentitycard; info.pi_servicetime = PlatformTime; string Result = IMj2Dal.Insert(info); 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 { DateTime time = ConverUtil.Time(_content, 0); //设备时间。 string DeviceTypeStr = ConverUtil.ByteToStr_2(_content, 7); //设备类型 string DeviceIdStr = ConverUtil.ByteToStr_4(_content, 9); //设备Id byte DeviceState = _content[14]; //设备状态 string[] BitStr = DataJM.GetBitStr(DeviceState); string OpenCloseState = BitStr[0]; string HLW8012State = BitStr[1]; string PowerNumStr = _content[15].ToString(); //功率因素 string timeStr = time.ToString("yyyy-M-d HH:mm:ss"); QiYeFangHuDal.Insert_XinTiao(DeviceTypeStr, DeviceIdStr, PowerNumStr, "", timeStr, HLW8012State); } catch (Exception ex) { MyLibrary.Log.Error(Name + "错误:" + ex.Message + " 原始代码:" + OriginalCode); } return(true); }
public void WriteTranslateTextDict(string dictKey) { List <string> list = ConverUtil.ConverDictionaryToList(translateTextDict[dictKey]); File.WriteAllLines(Path.Combine(ModLoader.GetModAssetsFolder(GlobalVariables.GetGlobalVariables().mscTranslateChs), dictKey + ".txt"), list.ToArray()); logger.LOG("写入" + dictKey + ".txt文件完成"); }
public bool Execute() { try { if (FileManagement.Commands.MenJin.Filter_Bll.IsRepeat(this.OriginalCode)) { MyLibrary.Log.RepeatDataInfo("基站编号:" + StationId.ToString() + " 原始代码:" + OriginalCode); return(true); } DateTime DeviceTime = ConverUtil.Time(_content, 0); //设备时间。 MJInfo info = new MJInfo(); info.Protocol = "70"; info.DeviceId = StationId.ToString(); info.DeviceTime = DeviceTime; IMjDal.Handle(NAME, OriginalCode, info); } catch (Exception ex) { MyLibrary.Log.Error(NAME + "错误;" + ex.Message + " 原始代码:" + OriginalCode); } return(true); }
private void Single(byte[] content) { try { Pro_CrewregistDevice_Beat_Mod info = new Pro_CrewregistDevice_Beat_Mod(); info.Pi_DevId = StationId.ToString(); //设备编号 info.Pi_DevTime = ConverUtil.Time(content, 0); //设备时间 info.Pi_StateTFT = content[6].ToString(); //tft屏状态 info.Pi_State433 = content[7].ToString(); //433状态 info.Pi_StateReader = content[8].ToString(); //读卡器状态 info.Pi_StateCard = content[9].ToString(); //身份证读卡器状态 info.Pi_StatePrint = content[10].ToString(); //打印机状态 info.Pi_StateSd = content[11].ToString(); //SD卡状态 UInt16 ResultNum; string Reason; Pro_CrewregistDevice_Beat_Dal.Exec(info, out ResultNum, out Reason); if (ResultNum != 0) { MyLibrary.Log.Debug(Name + "出错;" + Reason + " 原始代码:" + OriginalCode); } } catch (Exception ex) { MyLibrary.Log.Error(Name + "错误:" + ex.Message + " 原始代码:" + OriginalCode); } }
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); }
public MJ_33_0003(byte[] _content, ulong _devid, DateTime _time) { this._devid = _devid; this._content = _content; this._time = _time; this.OriginalCode = ConverUtil.ByteToStr_A(_content); }
public bool Execute() { try { int length = 12; int count = _content.Length / length; DateTime DeviceTime; string MacAddress = ""; for (int i = 0; i < count; i++) { DeviceTime = ConverUtil.Time(_content, i * length); //设备时间。 MacAddress = ConverUtil.ByteToStr_Q(_content, 6 + (i * length), 6); //Mac地址。 MenJinInfo info = new MenJinInfo(); info.pi_bigtype = "61446"; //0xF006 info.pi_devicetime = DeviceTime; info.pi_devicecode = StationId.ToString(); info.pi_param1 = MacAddress; info.pi_servicetime = PlatformTime; string Result = IMj2Dal.Insert(info); if (Result != "0") { MyLibrary.Log.Debug(NAME + "出错:" + Result + " 原始代码:" + OriginalCode); } } } catch (Exception ex) { MyLibrary.Log.Error(NAME + "出错:" + ex.Message + " 原始代码:" + OriginalCode); } return(true); }
public static CZW_61506_0411_177_Mod GetMod(byte[] content) { CZW_61506_0411_177_Mod info = new CZW_61506_0411_177_Mod(); info.设备时间 = ConverUtil.Time(content, 0); info.中继号 = content[6].ToString(); info.设备类型 = ConverUtil.ByteToInt_2(content, 7); info.设备编号 = ConverUtil.ByteToInt_4(content, 9); info.命令字 = content[13]; info.环境状态 = content[14]; info.环境值 = content[15]; info.对地校准值 = content[16]; info.工作状态 = content[17]; info.当前环境温度 = ConverUtil.ByteToInt16(content[18]); info.防拆报警和当前门状态_信息 = GetJC_1(content[19]); info.电池电压 = content[20]; info.热视电触发次数 = content[21]; info.超声波总工作时间 = ConverUtil.ByteToUint16(content.Skip(22).Take(2).ToArray()); info.热释电总触发次数 = ConverUtil.ByteToUint16(content.Skip(24).Take(2).ToArray()); info.总震动次数 = ConverUtil.ByteToUint16(content.Skip(26).Take(2).ToArray()); info.门左右倾斜角度 = ConverUtil.ByteToInt16(content[28]); info.设备状态_信息 = GetJC_2(content[29]); info.门上下倾斜角度 = ConverUtil.ByteToInt16(content[30]); info.激光关门值 = content[31]; info.烟感和激光使能_信息 = GetJC_3(content[32]); info.版本号 = content[33]; info.RSSI值 = content[34]; return(info); }
public bool Execute() { try { int length = 19; int count = _content.Length / length; byte[] DeviceType; byte[] content; for (int i = 0; i < count; i++) { DeviceType = new byte[2]; Array.Copy(_content, 7 + length * i, DeviceType, 0, 2); content = new byte[19]; Array.Copy(_content, length * i, content, 0, length); ICommand cmd; switch (ConverUtil.ByteToStr_A(DeviceType)) { case "0444": cmd = new CeXie_61443_0444(content, StationId, PlatformTime); break; default: cmd = new IgnoreCommand(); break; } cmd.Execute(); } } catch (Exception ex) { MyLibrary.Log.Error("处理协议格式命令错误:" + ex.Message); } return(true); }
private void Single(byte[] content) { try { Pro_CrewregistDevice_Card_Mod info = new Pro_CrewregistDevice_Card_Mod(); info.Pi_DevId = StationId.ToString(); info.Pi_DevTime = ConverUtil.Time(content, 0); //设备时间 info.Pi_CardId = ConverUtil.ByteToStr_Q(content, 6, 8); //身份证卡号 info.Pi_Identity = ConverUtil.ASI_To_Str(ConverUtil.ByteToStr_Q(Content, 14, 18)); //身份证号 info.Pi_Name = Address(ConverUtil.ByteToStr_Q(Content, 32, 30)); //姓名 info.Pi_Sex = IsSex(ConverUtil.ByteToStr_Q(Content, 62, 1)); //性别。 info.Pi_Nation = ConverUtil.MinZu(ConverUtil.ByteToStr_Q(Content, 63, 2)); //民族。 info.Pi_Birthday = TimeStr(ConverUtil.ByteToStr_Q(Content, 65, 8)); //出生年月日。 info.Pi_Address = Address(ConverUtil.ByteToStr_Q(Content, 73, 70)); //住址。 info.Pi_SignUnit = Address(ConverUtil.ByteToStr_Q(Content, 143, 30)); //签发机关。 info.Pi_StartTime = TimeStr(ConverUtil.ByteToStr_Q(Content, 173, 8)); //起始日期。 info.Pi_EndTime = TimeStr(ConverUtil.ByteToStr_Q(Content, 181, 8)); //结束日期。 UInt16 ResultNum; string Reason; Pro_CrewregistDevice_Card_Dal.Exec(info, out ResultNum, out Reason); if (ResultNum != 0) { MyLibrary.Log.Debug(Name + "出错;" + Reason + " 原始代码:" + OriginalCode); } } catch (Exception ex) { MyLibrary.Log.Error(Name + "错误:" + ex.Message + " 原始代码:" + OriginalCode); } }
public bool Execute() { try { 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(); char[] ModelStateChar = DataJM.ModelState(_content[14].ToString()); info.pi_param1 = ModelStateChar[0].ToString(); //模块状态 info.pi_param2 = ModelStateChar[1].ToString(); //模块状态 info.pi_param3 = DataJM.电池电压(_content, 15); //电池电压。 info.pi_version = _content[18].ToString(); 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); }
public bool Execute() { try { if (_content.Length < 12) { MyLibrary.Log.Debug(NAME + "数据长度无效:原始代码:" + OriginalCode); return(true); } if (FileManagement.Commands.MenJin.Filter_Bll.IsRepeat(this.OriginalCode)) { MyLibrary.Log.RepeatDataInfo("基站编号:" + StationId.ToString() + " 原始代码:" + OriginalCode); return(true); } DateTime time = ConverUtil.Time(_content, 0); //设备时间。 string CardId = ConverUtil.ByteToStr_4(_content, 6); //卡Id MJInfo info = new MJInfo(); info.Protocol = "2"; info.DeviceId = StationId.ToString(); info.CardId = CardId; info.DeviceTime = time; info.CardType = _content[10].ToString(); IMjDal.Handle(NAME, OriginalCode, info); } catch (Exception ex) { MyLibrary.Log.Error(NAME + "错误:" + ex.Message + " 原始代码:" + OriginalCode); } return(true); }
public bool Execute() { try { byte[] Data; Data = new byte[4]; Array.Copy(_content, 6, Data, 0, 4); string SoftVersion = Version(Data); Data = new byte[4]; Array.Copy(_content, 10, Data, 0, 4); string HardwareVersion = Version(Data); Tb_LKCommunity_Mod info = new Tb_LKCommunity_Mod(); info.DeviceTime = ConverUtil.Time(_content, 0); //设备时间。 info.LastUpdateTime = DateTime.Now; //最后更新时间。 info.DeviceId = StationId.ToString(); //设备Id。 info.SoftVersion = SoftVersion; //软件版本号。 info.HardwareVersion = HardwareVersion; //硬件版本号。 info.Signal = _content[14].ToString(); //信号强度。 FileManagementDal.SocialAppTerminal.Tb_LKCommunity_Dal.Update(info); } catch (Exception ex) { MyLibrary.Log.Error(Name + "出错:" + ex.Message + " 原始代码:" + OriginalCode); } return(true); }
private string StationLat; //基站维度。 public QZGK_61443_8040_01(byte[] _content, ulong _StationId, DateTime _PlatformTime) { this._content = _content; this.StationId = _StationId; this.PlatformTime = _PlatformTime; this.OriginalCode = ConverUtil.ByteToStr_A(_content); }
public bool Execute() { try { DateTime DeviceTime = ConverUtil.Time(_content, 0); //设备时间。 string CardType = _content[6].ToString(); //卡类型。 string IdentitycardId = ConverUtil.ByteToStr_Q(_content, 7, 8); //身份证Id. string Identitycard = SFZUtil.ByteToStr(_content, 15); string HomeNum = _content[24].ToString(); //房东编号 MenJinInfo info = new MenJinInfo(); info.pi_bigtype = "61443"; //0xF004 info.pi_devicetime = DeviceTime; info.pi_devicecode = StationId.ToString(); info.pi_protocoltype = "1"; //0x01 info.pi_cardtype = CardType; info.pi_identitycardid = IdentitycardId; info.pi_identitycard = Identitycard; info.pi_houseno = HomeNum; info.pi_servicetime = PlatformTime; string Result = IMj2Dal.Insert(info); if (Result != "0") { MyLibrary.Log.Debug(NAME + "出错:" + Result + " 原始代码:" + OriginalCode); } } catch (Exception ex) { MyLibrary.Log.Error(NAME + "出错:" + ex.Message + " 原始代码:" + OriginalCode); } return(true); }
/// <summary> /// 得到195(H:C3)实体 /// </summary> /// <param name="content"></param> /// <returns></returns> public static LV_61506_0419_199_Mod GetMod(byte[] content) { LV_61506_0419_199_Mod info = new LV_61506_0419_199_Mod(); info.设备时间 = ConverUtil.Time(content, 0); info.中继号 = content[6].ToString(); info.设备类型 = ConverUtil.ByteToInt_2(content, 7); info.设备编号 = ConverUtil.ByteToInt_4(content, 9); info.命令字 = content[13]; info.进出几人次 = content[14]; info.进出方向标识_信息 = Get_进出方向标识(content[15]); info.每个人身高_信息 = Get_每个人身高(content.Skip(16).Take(8).ToArray()); info.进出结果1_信息 = Get_进出结果1(content[24]); info.进出结果2_信息 = Get_进出结果2(content[25]); info.进门累计统计 = content[26]; info.出门累计统计 = content[27]; info.门状态信息2 = Bit.GetBin(content[28], 0); info.RSSI值 = content[33]; info.版本号 = content[34]; return(info); }
public bool Execute() { try { if (FileManagement.Commands.MenJin.Filter_Bll.IsRepeat(this.OriginalCode)) { MyLibrary.Log.RepeatDataInfo("基站编号:" + StationId.ToString() + " 原始代码:" + OriginalCode); return(true); } DateTime DeviceTime = ConverUtil.Time(_content, 0); //设备时间。 string CardId = ConverUtil.ByteToStr_4(_content, 6); //卡Id string CardType = _content[10].ToString(); string Identitycard = SFZUtil.ByteToStr(_content, 11); //身份证号。 MJInfo info = new MJInfo(); info.Protocol = "657"; info.DeviceId = StationId.ToString(); info.DeviceTime = DeviceTime; info.CardId = CardId; info.CardType = CardType; info.Identitycard = Identitycard; IMjDal.Handle(NAME, OriginalCode, info); } catch (Exception ex) { MyLibrary.Log.Error(NAME + "错误;" + ex.Message + " 原始代码:" + OriginalCode); } return(true); }
public DJJ_2049(byte[] content, ulong stationId, DateTime platformTime) { this.Content = content; this.StationId = stationId; this.PlatformTime = platformTime; this.OriginalCode = ConverUtil.ByteToStr_A(content); }
public bool Execute() { try { if (_content.Length != 11) { MyLibrary.Log.Debug(Name + "长度无效:原始代码:" + OriginalCode); return(true); } Pro_UploadAlarm_Mod info = new Pro_UploadAlarm_Mod(); info.pi_protocoltype = "532"; info.pi_devicetime = ConverUtil.Time(_content, 0); //设备时间 info.pi_roomnum = ConverUtil.ByteToStr_4(_content, 6); //房间Id info.pi_alarmtype = _content[10].ToString(); //报警类型 info.pi_stationno = StationId.ToString(); info.pi_servicetime = PlatformTime; Other.ChuZuWu.Pro_UploadAlarm_Bll c = new Other.ChuZuWu.Pro_UploadAlarm_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 != 10) { MyLibrary.Log.Debug(NAME + "长度错误:" + " 原始代码:" + OriginalCode); return(true); } string SimCardNum = ConverUtil.ByteToStr_Q(_content, 0, 10); //SIM卡串号 MenJinInfo info = new MenJinInfo(); info.pi_bigtype = "67"; //0x0043 info.pi_devicetime = PlatformTime; info.pi_devicetype = ""; info.pi_devicecode = StationId.ToString(); info.pi_param1 = SimCardNum; info.pi_servicetime = PlatformTime; string Result = IMj2Dal.Insert(info); if (Result != "0") { MyLibrary.Log.Debug(NAME + "出错:" + Result + " 原始代码:" + OriginalCode); } } catch (Exception ex) { MyLibrary.Log.Error(NAME + "出错:" + ex.Message + " 原始代码:" + OriginalCode); } return(true); }
public CZW_61504_0430_08(byte[] _content, ulong _StationId, DateTime _PlatformTime) { this._content = _content; this.StationId = _StationId; this.PlatformTime = _PlatformTime; this.OriginalCode = ConverUtil.ByteToStr_A(_content); }
/// <summary> /// 得到195(H:C3)实体 /// </summary> /// <param name="content"></param> /// <returns></returns> public static CZW_61506_0411_197_Mod GetMod(byte[] content) { CZW_61506_0411_197_Mod info = new CZW_61506_0411_197_Mod(); info.设备时间 = ConverUtil.Time(content, 0); info.中继号 = content[6].ToString(); info.设备类型 = ConverUtil.ByteToInt_2(content, 7); info.设备编号 = ConverUtil.ByteToInt_4(content, 9); info.命令字 = content[13]; info.最大身高 = content[14]; info.进出超声波总用时 = content[15]; info.出门关门用时 = content[16]; info.进门后关门时间 = content[17]; info.关门震动级别 = content[18]; info.进出结果1信息 = GetJC_1(content[19]); info.进出结果2信息 = GetJC_2(content[20]); info.进出门标志 = content[21]; info.进门累计统计 = content[22]; info.出门累计统计 = content[23]; info.门状态信息2 = Bit.GetBin(content[24], 0); info.版本号 = content[33]; info.RSSI值 = content[34]; return(info); }
public MJ_33_0296(byte[] _content, ulong _StationId, DateTime _PlatformTime) { this._content = _content; this.StationId = _StationId; this.PlatformTime = _PlatformTime; this.OriginalCode = ConverUtil.ByteToStr_A(_content); }
public static DJJ_2050_Mod GetMod(byte[] content) { DJJ_2050_Mod info = new DJJ_2050_Mod(); info.源卡ID = ConverUtil.ByteToStr_4(content, 0); info.姓名 = GetName(content.Skip(4).Take(32).ToArray()); info.民族 = GetMinZu(content.Skip(36).Take(10).ToArray()); info.身份信息类型 = content[46].ToString(); info.号码长度 = content[47]; info.证件号码 = GetIdCard(content.Skip(48).Take(info.号码长度).ToArray()); //if (info.号码长度 == content.Length - 48) //{ //} //else //{ // throw er; //} return(info); }