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
042ce8fe
Commit
042ce8fe
authored
Jul 29, 2019
by
799284587@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
抽取初稿
parent
b30e08ee
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
101 additions
and
5 deletions
+101
-5
performance/Performance.Api/Controllers/TemplateController.cs
+28
-5
performance/Performance.Api/Performance.Api.csproj
+9
-0
performance/Performance.Api/Template/医院二次分配绩效模板.xlsx
+0
-0
performance/Performance.Api/Template/医院绩效模板.xlsx
+0
-0
performance/Performance.DtoModels/Enum.cs
+22
-0
performance/Performance.DtoModels/ExtractDto.cs
+13
-0
performance/Performance.DtoModels/Request/DownRequest.cs
+11
-0
performance/Performance.EntityModels/Entity/mod_item.cs
+5
-0
performance/Performance.Extract.Api/Performance.Extract.Api.csproj
+13
-0
performance/Performance.Services/NewExtractService.cs
+0
-0
No files found.
performance/Performance.Api/Controllers/TemplateController.cs
View file @
042ce8fe
...
@@ -25,7 +25,7 @@ public class TemplateController : Controller
...
@@ -25,7 +25,7 @@ public class TemplateController : Controller
private
readonly
TemplateService
templateService
;
private
readonly
TemplateService
templateService
;
private
readonly
ExtractService
extractService
;
private
readonly
ExtractService
extractService
;
private
HospitalService
hospitalService
;
private
HospitalService
hospitalService
;
private
IHostingEnvironment
e
vn
;
private
IHostingEnvironment
e
nv
;
private
ClaimService
claim
;
private
ClaimService
claim
;
private
Application
application
;
private
Application
application
;
private
WebapiUrl
url
;
private
WebapiUrl
url
;
...
@@ -35,7 +35,7 @@ public class TemplateController : Controller
...
@@ -35,7 +35,7 @@ public class TemplateController : Controller
public
TemplateController
(
TemplateService
templateService
,
public
TemplateController
(
TemplateService
templateService
,
HospitalService
hospitalService
,
HospitalService
hospitalService
,
ExtractService
extractService
,
ExtractService
extractService
,
IHostingEnvironment
e
vn
,
IHostingEnvironment
e
nv
,
ClaimService
claim
,
ClaimService
claim
,
IOptions
<
Application
>
options
,
IOptions
<
Application
>
options
,
IOptions
<
WebapiUrl
>
url
,
IOptions
<
WebapiUrl
>
url
,
...
@@ -45,7 +45,7 @@ public class TemplateController : Controller
...
@@ -45,7 +45,7 @@ public class TemplateController : Controller
this
.
templateService
=
templateService
;
this
.
templateService
=
templateService
;
this
.
extractService
=
extractService
;
this
.
extractService
=
extractService
;
this
.
hospitalService
=
hospitalService
;
this
.
hospitalService
=
hospitalService
;
this
.
e
vn
=
evn
;
this
.
e
nv
=
env
;
this
.
claim
=
claim
;
this
.
claim
=
claim
;
this
.
application
=
options
.
Value
;
this
.
application
=
options
.
Value
;
this
.
url
=
url
.
Value
;
this
.
url
=
url
.
Value
;
...
@@ -54,6 +54,29 @@ public class TemplateController : Controller
...
@@ -54,6 +54,29 @@ public class TemplateController : Controller
}
}
/// <summary>
/// <summary>
/// 从WebAPI下载模板
/// </summary>
/// <returns></returns>
[
Route
(
"downtemplate"
)]
[
NoVerify
]
public
IActionResult
DownFile
([
FromQuery
]
DownRequest
request
)
{
string
path
=
(
request
.
TempType
==
1
)
?
Path
.
Combine
(
env
.
ContentRootPath
,
"Template"
,
"医院绩效模板.xlsx"
)
:
Path
.
Combine
(
env
.
ContentRootPath
,
"Template"
,
"医院二次分配绩效模板.xlsx"
);
var
memoryStream
=
new
MemoryStream
();
using
(
var
stream
=
new
FileStream
(
path
,
FileMode
.
Open
))
{
stream
.
CopyToAsync
(
memoryStream
).
Wait
();
}
memoryStream
.
Seek
(
0
,
SeekOrigin
.
Begin
);
var
provider
=
new
FileExtensionContentTypeProvider
();
var
memi
=
provider
.
Mappings
[
"xlsx"
];
return
File
(
memoryStream
,
memi
,
Path
.
GetFileName
(
path
));
}
/// <summary>
/// 上传文件
/// 上传文件
/// </summary>
/// </summary>
/// <param name="form"></param>
/// <param name="form"></param>
...
@@ -77,7 +100,7 @@ public ApiResponse Import([FromForm] IFormCollection form)
...
@@ -77,7 +100,7 @@ public ApiResponse Import([FromForm] IFormCollection form)
var
name
=
FileHelper
.
GetFileNameNoExtension
(
file
.
FileName
)
+
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmssfff"
);
var
name
=
FileHelper
.
GetFileNameNoExtension
(
file
.
FileName
)
+
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmssfff"
);
var
ext
=
FileHelper
.
GetExtension
(
file
.
FileName
);
var
ext
=
FileHelper
.
GetExtension
(
file
.
FileName
);
var
dpath
=
Path
.
Combine
(
e
vn
.
ContentRootPath
,
"Files"
,
$"
{
hospitalid
}
"
,
"first"
);
var
dpath
=
Path
.
Combine
(
e
nv
.
ContentRootPath
,
"Files"
,
$"
{
hospitalid
}
"
,
"first"
);
FileHelper
.
CreateDirectory
(
dpath
);
FileHelper
.
CreateDirectory
(
dpath
);
var
path
=
Path
.
Combine
(
dpath
,
$"
{
name
}{
ext
}
"
);
var
path
=
Path
.
Combine
(
dpath
,
$"
{
name
}{
ext
}
"
);
...
@@ -209,7 +232,7 @@ public ApiResponse SaveFile([FromForm] IFormCollection form, int allotId, int ho
...
@@ -209,7 +232,7 @@ public ApiResponse SaveFile([FromForm] IFormCollection form, int allotId, int ho
if
(
file
==
null
)
if
(
file
==
null
)
return
new
ApiResponse
(
ResponseType
.
Error
,
"上传文件无效"
);
return
new
ApiResponse
(
ResponseType
.
Error
,
"上传文件无效"
);
var
dpath
=
Path
.
Combine
(
e
vn
.
ContentRootPath
,
"Files"
,
$"
{
hospitalId
}
"
,
"autoextract"
);
var
dpath
=
Path
.
Combine
(
e
nv
.
ContentRootPath
,
"Files"
,
$"
{
hospitalId
}
"
,
"autoextract"
);
FileHelper
.
CreateDirectory
(
dpath
);
FileHelper
.
CreateDirectory
(
dpath
);
var
path
=
Path
.
Combine
(
dpath
,
FileHelper
.
GetFileName
(
file
.
FileName
));
var
path
=
Path
.
Combine
(
dpath
,
FileHelper
.
GetFileName
(
file
.
FileName
));
...
...
performance/Performance.Api/Performance.Api.csproj
View file @
042ce8fe
...
@@ -47,6 +47,15 @@
...
@@ -47,6 +47,15 @@
</Content>
</Content>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<None Update="Template\医院二次分配绩效模板.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Template\医院绩效模板.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ProjectExtensions><VisualStudio><UserProperties appsettings_1json__JSONSchema="" /></VisualStudio></ProjectExtensions>
<ProjectExtensions><VisualStudio><UserProperties appsettings_1json__JSONSchema="" /></VisualStudio></ProjectExtensions>
</Project>
</Project>
performance/Performance.Api/Template/医院二次分配绩效模板.xlsx
0 → 100644
View file @
042ce8fe
File added
performance/Performance.Api/Template/医院绩效模板.xlsx
0 → 100644
View file @
042ce8fe
File added
performance/Performance.DtoModels/Enum.cs
View file @
042ce8fe
...
@@ -23,6 +23,28 @@ public enum States
...
@@ -23,6 +23,28 @@ public enum States
Disabled
=
2
,
Disabled
=
2
,
}
}
/// <summary> 提取数据使用模板 </summary>
public
enum
UseTemplate
{
/// <summary> 上次绩效 </summary>
[
Description
(
"上次绩效"
)]
LastAllot
=
1
,
/// <summary> 配置模板 </summary>
[
Description
(
"配置模板"
)]
Config
=
2
,
}
/// <summary> 提取数据使用模板 </summary>
public
enum
DbSrouceType
{
/// <summary> 标准库 </summary>
[
Description
(
"标准库"
)]
Standard
=
1
,
/// <summary> 绩效库 </summary>
[
Description
(
"绩效库"
)]
Performance
=
2
,
}
public
enum
AllotStates
public
enum
AllotStates
{
{
/// <summary> 用户状态 </summary>
/// <summary> 用户状态 </summary>
...
...
performance/Performance.DtoModels/ExtractDto.cs
0 → 100644
View file @
042ce8fe
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
ExtractDto
{
public
string
Department
{
get
;
set
;
}
public
string
Category
{
get
;
set
;
}
public
decimal
Value
{
get
;
set
;
}
}
}
performance/Performance.DtoModels/Request/DownRequest.cs
0 → 100644
View file @
042ce8fe
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
DownRequest
:
ApiRequest
{
public
int
TempType
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Entity/mod_item.cs
View file @
042ce8fe
...
@@ -42,6 +42,11 @@ public class mod_item
...
@@ -42,6 +42,11 @@ public class mod_item
public
Nullable
<
decimal
>
FactorValue2
{
get
;
set
;
}
public
Nullable
<
decimal
>
FactorValue2
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 医技系数
/// </summary>
public
Nullable
<
decimal
>
FactorValue3
{
get
;
set
;
}
/// <summary>
/// 抽取绩效值SQL
/// 抽取绩效值SQL
/// </summary>
/// </summary>
public
Nullable
<
int
>
ExtractId
{
get
;
set
;
}
public
Nullable
<
int
>
ExtractId
{
get
;
set
;
}
...
...
performance/Performance.Extract.Api/Performance.Extract.Api.csproj
View file @
042ce8fe
...
@@ -25,6 +25,19 @@
...
@@ -25,6 +25,19 @@
<ProjectReference Include="..\Performance.Services\Performance.Services.csproj" />
<ProjectReference Include="..\Performance.Services\Performance.Services.csproj" />
</ItemGroup>
</ItemGroup>
<ItemGroup>
<Folder Include="Template\" />
</ItemGroup>
<ItemGroup>
<None Include="..\Performance.Api\Template\医院二次分配绩效模板.xlsx" Link="Template\医院二次分配绩效模板.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\Performance.Api\Template\医院绩效模板.xlsx" Link="Template\医院绩效模板.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ProjectExtensions><VisualStudio><UserProperties appsettings_1json__JSONSchema="" /></VisualStudio></ProjectExtensions>
<ProjectExtensions><VisualStudio><UserProperties appsettings_1json__JSONSchema="" /></VisualStudio></ProjectExtensions>
</Project>
</Project>
performance/Performance.Services/NewExtractService.cs
0 → 100644
View file @
042ce8fe
This diff is collapsed.
Click to expand it.
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