xxe 2 years ago
parent
commit
ce208aa473
2 changed files with 4 additions and 0 deletions
  1. +1
    -0
      HKCardOUT/Bootstrapper.cs
  2. +3
    -0
      HKCardOUT/Logic/Service/HKCore.cs

+ 1
- 0
HKCardOUT/Bootstrapper.cs View File

@@ -22,6 +22,7 @@ namespace HKCardOUT
/// </summary> /// </summary>
protected override void OnStart() protected override void OnStart()
{ {

HKLog.HKLogImport.Init("HKCardOUT"); HKLog.HKLogImport.Init("HKCardOUT");
} }




+ 3
- 0
HKCardOUT/Logic/Service/HKCore.cs View File

@@ -39,10 +39,13 @@ namespace HKCardOUT.Logic.Service
if (condition1 || condition2 || condition1) if (condition1 || condition2 || condition1)
{ {
var AMDay = Old.Where(t => t.CreateTime.Hour >= AM[0] && t.CreateTime.Hour < AM[1]).Count(); 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; if (AMDay > 0) return false;
var PMDay = Old.Where(t => t.CreateTime.Hour >= PM[0] && t.CreateTime.Hour < PM[1]).Count(); 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; if (PMDay > 0) return false;
var ATDay = Old.Where(t => t.CreateTime.Hour >= AT[0] && t.CreateTime.Hour < AT[1]).Count(); 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; if (ATDay > 0) return false;






Loading…
Cancel
Save