From 3f8c90087ab90aa865ce4f1bf4d44132426208c1 Mon Sep 17 00:00:00 2001 From: xxe Date: Thu, 10 Nov 2022 14:21:47 +0800 Subject: [PATCH] 1 --- HKCardOUT/Logic/Service/HKCore.cs | 10 +--------- HKCardOUT/ViewModels/RootViewModel.cs | 1 - 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/HKCardOUT/Logic/Service/HKCore.cs b/HKCardOUT/Logic/Service/HKCore.cs index 024315d..62883a1 100644 --- a/HKCardOUT/Logic/Service/HKCore.cs +++ b/HKCardOUT/Logic/Service/HKCore.cs @@ -17,13 +17,6 @@ namespace HKCardOUT.Logic.Service { public class HKCore { - public void GetRecrod() - { - MemoryBus.CardRecord = DbContext.Context.Queryable() - .Where(t => t.CreateTime.Year == DateTime.Now.Year) - .Where(t => t.CreateTime.Month == DateTime.Now.Month) - .Where(t => t.CreateTime.Day == DateTime.Now.Day).ToList(); - } List Commom(SaleLog input) { if (DataBus.StartDevice) @@ -33,7 +26,7 @@ namespace HKCardOUT.Logic.Service HKLogImport.WriteInfo("设备出餐状态:" + checkDevice); if (checkDevice) return null; } - var Old = MemoryBus.CardRecord + var Old = DbContext.Context.Queryable() .Where(t => t.CardNo == input.CardNo) .Where(t => t.CreateTime.Year == DateTime.Now.Year) .Where(t => t.CreateTime.Month == DateTime.Now.Month) @@ -308,7 +301,6 @@ namespace HKCardOUT.Logic.Service entity.State = true; HKLogImport.WriteInfo("正在写入数据库,当前数据:" + entity.ToJson()); DbContext.Context.Insertable(entity).CallEntityMethod(t => t.Create()).ExecuteReturnEntity(); - GetRecrod(); } } } diff --git a/HKCardOUT/ViewModels/RootViewModel.cs b/HKCardOUT/ViewModels/RootViewModel.cs index dd57095..feaf09b 100644 --- a/HKCardOUT/ViewModels/RootViewModel.cs +++ b/HKCardOUT/ViewModels/RootViewModel.cs @@ -37,7 +37,6 @@ namespace HKCardOUT.ViewModels this.Closed += RootViewModel_Closed; var serv = Container.Get(); serv.GetAllCardStatus(); - serv.GetRecrod(); ProcessCard(); InsertData(); }