From ce208aa473d14cb35a3170b335995cda827d8daf Mon Sep 17 00:00:00 2001 From: xxe Date: Sat, 24 Sep 2022 16:50:51 +0800 Subject: [PATCH] 1 --- HKCardOUT/Bootstrapper.cs | 1 + HKCardOUT/Logic/Service/HKCore.cs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/HKCardOUT/Bootstrapper.cs b/HKCardOUT/Bootstrapper.cs index 3cc2b61..0421026 100644 --- a/HKCardOUT/Bootstrapper.cs +++ b/HKCardOUT/Bootstrapper.cs @@ -22,6 +22,7 @@ namespace HKCardOUT /// protected override void OnStart() { + HKLog.HKLogImport.Init("HKCardOUT"); } diff --git a/HKCardOUT/Logic/Service/HKCore.cs b/HKCardOUT/Logic/Service/HKCore.cs index 3976492..8936d65 100644 --- a/HKCardOUT/Logic/Service/HKCore.cs +++ b/HKCardOUT/Logic/Service/HKCore.cs @@ -39,10 +39,13 @@ namespace HKCardOUT.Logic.Service if (condition1 || condition2 || condition1) { var AMDay = Old.Where(t => t.CreateTime.Hour >= AM[0] && t.CreateTime.Hour < AM[1]).Count(); + HKLog.HKLogImport.WriteInfo($"卡号{input.CardNo}上午消费次数:{AMDay}"); if (AMDay > 0) return false; var PMDay = Old.Where(t => t.CreateTime.Hour >= PM[0] && t.CreateTime.Hour < PM[1]).Count(); + HKLog.HKLogImport.WriteInfo($"卡号{input.CardNo}中午消费次数:{AMDay}"); if (PMDay > 0) return false; var ATDay = Old.Where(t => t.CreateTime.Hour >= AT[0] && t.CreateTime.Hour < AT[1]).Count(); + HKLog.HKLogImport.WriteInfo($"卡号{input.CardNo}下午消费次数:{AMDay}"); if (ATDay > 0) return false;