Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
performance
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zry
performance
Commits
51745efe
Commit
51745efe
authored
Apr 02, 2022
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into release/v22.2.10-Beta-ninghai
parents
b0b22508
8f5ffe65
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
39 deletions
+51
-39
performance/Performance.Api/Configurations/SwaggerConfig.cs
+12
-12
performance/Performance.Api/Job/BackgroundJob.cs
+26
-26
performance/Performance.Api/Performance.Api.csproj
+3
-0
performance/Performance.Services/ExtractExcelService/ExtractService.cs
+2
-1
performance/Performance.Services/ExtractExcelService/QueryService.cs
+8
-0
No files found.
performance/Performance.Api/Configurations/SwaggerConfig.cs
View file @
51745efe
...
@@ -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
...
...
performance/Performance.Api/Job/BackgroundJob.cs
View file @
51745efe
...
@@ -76,7 +76,7 @@ public void Execute()
...
@@ -76,7 +76,7 @@ public void Execute()
if
(
task
==
null
)
if
(
task
==
null
)
{
{
continue
;
continue
;
}
}
#
endregion
#
endregion
switch
(
task
.
JobType
)
switch
(
task
.
JobType
)
...
@@ -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
)
{
{
...
...
performance/Performance.Api/Performance.Api.csproj
View file @
51745efe
...
@@ -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>
...
...
performance/Performance.Services/ExtractExcelService/ExtractService.cs
View file @
51745efe
...
@@ -99,7 +99,8 @@ public string Main(int allotId, int hospitalId, string email, string groupName,
...
@@ -99,7 +99,8 @@ public string Main(int allotId, int hospitalId, string email, string groupName,
var
dict
=
new
Dictionary
<
ExDataDict
,
object
>();
var
dict
=
new
Dictionary
<
ExDataDict
,
object
>();
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
);
...
...
performance/Performance.Services/ExtractExcelService/QueryService.cs
View file @
51745efe
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment