public bool Execute() { try { if (Filter_0426_Bll.IsRepeat(_content)) { MyLibrary.Log.RepeatDataInfo("基站编号:" + StationId.ToString() + " 原始代码:" + OriginalCode); return(true); } CZW_61506_0426_01_Mod Cm = CZW_61506_0426_01_Dal.GetMod(this._content); Cm.基站编号 = (uint)StationId; Cm.平台时间 = this.PlatformTime; Pro_InDatabase_NFC_Mod info = CZW_61506_0426_01_Dal.Get_Pro_Mod(Cm); Pro_InDatabase_NFC_Bll c = new Pro_InDatabase_NFC_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); }
/// <summary> /// 得到195(H:C3)实体 /// </summary> /// <param name="content"></param> /// <returns></returns> public static CZW_61506_0426_01_Mod GetMod(byte[] content) { CZW_61506_0426_01_Mod info = new CZW_61506_0426_01_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[33]; info.RSSI = content[34]; return(info); }
public static Pro_InDatabase_NFC_Mod Get_Pro_Mod(CZW_61506_0426_01_Mod info) { Pro_InDatabase_NFC_Mod m = new Pro_InDatabase_NFC_Mod(); m.PI_STATIONNO = info.基站编号.ToString(); m.PI_SERVICETIME = info.平台时间; m.PI_DEVICETIME = info.设备时间; m.PI_RELAYNO = info.中继号; m.PI_DEVICETYPE = info.设备类型.ToString(); m.PI_DEVICECODE = info.设备编号.ToString(); m.PI_PROTOCOLTYPE = info.命令字.ToString(); m.PI_BATTERY = info.电池电量.ToString(); m.PI_VERSION = info.软件版本号.ToString(); m.PI_RSSI = info.RSSI.ToString(); return(m); }