From dbe5771c1a87ad0318f10ac25912552e82a1c329 Mon Sep 17 00:00:00 2001 From: douhandong Date: Mon, 4 Nov 2024 15:26:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DS.Module.Quartz/QuartzModuleInstall.cs | 28 +++++++++---------- .../QuarztJobs/Method/BankStatementService.cs | 7 +++-- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/ds-wms-service/DS.Module.Quartz/QuartzModuleInstall.cs b/ds-wms-service/DS.Module.Quartz/QuartzModuleInstall.cs index 5ebddd1a..49090bbe 100644 --- a/ds-wms-service/DS.Module.Quartz/QuartzModuleInstall.cs +++ b/ds-wms-service/DS.Module.Quartz/QuartzModuleInstall.cs @@ -11,22 +11,22 @@ namespace DS.Module.QuartzModuleInstall { public static void AddFeeQuartzModuleInstall(this IServiceCollection services, IConfiguration configuration) { - //获取进项发票 - var jobKey = new JobKey("InInvoice"); + ////获取进项发票 + //var jobKey = new JobKey("InInvoice"); - services.AddQuartz(q => - { - // 配置 Quartz - q.UseMicrosoftDependencyInjectionJobFactory(); + //services.AddQuartz(q => + //{ + // // 配置 Quartz + // q.UseMicrosoftDependencyInjectionJobFactory(); - q.AddJob(opts => opts.WithIdentity(jobKey)); - q.AddTrigger(opts => opts - .ForJob(jobKey) - .WithIdentity("InInvoice-trigger") - .WithSimpleSchedule(x => x - .WithIntervalInSeconds(60) - .RepeatForever())); - }); + // q.AddJob(opts => opts.WithIdentity(jobKey)); + // q.AddTrigger(opts => opts + // .ForJob(jobKey) + // .WithIdentity("InInvoice-trigger") + // .WithSimpleSchedule(x => x + // .WithIntervalInSeconds(60) + // .RepeatForever())); + //}); //获取银行流水 diff --git a/ds-wms-service/DS.WMS.Core/QuarztJobs/Method/BankStatementService.cs b/ds-wms-service/DS.WMS.Core/QuarztJobs/Method/BankStatementService.cs index 1d54bf71..6fe378c3 100644 --- a/ds-wms-service/DS.WMS.Core/QuarztJobs/Method/BankStatementService.cs +++ b/ds-wms-service/DS.WMS.Core/QuarztJobs/Method/BankStatementService.cs @@ -72,17 +72,18 @@ namespace DS.WMS.Core.QuarztJobs.Method }); - var listdt = info.result.Select(t => t.TransactionReferenceNumber).ToList(); - var ininviceinfo = tenantDb.Queryable().Where(x =>listdt .Contains(x.TransactionReferenceNumber)).ToList(); + var listdt = info.result.Select(t => t.RecordID).ToList(); + var ininviceinfo = tenantDb.Queryable().Where(x =>listdt .Contains(x.RecordID)).ToList(); foreach (var itemdata in info.result) { //数据库中银行流水为空,则添加银行流水数据数据 - if (ininviceinfo.Where(t => t.TransactionReferenceNumber == itemdata.TransactionReferenceNumber).Count() == 0) + if (ininviceinfo.Where(t => t.RecordID == itemdata.RecordID).Count() == 0) { BankStatement bs = new BankStatement(); bs.Id = SnowFlakeSingle.Instance.NextId(); + bs.OrgId = item.OrgId; bs.Custom = itemdata.Custom; bs.BankName = itemdata.BankName;