From b0dab3f36dd2009ac66d566b77300e17dc066308 Mon Sep 17 00:00:00 2001 From: wxd <123@qq.com> Date: Mon, 22 Dec 2025 15:44:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E5=91=8A=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WebAppoints/WebAppointWebPeisPlugIns.cs | 36 +++++++++++++++---- .../SyncPatientRegisterReportInputDto.cs | 16 ++++++++- ...yncPatientRegisterReportInterfaceWorker.cs | 24 +++++++++++-- 3 files changed, 66 insertions(+), 10 deletions(-) diff --git a/src/Shentun.ColumnReferencePlugIns/WebAppoints/WebAppointWebPeisPlugIns.cs b/src/Shentun.ColumnReferencePlugIns/WebAppoints/WebAppointWebPeisPlugIns.cs index 65959ed9..b4e07660 100644 --- a/src/Shentun.ColumnReferencePlugIns/WebAppoints/WebAppointWebPeisPlugIns.cs +++ b/src/Shentun.ColumnReferencePlugIns/WebAppoints/WebAppointWebPeisPlugIns.cs @@ -125,11 +125,33 @@ namespace Shentun.Peis.PlugIns.WebAppoints SELECT id from patient_register - where last_modification_time >= @HandDate and - complete_flag = @CompleteFlag - "; + where complete_flag = @CompleteFlag "; + + if (input.UploadDateType == '1') + { + sql += " and summary_date>= @HandDate "; + } + else if (input.UploadDateType == '2') + { + sql += " and audit_date>= @HandDate "; + } + else + { + sql += " and last_modification_time>= @HandDate "; + } + + if (input.IsAuditWhere == 'Y') + { + sql += " and is_audit='Y' "; + } + if (input.IsRepeatUpload == 'N') + { + //不要重复上传,筛选是否上传状态 + sql += " and is_upload='N' "; + } + var patientRegisterIds = (await conn.QueryAsync(sql, - new { HandDate = DateTime.Now.Date.AddDays(-input.QueryDays), CompleteFlag = PatientRegisterCompleteFlag.SumCheck })).ToList(); + new { HandDate = DateTime.Now.Date.AddDays(-input.QueryDays), CompleteFlag = PatientRegisterCompleteFlag.SumCheck })).ToList(); return patientRegisterIds; } } @@ -195,8 +217,8 @@ namespace Shentun.Peis.PlugIns.WebAppoints /// public override async Task CreateWeChatOrderRefundAsync(CreateWeChatOrderRefundInputDto input) { - return await CallWePeisAppServiceAsync - (_webPeisCreateWeChatOrderRefundUrl, input); + return await CallWePeisAppServiceAsync + (_webPeisCreateWeChatOrderRefundUrl, input); } public async virtual Task> LoginWebPeisAsync() @@ -325,7 +347,7 @@ namespace Shentun.Peis.PlugIns.WebAppoints } } - + private async Task CheckWebPeisLoginAsync() { diff --git a/src/Shentun.Peis.Application.Contracts/TransToWebPeiss/SyncPatientRegisterReportInputDto.cs b/src/Shentun.Peis.Application.Contracts/TransToWebPeiss/SyncPatientRegisterReportInputDto.cs index 24a8534c..45ab986a 100644 --- a/src/Shentun.Peis.Application.Contracts/TransToWebPeiss/SyncPatientRegisterReportInputDto.cs +++ b/src/Shentun.Peis.Application.Contracts/TransToWebPeiss/SyncPatientRegisterReportInputDto.cs @@ -8,6 +8,20 @@ namespace Shentun.Peis.TransToWebPeiss { //int QueryDays, string reportApiBaseAddress, string reportApiUrl public int QueryDays { get; set; } - + + /// + ///是否筛选审核状态 + /// + public char IsAuditWhere { get; set; } = 'N'; + + /// + /// 是否重复上传 + /// + public char IsRepeatUpload { get; set; } = 'Y'; + + /// + /// 筛选的日期类型 0-最后修改时间 1-总检时间 2-审核时间 + /// + public char UploadDateType { get; set; } } } diff --git a/src/Shentun.Peis.HttpApi.Host/Schedulers/SyncPatientRegisterReportInterfaceWorker.cs b/src/Shentun.Peis.HttpApi.Host/Schedulers/SyncPatientRegisterReportInterfaceWorker.cs index fdc11bff..dc897a84 100644 --- a/src/Shentun.Peis.HttpApi.Host/Schedulers/SyncPatientRegisterReportInterfaceWorker.cs +++ b/src/Shentun.Peis.HttpApi.Host/Schedulers/SyncPatientRegisterReportInterfaceWorker.cs @@ -98,6 +98,9 @@ namespace Shentun.Peis.Schedulers var isActive = interfaceConfig.GetSection("Interface").GetSection("Scheduler") .GetSection("IsActive").Value; + + + if (isActive != "Y") { _isRunning = false; @@ -129,15 +132,27 @@ namespace Shentun.Peis.Schedulers var IsSyncPreRegister = interfaceConfig.GetSection("Interface").GetSection("Scheduler") .GetSection("IsSyncPreRegister").Value; + //是否筛选审核状态 + var isAuditWhere = interfaceConfig.GetValue("Interface:Scheduler:IsAuditWhere", "N"); + + //是否重复上传,筛选是否上传字段 默认Y-重复上传 + var isRepeatUpload = interfaceConfig.GetValue("Interface:Scheduler:IsRepeatUpload", "Y"); + + //筛选的日期类型 0-最后修改时间 1-总检时间 2-审核时间 + var UploadDateType = interfaceConfig.GetValue("Interface:Scheduler:UploadDateType", "0"); + SyncPatientRegisterReportInputDto input = new SyncPatientRegisterReportInputDto { - QueryDays = QueryDays + QueryDays = QueryDays, + IsAuditWhere = Convert.ToChar(isAuditWhere), + IsRepeatUpload = Convert.ToChar(isRepeatUpload), + UploadDateType = Convert.ToChar(UploadDateType) }; var assemblyName = interfaceConfig.GetSection("Interface").GetSection("AssemblyName").Value; var className = interfaceConfig.GetSection("Interface").GetSection("ClassName").Value; - var funName = "GetSyncPatientRegisterIds"; + object[] classConstructorArg = new object[] { thirdInterfaceDto.Id }; object[] objects = [input]; @@ -175,6 +190,11 @@ namespace Shentun.Peis.Schedulers #region 同步报告 if (IsSyncReport == "Y") { + var funName = "GetSyncPatientRegisterIds"; + + + + //需要同步报告的数据 var pluginsOut = ReflectionHelper.InvokeAsync>(assemblyName, className, classConstructorArg, funName, objects).Result; if (pluginsOut.Any())