Browse Source

上传报告体检类别

master
wxd 3 months ago
parent
commit
8a82f05599
  1. 19
      src/Shentun.ColumnReferencePlugIns/WebAppoints/WebAppointWebPeisPlugIns.cs
  2. 2
      src/Shentun.Peis.Application.Contracts/TransToWebPeiss/SyncPatientRegisterReportInputDto.cs
  3. 12
      src/Shentun.Peis.HttpApi.Host/Schedulers/SyncPatientRegisterReportInterfaceWorker.cs

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

@ -150,10 +150,25 @@ namespace Shentun.Peis.PlugIns.WebAppoints
sql += " and is_upload='N' "; sql += " and is_upload='N' ";
} }
var parameters = new DynamicParameters();
parameters.Add("HandDate", DateTime.Now.Date.AddDays(-input.QueryDays));
parameters.Add("CompleteFlag", PatientRegisterCompleteFlag.SumCheck);
if (input.ExcludeMedicalTypeIds.Any())
{
// 构建IN子句的字符串
var excludeIdsList = input.ExcludeMedicalTypeIds.Select(id => $"'{id}'");
var excludeIdsString = string.Join(",", excludeIdsList);
sql += $" AND medical_type_id NOT IN ({excludeIdsString}) ";
}
sql += $" limit {input.UploadCountLimit} "; sql += $" limit {input.UploadCountLimit} ";
var patientRegisterIds = (await conn.QueryAsync<SyncPatientRegisterIdsDto>(sql,
new { HandDate = DateTime.Now.Date.AddDays(-input.QueryDays), CompleteFlag = PatientRegisterCompleteFlag.SumCheck })).ToList();
var patientRegisterIds = (await conn.QueryAsync<SyncPatientRegisterIdsDto>(sql, parameters)).ToList();
return patientRegisterIds; return patientRegisterIds;
} }
} }

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

@ -25,5 +25,7 @@ namespace Shentun.Peis.TransToWebPeiss
public char UploadDateType { get; set; } public char UploadDateType { get; set; }
public int UploadCountLimit { get; set; } = 100; public int UploadCountLimit { get; set; } = 100;
public List<string> ExcludeMedicalTypeIds { get; set; } = new List<string>();
} }
} }

12
src/Shentun.Peis.HttpApi.Host/Schedulers/SyncPatientRegisterReportInterfaceWorker.cs

@ -147,6 +147,9 @@ namespace Shentun.Peis.Schedulers
//单次最大的上传数量 //单次最大的上传数量
var uploadCountLimit = Convert.ToInt32(interfaceConfig.GetValue("Interface:Scheduler:UploadCountLimit", "100")); var uploadCountLimit = Convert.ToInt32(interfaceConfig.GetValue("Interface:Scheduler:UploadCountLimit", "100"));
SyncPatientRegisterReportInputDto input = new SyncPatientRegisterReportInputDto SyncPatientRegisterReportInputDto input = new SyncPatientRegisterReportInputDto
{ {
QueryDays = QueryDays, QueryDays = QueryDays,
@ -157,6 +160,15 @@ namespace Shentun.Peis.Schedulers
}; };
//剔除的体检类别id 集合 a,b
var excludeMedicalTypeIdsValue = interfaceConfig.GetValue("Interface:ExcludeMedicalTypeIds", "");
if (!string.IsNullOrWhiteSpace(excludeMedicalTypeIdsValue))
{
List<string> excludeMedicalTypeIds = excludeMedicalTypeIdsValue.Split(",", StringSplitOptions.RemoveEmptyEntries).ToList();
input.ExcludeMedicalTypeIds = excludeMedicalTypeIds;
// input.ExcludeMedicalTypeIds = excludeMedicalTypeIds.Select(s => Guid.Parse(s)).ToList();
}
var assemblyName = interfaceConfig.GetSection("Interface").GetSection("AssemblyName").Value; var assemblyName = interfaceConfig.GetSection("Interface").GetSection("AssemblyName").Value;
var className = interfaceConfig.GetSection("Interface").GetSection("ClassName").Value; var className = interfaceConfig.GetSection("Interface").GetSection("ClassName").Value;

Loading…
Cancel
Save