Commit 51745efe by ruyun.zhang@suvalue.com

Merge branch 'develop' into release/v22.2.10-Beta-ninghai

parents b0b22508 8f5ffe65
...@@ -19,20 +19,20 @@ public static void AddSwaggerConfiguration(this IServiceCollection services) ...@@ -19,20 +19,20 @@ public static void AddSwaggerConfiguration(this IServiceCollection services)
{ {
c.SwaggerDoc("v1", new OpenApiInfo { Version = "v1.0", Title = "绩效API接口" }); c.SwaggerDoc("v1", new OpenApiInfo { Version = "v1.0", Title = "绩效API接口" });
//var xmlPath = new string[] var xmlPath = new string[]
//{ {
// Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "Performance.Api.xml"), Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "Performance.Api.xml"),
// Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "Performance.DtoModels.xml"), Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "Performance.DtoModels.xml"),
// Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "Performance.EntityModels.xml"), Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "Performance.EntityModels.xml"),
//}; };
//foreach (var item in xmlPath) foreach (var item in xmlPath)
//{ {
// c.IncludeXmlComments(item, true); c.IncludeXmlComments(item, true);
//} }
var xmlPathsss = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "Performance.Api.xml"); //var xmlPathsss = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "Performance.Api.xml");
c.IncludeXmlComments(xmlPathsss, true); //c.IncludeXmlComments(xmlPathsss, true);
// Token绑定到ConfigureServices // Token绑定到ConfigureServices
var security = new OpenApiSecurityRequirement var security = new OpenApiSecurityRequirement
......
...@@ -266,31 +266,31 @@ private void Execute_Allot_ExtractData(TaskService service, bg_task task) ...@@ -266,31 +266,31 @@ private void Execute_Allot_ExtractData(TaskService service, bg_task task)
allot.ExtractTime = DateTime.Now; allot.ExtractTime = DateTime.Now;
allotService.Update(allot); allotService.Update(allot);
if (isSingle) //if (isSingle)
{ //{
_logger.LogInformation("同一项目中进行提取"); _logger.LogInformation("同一项目中进行提取");
_logger.LogInformation("提取绩效数据参数:" + JsonHelper.Serialize(new { allotId = allot.ID, hospitalId = allot.HospitalId })); _logger.LogInformation("提取绩效数据参数:" + JsonHelper.Serialize(new { allotId = allot.ID, hospitalId = allot.HospitalId }));
scopedServices.Main(allot.ID, allot.HospitalId, "", allot.ID.ToString(), filePath, isSingle); scopedServices.Main(allot.ID, allot.HospitalId, "", allot.ID.ToString(), filePath, isSingle);
} //}
else //else
{ //{
var http = new RestSharpHelper(); // var http = new RestSharpHelper();
var extractUrl = http.SetUrl(url.Value.HttpPost, "extract/extract"); // var extractUrl = http.SetUrl(url.Value.HttpPost, "extract/extract");
var obj = new ExtractRequest // var obj = new ExtractRequest
{ // {
AllotId = allotId, // AllotId = allotId,
HospitalId = hospitalId, // HospitalId = hospitalId,
Email = "" // Email = ""
}; // };
string json = JsonHelper.Serialize(obj); // string json = JsonHelper.Serialize(obj);
_logger.LogInformation("提取绩效数据参数:" + json); // _logger.LogInformation("提取绩效数据参数:" + json);
var parameter = JsonHelper.Deserialize<Dictionary<string, object>>(json); // var parameter = JsonHelper.Deserialize<Dictionary<string, object>>(json);
var restRequest = string.IsNullOrEmpty(filePath) ? http.CreatePostRequest(json) : http.CreateFileRequest(new string[] { filePath }, parameter); // var restRequest = string.IsNullOrEmpty(filePath) ? http.CreatePostRequest(json) : http.CreateFileRequest(new string[] { filePath }, parameter);
http.GetResponse(extractUrl, restRequest); // http.GetResponse(extractUrl, restRequest);
} //}
} }
catch (Exception ex) catch (Exception ex)
{ {
......
...@@ -48,6 +48,9 @@ ...@@ -48,6 +48,9 @@
<Content Update="wwwroot\Performance.Api.xml"> <Content Update="wwwroot\Performance.Api.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
<Content Update="wwwroot\Performance.DtoModels.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\Performance.EntityModels.xml"> <Content Update="wwwroot\Performance.EntityModels.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
......
...@@ -100,6 +100,7 @@ public string Main(int allotId, int hospitalId, string email, string groupName, ...@@ -100,6 +100,7 @@ public string Main(int allotId, int hospitalId, string email, string groupName,
logService.ReturnTheLog(allotId, groupName, 3, "", 5, 1, isSingle); logService.ReturnTheLog(allotId, groupName, 3, "", 5, 1, isSingle);
queryService.ClearConnectionPools();
queryService.ClearHistoryData(allot.ID, groupName, isSingle); queryService.ClearHistoryData(allot.ID, groupName, isSingle);
employeeService.SyncDataToResult(allotId); employeeService.SyncDataToResult(allotId);
......
...@@ -62,6 +62,14 @@ PerforPerallotRepository perallotRepository ...@@ -62,6 +62,14 @@ PerforPerallotRepository perallotRepository
private static Dictionary<int, IDbConnection> pools = new Dictionary<int, IDbConnection>(); private static Dictionary<int, IDbConnection> pools = new Dictionary<int, IDbConnection>();
/// <summary> /// <summary>
/// 清理数据库连接池
/// </summary>
public void ClearConnectionPools()
{
pools.Clear();
}
/// <summary>
/// 获取抽取数据 /// 获取抽取数据
/// </summary> /// </summary>
/// <param name="hospitalId"></param> /// <param name="hospitalId"></param>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment