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