diff --git a/HKCardOUT/Logic/RemoteService.cs b/HKCardOUT/Logic/RemoteService.cs index 2b54e76..021bbff 100644 --- a/HKCardOUT/Logic/RemoteService.cs +++ b/HKCardOUT/Logic/RemoteService.cs @@ -47,13 +47,7 @@ namespace HKCardOUT.Logic t.NodePath = ApiRoute.SyncSaleLog; }).Build().RunStringFirst(); HKLog.HKLogImport.WriteInfo($"同步消费时候调用:{data}"); - var m = bool.Parse(data.ToModel()["data"].ToString()); - if (m) - { - UHF_RS485_Helper.GetInstance().OpenBeep(StallId.AsInt()); - return m; - } - else return false; + return bool.Parse(data.ToModel()["data"].ToString()); } catch (Exception ex) { diff --git a/HKCardOUT/Logic/Service/HKCore.cs b/HKCardOUT/Logic/Service/HKCore.cs index 1eeca0d..4c55175 100644 --- a/HKCardOUT/Logic/Service/HKCore.cs +++ b/HKCardOUT/Logic/Service/HKCore.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using UHFHelper; using XExten.Advance.LinqFramework; namespace HKCardOUT.Logic.Service @@ -56,7 +57,10 @@ namespace HKCardOUT.Logic.Service { //先出餐后推数据 if (DataBus.StartDevice) + { Main.GetInstance.Start(input.Location.AsInt()); + UHF_RS485_Helper.GetInstance().OpenBeep(input.Location.AsInt()); + } var res = RemoteService.SyncSaleLog(input.CardNo, input.Location); if (res) DbContext.Context.Updateable().SetColumns(t => t.IsSync == true).Where(t => t.Id == entity.Id).ExecuteCommand(); @@ -65,7 +69,10 @@ namespace HKCardOUT.Logic.Service else { if (DataBus.StartDevice) + { Main.GetInstance.Start(input.Location.AsInt()); + UHF_RS485_Helper.GetInstance().OpenBeep(input.Location.AsInt()); + } return true; } } @@ -108,7 +115,10 @@ namespace HKCardOUT.Logic.Service { //先出餐后推数据 if (DataBus.StartDevice) + { Main.GetInstance.Start(input.Location.AsInt()); + UHF_RS485_Helper.GetInstance().OpenBeep(input.Location.AsInt()); + } var res = RemoteService.SyncSaleLog(input.CardNo, input.Location); if (res) DbContext.Context.Updateable().SetColumns(t => t.IsSync == true).Where(t => t.Id == entity.Id).ExecuteCommand(); @@ -117,7 +127,10 @@ namespace HKCardOUT.Logic.Service else { if (DataBus.StartDevice) + { Main.GetInstance.Start(input.Location.AsInt()); + UHF_RS485_Helper.GetInstance().OpenBeep(input.Location.AsInt()); + } return true; } } @@ -160,7 +173,10 @@ namespace HKCardOUT.Logic.Service { //先出餐后推数据 if (DataBus.StartDevice) + { Main.GetInstance.Start(input.Location.AsInt()); + UHF_RS485_Helper.GetInstance().OpenBeep(input.Location.AsInt()); + } var res = RemoteService.SyncSaleLog(input.CardNo, input.Location); if (res) DbContext.Context.Updateable().SetColumns(t => t.IsSync == true).Where(t => t.Id == entity.Id).ExecuteCommand(); @@ -169,7 +185,10 @@ namespace HKCardOUT.Logic.Service else { if (DataBus.StartDevice) + { Main.GetInstance.Start(input.Location.AsInt()); + UHF_RS485_Helper.GetInstance().OpenBeep(input.Location.AsInt()); + } return true; } } diff --git a/HKCardOUT/ViewModels/RootViewModel.cs b/HKCardOUT/ViewModels/RootViewModel.cs index e9de36d..aaa31fe 100644 --- a/HKCardOUT/ViewModels/RootViewModel.cs +++ b/HKCardOUT/ViewModels/RootViewModel.cs @@ -91,7 +91,7 @@ namespace HKCardOUT.ViewModels HandyControl.Controls.Growl.InfoGlobal("系统已离线,请连接网络,并重启程序!"); } - Thread.Sleep(10); + Thread.Sleep(50); }), "串口监听"); }); diff --git a/HKCardOUT/options.json b/HKCardOUT/options.json index 238dae0..e11dd17 100644 --- a/HKCardOUT/options.json +++ b/HKCardOUT/options.json @@ -22,5 +22,5 @@ //每个时间段的刷卡次数 "Count":1, //取消单卡刷卡限制 - "Cancel":true + "Cancel":false }