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
b9a18025
Commit
b9a18025
authored
Aug 09, 2019
by
李承祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改
parent
d78b8a80
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
performance/Performance.Api/Controllers/TemplateController.cs
+1
-1
performance/Performance.Extract.Api/Controllers/ExtractController.cs
+4
-4
No files found.
performance/Performance.Api/Controllers/TemplateController.cs
View file @
b9a18025
...
...
@@ -327,7 +327,7 @@ public ApiResponse SaveFile([FromForm] IFormCollection form, int allotId, int ho
var
allot
=
allotService
.
GetAllot
(
allotId
);
allot
.
ExtractPath
=
path
;
allot
.
IsExtracting
=
2
;
if
(
string
.
IsNullOrEmpty
(
path
)
||
FileHelper
.
IsExistFile
(
path
))
if
(
string
.
IsNullOrEmpty
(
path
)
||
!
FileHelper
.
IsExistFile
(
path
))
{
LogHelper
.
Information
(
$"文件未保存成功,保存文件不存在!"
,
"保存提取文件"
);
return
new
ApiResponse
(
ResponseType
.
Fail
,
"上传成功!"
);
...
...
performance/Performance.Extract.Api/Controllers/ExtractController.cs
View file @
b9a18025
...
...
@@ -121,21 +121,21 @@ public void ExtractData([CustomizeValidator, FromBody]ExtractRequest request)
string
filePath
=
newExtractService
.
ExtractData
(
request
.
AllotId
,
request
.
Email
,
request
.
HospitalId
);
if
(!
string
.
IsNullOrEmpty
(
filePath
)
&&
FileHelper
.
IsExistFile
(
filePath
))
{
LogHelper
.
Information
(
"请求路径:"
+
url
.
ImportFile
,
"保存提取文件"
);
LogHelper
.
Information
(
"请求路径:"
+
url
.
ImportFile
+
",请求参数"
+
JsonHelper
.
Serialize
(
new
{
allotId
=
request
.
AllotId
,
hospitalId
=
request
.
HospitalId
})
,
"保存提取文件"
);
int
i
=
1
;
while
(
i
<=
5
)
{
string
retJson
=
HttpHelper
.
HttpClient
(
url
.
ImportFile
+
$"?allotId=
{
request
.
AllotId
}
&hospitalId=
{
request
.
HospitalId
}
"
,
filePath
);
if
(
i
==
5
)
LogHelper
.
Information
(
$"保存文件失败,已尝试执行五次,请联系开发人员!"
,
"保存提取文件"
);
else
LogHelper
.
Information
(
$"正在尝试第
{
i
}
次保存!"
,
"保存提取文件"
);
//保存文件
string
retJson
=
HttpHelper
.
HttpClient
(
url
.
ImportFile
+
$"?allotId=
{
request
.
AllotId
}
&hospitalId=
{
request
.
HospitalId
}
"
,
filePath
);
LogHelper
.
Information
(
"返回结果:"
+
JsonHelper
.
Serialize
(
retJson
),
"保存提取文件"
);
logger
.
LogInformation
(
retJson
);
var
ret
=
JsonHelper
.
Deserialize
<
ApiResponse
>(
retJson
);
if
((
int
)
ret
.
State
==
1
)
if
(
ret
!=
null
&&
(
int
)
ret
.
State
==
1
)
{
LogHelper
.
Information
(
"保存成功!"
,
"保存提取文件"
);
break
;
...
...
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