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
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
65 additions
and
5 deletions
+65
-5
performance/Performance.Api/Controllers/AllotController.cs
+2
-1
performance/Performance.DtoModels/Enum.cs
+31
-0
performance/Performance.EntityModels/Entity/per_allot.cs
+6
-1
performance/Performance.Services/AllotService.cs
+2
-1
performance/Performance.Services/PerExcelService/PerExcelService.cs
+24
-2
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
...
@@ -63,8 +63,13 @@ public class per_allot
...
@@ -63,8 +63,13 @@ public class per_allot
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,7 +75,10 @@ public class PerExcelService : IAutoInjection
...
@@ -75,7 +75,10 @@ public class PerExcelService : IAutoInjection
public
void
Execute
(
per_allot
allot
)
public
void
Execute
(
per_allot
allot
)
{
{
allot
.
States
=
2
;
try
{
allot
.
States
=
(
int
)
AllotStates
.
InCheckData
;
allot
.
Remark
=
EnumHelper
.
GetDescription
(
AllotStates
.
InCheckData
);
_perforPerAllotRepository
.
Update
(
allot
);
_perforPerAllotRepository
.
Update
(
allot
);
Clear
(
allot
.
ID
);
Clear
(
allot
.
ID
);
...
@@ -86,6 +89,12 @@ public void Execute(per_allot allot)
...
@@ -86,6 +89,12 @@ public void Execute(per_allot allot)
// 保存数据
// 保存数据
Save
(
excel
.
PerSheet
,
allot
.
ID
,
1
);
Save
(
excel
.
PerSheet
,
allot
.
ID
,
1
);
Check
();
allot
.
States
=
(
int
)
AllotStates
.
InGenerate
;
allot
.
Remark
=
EnumHelper
.
GetDescription
(
AllotStates
.
InGenerate
);
_perforPerAllotRepository
.
Update
(
allot
);
// 计算合并数据
// 计算合并数据
List
<
PerSheet
>
list
=
ProcessCompute
(
excel
);
List
<
PerSheet
>
list
=
ProcessCompute
(
excel
);
...
@@ -100,11 +109,24 @@ public void Execute(per_allot allot)
...
@@ -100,11 +109,24 @@ public void Execute(per_allot allot)
//发送邮件
//发送邮件
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