From 4b077186b0a4680d14af7c9a454dddc54e1ac996 Mon Sep 17 00:00:00 2001 From: xxe Date: Sat, 24 Sep 2022 16:46:47 +0800 Subject: [PATCH] 1 --- HKCardOUT/Bootstrapper.cs | 14 +++++++------- HKCardOUT/Logic/RemoteService.cs | 1 + HKCardOUT/Logic/Service/HKCore.cs | 3 ++- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/HKCardOUT/Bootstrapper.cs b/HKCardOUT/Bootstrapper.cs index e867537..3cc2b61 100644 --- a/HKCardOUT/Bootstrapper.cs +++ b/HKCardOUT/Bootstrapper.cs @@ -72,13 +72,13 @@ namespace HKCardOUT /// protected override void OnLaunch() { - QuartzCoreFactory.QuartzCore().AddJob(new QuartzMap - { - JobDetail = "定时推送订单", - Cron = DataBus.Cron, - JobName = "订单", - JobGroup = "订单" - }); + //QuartzCoreFactory.QuartzCore().AddJob(new QuartzMap + //{ + // JobDetail = "定时推送订单", + // Cron = DataBus.Cron, + // JobName = "订单", + // JobGroup = "订单" + //}); base.OnLaunch(); } diff --git a/HKCardOUT/Logic/RemoteService.cs b/HKCardOUT/Logic/RemoteService.cs index f6a00f5..09b328e 100644 --- a/HKCardOUT/Logic/RemoteService.cs +++ b/HKCardOUT/Logic/RemoteService.cs @@ -44,6 +44,7 @@ namespace HKCardOUT.Logic t.JsonParam = (new { GateId = GateId, Type = -1, CardNum = CardNo }).ToJson(); t.NodePath = ApiRoute.SyncSaleLog; }).Build().RunStringFirst(); + HKLog.HKLogImport.WriteInfo($"同步消费时候调用:{data}"); var m = bool.Parse(data.ToModel()["data"].ToString()); if (m) { diff --git a/HKCardOUT/Logic/Service/HKCore.cs b/HKCardOUT/Logic/Service/HKCore.cs index 26e0542..3976492 100644 --- a/HKCardOUT/Logic/Service/HKCore.cs +++ b/HKCardOUT/Logic/Service/HKCore.cs @@ -35,7 +35,7 @@ namespace HKCardOUT.Logic.Service var condition1 = (DateTime.Now.Hour >= AM[0] && DateTime.Now.Hour < AM[1]); var condition2 = (DateTime.Now.Hour >= PM[0] && DateTime.Now.Hour < PM[1]); var condition3 = (DateTime.Now.Hour >= AT[0] && DateTime.Now.Hour < AT[1]); - + HKLog.HKLogImport.WriteInfo($"当前刷卡时间_条件1:{condition1}_条件2:{condition2}_条件3:{condition3}"); if (condition1 || condition2 || condition1) { var AMDay = Old.Where(t => t.CreateTime.Hour >= AM[0] && t.CreateTime.Hour < AM[1]).Count(); @@ -49,6 +49,7 @@ namespace HKCardOUT.Logic.Service var entity = DbContext.Context.Insertable(input).CallEntityMethod(t => t.Create()).ExecuteReturnEntity(); if (entity.Id != Guid.Empty) { + var res = RemoteService.SyncSaleLog(input.CardNo, input.Location); if (!DataBus.IsTest) Main.GetInstance.Start(input.Location.AsInt());