Browse Source

报告任务

master
wxd 4 months ago
parent
commit
b0dab3f36d
  1. 28
      src/Shentun.ColumnReferencePlugIns/WebAppoints/WebAppointWebPeisPlugIns.cs
  2. 14
      src/Shentun.Peis.Application.Contracts/TransToWebPeiss/SyncPatientRegisterReportInputDto.cs
  3. 24
      src/Shentun.Peis.HttpApi.Host/Schedulers/SyncPatientRegisterReportInterfaceWorker.cs

28
src/Shentun.ColumnReferencePlugIns/WebAppoints/WebAppointWebPeisPlugIns.cs

@ -125,9 +125,31 @@ 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<SyncPatientRegisterIdsDto>(sql,
new { HandDate = DateTime.Now.Date.AddDays(-input.QueryDays), CompleteFlag = PatientRegisterCompleteFlag.SumCheck })).ToList();
return patientRegisterIds;

14
src/Shentun.Peis.Application.Contracts/TransToWebPeiss/SyncPatientRegisterReportInputDto.cs

@ -9,5 +9,19 @@ namespace Shentun.Peis.TransToWebPeiss
//int QueryDays, string reportApiBaseAddress, string reportApiUrl
public int QueryDays { get; set; }
/// <summary>
///是否筛选审核状态
/// </summary>
public char IsAuditWhere { get; set; } = 'N';
/// <summary>
/// 是否重复上传
/// </summary>
public char IsRepeatUpload { get; set; } = 'Y';
/// <summary>
/// 筛选的日期类型 0-最后修改时间 1-总检时间 2-审核时间
/// </summary>
public char UploadDateType { get; set; }
}
}

24
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<List<SyncPatientRegisterIdsDto>>(assemblyName, className, classConstructorArg, funName, objects).Result;
if (pluginsOut.Any())

Loading…
Cancel
Save