diff --git a/HKCardOUT/ViewModels/RootViewModel.cs b/HKCardOUT/ViewModels/RootViewModel.cs index b9ca665..ed19c42 100644 --- a/HKCardOUT/ViewModels/RootViewModel.cs +++ b/HKCardOUT/ViewModels/RootViewModel.cs @@ -20,6 +20,7 @@ using UHFHelper; using XExten.Advance.InternalFramework.Securities.Common; using XExten.Advance.LinqFramework; using XExten.Advance.StaticFramework; +using System.Diagnostics; namespace HKCardOUT.ViewModels { @@ -84,9 +85,9 @@ namespace HKCardOUT.ViewModels DataBus.StoreInfo.Devices.ForEach(item => { var res = UHF_RS485_Helper.GetInstance().ReadCard(item.Address.AsInt()); - if (res != null) { + Debug.WriteLine($"卡号地址:{res.Address}----------卡号数据:{res.ResData}"); if (!res.ResData.IsMatch(new Regex("0{20}"))) ReadFunc?.Invoke(res); } @@ -203,6 +204,7 @@ namespace HKCardOUT.ViewModels } catch (Exception ex) { + Debug.WriteLine(ex.ToString()); var win = new AdWindow("暂无广告"); var rectangle = System.Windows.Forms.Screen.AllScreens[0].WorkingArea; win.Height = rectangle.Height; diff --git a/HKCardOUT/options.json b/HKCardOUT/options.json index 0c312b4..e36ddd3 100644 --- a/HKCardOUT/options.json +++ b/HKCardOUT/options.json @@ -6,7 +6,7 @@ //定时任务时间表达式 "Cron": "0 0 0/1 * * ? ", //店铺ID - "StoreId": "a19535e8-119f-4b10-a011-6288fd3ddb37", + "StoreId": "0c32b2e2-0dc9-4941-b73d-3dc91f7268ab", "ConnectionStrings": { "Sqlite": "HKSQL.db3" }, diff --git a/HKLog/HKLogImport.cs b/HKLog/HKLogImport.cs index 765ddb1..c55c931 100644 --- a/HKLog/HKLogImport.cs +++ b/HKLog/HKLogImport.cs @@ -1,4 +1,5 @@ using Serilog; +using System.Diagnostics; namespace HKLog { @@ -15,10 +16,12 @@ namespace HKLog public static void WriteInfo(string msg) { Log.Logger.Information(msg); + Debug.WriteLine(msg); } public static void WriteError(Exception ex) { Log.Logger.Error(ex, ex.Message); + Debug.WriteLine(ex.ToString()); } } } \ No newline at end of file diff --git a/UHFHelper/UHF_RS485_Helper.cs b/UHFHelper/UHF_RS485_Helper.cs index 35c3038..5b7b667 100644 --- a/UHFHelper/UHF_RS485_Helper.cs +++ b/UHFHelper/UHF_RS485_Helper.cs @@ -85,7 +85,7 @@ namespace UHFHelper DKoutput dKoutput = new(); var readByte = ReadByte(adr); _serialPort.Write(readByte, 0, readByte.Length); - var result = SendMessage(readByte, 2000, 18); + var result = SendMessage(readByte, 150, 18); if (result == null) { return null;