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

+ 7
- 7
HKCardOUT/Bootstrapper.cs View File

@@ -72,13 +72,13 @@ namespace HKCardOUT
/// </summary>
protected override void OnLaunch()
{
QuartzCoreFactory.QuartzCore().AddJob<QuartzJob>(new QuartzMap
{
JobDetail = "定时推送订单",
Cron = DataBus.Cron,
JobName = "订单",
JobGroup = "订单"
});
//QuartzCoreFactory.QuartzCore().AddJob<QuartzJob>(new QuartzMap
//{
// JobDetail = "定时推送订单",
// Cron = DataBus.Cron,
// JobName = "订单",
// JobGroup = "订单"
//});
base.OnLaunch();
}



+ 1
- 0
HKCardOUT/Logic/RemoteService.cs View File

@@ -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<JObject>()["data"].ToString());
if (m)
{


+ 2
- 1
HKCardOUT/Logic/Service/HKCore.cs View File

@@ -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());


Loading…
Cancel
Save