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
a31c4042
Commit
a31c4042
authored
Mar 26, 2019
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allot状态调整
parent
dc2de372
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
93 additions
and
33 deletions
+93
-33
performance/Performance.Api/Controllers/AllotController.cs
+2
-1
performance/Performance.DtoModels/Enum.cs
+31
-0
performance/Performance.EntityModels/Entity/per_allot.cs
+18
-13
performance/Performance.Services/AllotService.cs
+2
-1
performance/Performance.Services/PerExcelService/PerExcelService.cs
+40
-18
No files found.
performance/Performance.Api/Controllers/AllotController.cs
View file @
a31c4042
...
@@ -132,7 +132,8 @@ public ApiResponse Import([FromForm] IFormCollection form)
...
@@ -132,7 +132,8 @@ public ApiResponse Import([FromForm] IFormCollection form)
if
(!
FileHelper
.
CreateFile
(
path
,
bytes
))
if
(!
FileHelper
.
CreateFile
(
path
,
bytes
))
return
new
ApiResponse
(
ResponseType
.
Fail
,
$"
{
file
.
FileName
}
上传失败"
);
return
new
ApiResponse
(
ResponseType
.
Fail
,
$"
{
file
.
FileName
}
上传失败"
);
allot
.
Path
=
path
;
allot
.
Path
=
path
;
allot
.
States
=
1
;
allot
.
States
=
(
int
)
AllotStates
.
FileUploaded
;
allot
.
Remark
=
EnumHelper
.
GetDescription
(
AllotStates
.
FileUploaded
);
allot
.
UploadDate
=
DateTime
.
Now
;
allot
.
UploadDate
=
DateTime
.
Now
;
if
(!
_allotService
.
Update
(
allot
))
if
(!
_allotService
.
Update
(
allot
))
return
new
ApiResponse
(
ResponseType
.
Fail
,
$"
{
file
.
FileName
}
上传成功,修改状态失败"
);
return
new
ApiResponse
(
ResponseType
.
Fail
,
$"
{
file
.
FileName
}
上传成功,修改状态失败"
);
...
...
performance/Performance.DtoModels/Enum.cs
View file @
a31c4042
...
@@ -22,4 +22,35 @@ public enum States
...
@@ -22,4 +22,35 @@ public enum States
[
Description
(
"其他"
)]
[
Description
(
"其他"
)]
Disabled
=
2
,
Disabled
=
2
,
}
}
public
enum
AllotStates
{
/// <summary> 用户状态 </summary>
[
Description
(
"数据未上传"
)]
NoData
=
0
,
/// <summary> 数据已上传 </summary>
[
Description
(
"数据已上传"
)]
FileUploaded
=
1
,
/// <summary> 正在校验数据 </summary>
[
Description
(
"正在校验数据"
)]
InCheckData
=
2
,
/// <summary> 数据验证通过 </summary>
[
Description
(
"数据验证通过"
)]
CheckPass
=
3
,
/// <summary> 数据错误 </summary>
[
Description
(
"数据错误"
)]
CheckFail
=
4
,
/// <summary> 正在生成绩效 </summary>
[
Description
(
"正在生成绩效"
)]
InGenerate
=
5
,
/// <summary> 绩效结果解析成功 </summary>
[
Description
(
"数据验证通过"
)]
GenerateSucceed
=
6
,
/// <summary> 绩效解析失败 </summary>
[
Description
(
"绩效解析失败"
)]
GenerateFail
=
7
,
/// <summary> 归档 </summary>
[
Description
(
"归档"
)]
Archive
=
8
,
}
}
}
performance/Performance.EntityModels/Entity/per_allot.cs
View file @
a31c4042
...
@@ -8,63 +8,68 @@
...
@@ -8,63 +8,68 @@
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels
namespace
Performance.EntityModels
{
{
/// <summary>
/// <summary>
/// per_allot Entity Model
/// per_allot Entity Model
/// </summary>
/// </summary>
[
Table
(
"per_allot"
)]
[
Table
(
"per_allot"
)]
public
class
per_allot
public
class
per_allot
{
{
/// <summary>
/// <summary>
/// ID
/// ID
/// </summary>
/// </summary>
[
Key
]
[
Key
]
public
int
ID
{
get
;
set
;
}
public
int
ID
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 医院ID
/// 医院ID
/// </summary>
/// </summary>
public
int
HospitalId
{
get
;
set
;
}
public
int
HospitalId
{
get
;
set
;
}
/// <summary>
/// <summary>
///
///
/// </summary>
/// </summary>
public
Nullable
<
int
>
CreateUser
{
get
;
set
;
}
public
Nullable
<
int
>
CreateUser
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 绩效统计时间
/// 绩效统计时间
/// </summary>
/// </summary>
public
Nullable
<
DateTime
>
CreateDate
{
get
;
set
;
}
public
Nullable
<
DateTime
>
CreateDate
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 绩效发放年
/// 绩效发放年
/// </summary>
/// </summary>
public
int
Year
{
get
;
set
;
}
public
int
Year
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 绩效发放月
/// 绩效发放月
/// </summary>
/// </summary>
public
int
Month
{
get
;
set
;
}
public
int
Month
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 绩效发放总金额
/// 绩效发放总金额
/// </summary>
/// </summary>
public
Nullable
<
decimal
>
AllotFee
{
get
;
set
;
}
public
Nullable
<
decimal
>
AllotFee
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 文件路径
/// 文件路径
/// </summary>
/// </summary>
public
string
Path
{
get
;
set
;
}
public
string
Path
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 上传日期
/// 上传日期
/// </summary>
/// </summary>
public
Nullable
<
DateTime
>
UploadDate
{
get
;
set
;
}
public
Nullable
<
DateTime
>
UploadDate
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 0 数据未上传 1 数据已上传 2
数据解析中 3 数据解析成功 4 绩效结果生成中 5绩效结果解析成功 6
归档
/// 0 数据未上传 1 数据已上传 2
正在校验数据 3 数据验证通过 4 数据错误 5 正在生成绩效 6 绩效结果解析成功 7 绩效解析失败 8
归档
/// </summary>
/// </summary>
public
int
States
{
get
;
set
;
}
public
int
States
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
string
Remark
{
get
;
set
;
}
}
}
}
}
performance/Performance.Services/AllotService.cs
View file @
a31c4042
...
@@ -56,7 +56,8 @@ public AllotResponse InsertAllot(AllotRequest request, int userID)
...
@@ -56,7 +56,8 @@ public AllotResponse InsertAllot(AllotRequest request, int userID)
var
allot
=
Mapper
.
Map
<
per_allot
>(
request
);
var
allot
=
Mapper
.
Map
<
per_allot
>(
request
);
allot
.
CreateDate
=
DateTime
.
Now
;
allot
.
CreateDate
=
DateTime
.
Now
;
allot
.
CreateUser
=
userID
;
allot
.
CreateUser
=
userID
;
allot
.
States
=
0
;
allot
.
States
=
(
int
)
AllotStates
.
NoData
;
allot
.
Remark
=
EnumHelper
.
GetDescription
(
AllotStates
.
NoData
);
if
(!
_allotRepository
.
Add
(
allot
))
if
(!
_allotRepository
.
Add
(
allot
))
throw
new
PerformanceException
(
"保存失败"
);
throw
new
PerformanceException
(
"保存失败"
);
...
...
performance/Performance.Services/PerExcelService/PerExcelService.cs
View file @
a31c4042
...
@@ -75,36 +75,58 @@ public class PerExcelService : IAutoInjection
...
@@ -75,36 +75,58 @@ public class PerExcelService : IAutoInjection
public
void
Execute
(
per_allot
allot
)
public
void
Execute
(
per_allot
allot
)
{
{
allot
.
States
=
2
;
try
_perforPerAllotRepository
.
Update
(
allot
);
{
allot
.
States
=
(
int
)
AllotStates
.
InCheckData
;
allot
.
Remark
=
EnumHelper
.
GetDescription
(
AllotStates
.
InCheckData
);
_perforPerAllotRepository
.
Update
(
allot
);
Clear
(
allot
.
ID
);
Clear
(
allot
.
ID
);
// 导出数据
var
excel
=
Import
(
allot
.
Path
);
// 导出
数据
// 保存
数据
var
excel
=
Import
(
allot
.
Path
);
Save
(
excel
.
PerSheet
,
allot
.
ID
,
1
);
// 保存数据
Check
();
Save
(
excel
.
PerSheet
,
allot
.
ID
,
1
);
allot
.
States
=
(
int
)
AllotStates
.
InGenerate
;
allot
.
Remark
=
EnumHelper
.
GetDescription
(
AllotStates
.
InGenerate
);
_perforPerAllotRepository
.
Update
(
allot
);
// 计算合并数据
// 计算合并数据
List
<
PerSheet
>
list
=
ProcessCompute
(
excel
);
List
<
PerSheet
>
list
=
ProcessCompute
(
excel
);
// 保存过程数据
// 保存过程数据
Save
(
list
,
allot
.
ID
,
2
);
Save
(
list
,
allot
.
ID
,
2
);
var
baiscnorm
=
NurseBaiscnorm
(
list
);
var
baiscnorm
=
NurseBaiscnorm
(
list
);
// 计算最总数据
// 计算最总数据
var
baiscnormList
=
Compute
(
allot
,
excel
,
baiscnorm
);
var
baiscnormList
=
Compute
(
allot
,
excel
,
baiscnorm
);
SpecialUnitCompute
(
excel
,
allot
,
baiscnormList
);
SpecialUnitCompute
(
excel
,
allot
,
baiscnormList
);
//发送邮件
//发送邮件
SendEmail
(
allot
);
SendEmail
(
allot
);
}
catch
(
Exception
ex
)
{
allot
.
States
=
(
int
)
AllotStates
.
GenerateFail
;
allot
.
Remark
=
EnumHelper
.
GetDescription
(
AllotStates
.
GenerateFail
);
_perforPerAllotRepository
.
Update
(
allot
);
}
allot
.
States
=
5
;
allot
.
States
=
(
int
)
AllotStates
.
GenerateSucceed
;
allot
.
Remark
=
EnumHelper
.
GetDescription
(
AllotStates
.
GenerateSucceed
);
_perforPerAllotRepository
.
Update
(
allot
);
_perforPerAllotRepository
.
Update
(
allot
);
}
}
private
void
Check
()
{
}
/// <summary>
/// <summary>
/// 特殊科室绩效计算
/// 特殊科室绩效计算
/// </summary>
/// </summary>
...
...
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