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
8d45a787
Commit
8d45a787
authored
Jun 04, 2021
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/医院其他绩效097' into develop
parents
b47369b6
65dbd843
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
1140 additions
and
253 deletions
+1140
-253
performance/Performance.Api/Controllers/ComputeController.cs
+0
-17
performance/Performance.Api/Controllers/EmployeeController.cs
+241
-20
performance/Performance.Api/wwwroot/Performance.Api.xml
+88
-19
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+83
-0
performance/Performance.DtoModels/Request/CommonRequest.cs
+15
-0
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
+2
-0
performance/Performance.EntityModels/Entity/per_apr_amount.cs
+14
-14
performance/Performance.EntityModels/Entity/per_apr_amount_hide.cs
+94
-0
performance/Performance.Repository/PerforPerapramountRepository.cs
+25
-24
performance/Performance.Repository/PerforPerapramounthideRepository.cs
+50
-0
performance/Performance.Repository/Repository/PerforPerapramounthideRepository.cs
+22
-0
performance/Performance.Services/AprAmountService.cs
+70
-70
performance/Performance.Services/ComputeService.cs
+32
-18
performance/Performance.Services/ConfigService.cs
+30
-30
performance/Performance.Services/EmployeeService.cs
+374
-41
No files found.
performance/Performance.Api/Controllers/ComputeController.cs
View file @
8d45a787
...
...
@@ -395,21 +395,5 @@ public ApiResponse<res_baiscnorm> EditHospitalAvg([FromBody] ComputerAvgRequest
}
#
endregion
#
region
其他绩效统计
/// <summary>
/// 其他医院绩效统计
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
[
Route
(
"OtherPerStats/{allotId}"
)]
[
HttpPost
]
public
ApiResponse
OtherPerStats
(
int
allotId
)
{
var
relust
=
_employeeService
.
GetOtherPerStats
(
allotId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
relust
);
}
#
endregion
}
}
\ No newline at end of file
performance/Performance.Api/Controllers/EmployeeController.cs
View file @
8d45a787
...
...
@@ -254,14 +254,16 @@ public ApiResponse Audit(int allotid)
return
result
?
new
ApiResponse
(
ResponseType
.
OK
,
"提交成功"
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"提交失败"
);
}
#
region
医院其他绩效
/// <summary>
/// 获取
人员补充
绩效列表
/// 获取
医院其他
绩效列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"apr/getlist"
)]
[
HttpPost
]
public
ApiResponse
GetAprList
([
FromBody
]
per_apr_amoun
t
request
)
public
ApiResponse
GetAprList
([
FromBody
]
AllotIdReques
t
request
)
{
if
(
request
.
AllotId
==
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数AllotId无效!"
);
...
...
@@ -277,7 +279,7 @@ public ApiResponse GetAprList([FromBody] per_apr_amount request)
/// <returns></returns>
[
Route
(
"apr/getdeptlist"
)]
[
HttpPost
]
public
ApiResponse
GetAprGroupList
([
FromBody
]
per_apr_amoun
t
request
)
public
ApiResponse
GetAprGroupList
([
FromBody
]
AllotIdReques
t
request
)
{
if
(
request
.
AllotId
==
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数AllotId无效!"
);
...
...
@@ -328,7 +330,7 @@ public ApiResponse GetAprDetail([FromBody] per_apr_amount request)
}
/// <summary>
/// 新增
人员补充
绩效
/// 新增
医院其他
绩效
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
...
...
@@ -345,7 +347,7 @@ public ApiResponse InsertApr([FromBody] per_apr_amount request)
}
/// <summary>
/// 修改
人员补充
绩效
/// 修改
医院其他
绩效
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
...
...
@@ -362,13 +364,13 @@ public ApiResponse UpdateApr([FromBody] per_apr_amount request)
}
/// <summary>
/// 删除
人员补充
绩效
/// 删除
医院其他
绩效
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"apr/delete"
)]
[
HttpPost
]
public
ApiResponse
DeleteApr
([
FromBody
]
per_apr_amoun
t
request
)
public
ApiResponse
DeleteApr
([
FromBody
]
IdReques
t
request
)
{
if
(
request
.
Id
==
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数无效!"
);
...
...
@@ -392,7 +394,7 @@ public ApiResponse AuditResult([FromBody] AprAmountAuditRequest request)
}
/// <summary>
/// 上传
人员
绩效文件
/// 上传
医院其他
绩效文件
/// </summary>
/// <param name="form"></param>
/// <returns></returns>
...
...
@@ -434,6 +436,32 @@ public ApiResponse Import([FromForm] IFormCollection form)
}
/// <summary>
/// 绩效类型字典
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
[
HttpPost
(
"apr/perfortype/{allotId}"
)]
public
ApiResponse
<
List
<
TitleValue
>>
GetPerforTypeDict
([
FromRoute
]
int
allotId
)
{
var
result
=
employeeService
.
GetPerforTypeDict
(
allotId
);
return
new
ApiResponse
<
List
<
TitleValue
>>(
ResponseType
.
OK
,
"绩效类型字典"
,
result
);
}
/// <summary>
/// 医院其他绩效统计
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
[
Route
(
"apr/overview/{allotId}"
)]
[
HttpPost
]
public
ApiResponse
AprOverview
(
int
allotId
)
{
var
relust
=
employeeService
.
GetOtherPerStats
(
allotId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
relust
);
}
#
endregion
/// <summary>
/// 自动获取人员信息
/// </summary>
/// <remarks>
...
...
@@ -456,30 +484,223 @@ public ApiResponse<per_apr_amount> GetEmployeeMessage([FromBody] per_apr_amount
}
/// <summary>
///
绩效类型字典
///
材料科室考核
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
[
HttpPost
(
"apr/perfortype/{allotId}"
)]
public
ApiResponse
<
List
<
TitleValue
>>
GetPerforTypeDict
([
FromRoute
]
int
allotId
)
[
Route
(
"deptAssessment/{allotId}"
)]
[
HttpPost
]
public
ApiResponse
GetDeptAssessment
(
int
allotId
)
{
var
result
=
employeeService
.
GetPerforTypeDict
(
allotId
);
return
new
ApiResponse
<
List
<
TitleValue
>>(
ResponseType
.
OK
,
"绩效类型字典"
,
result
);
if
(
allotId
<=
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数AllotId无效!"
);
var
result
=
employeeService
.
GetDeptAssessment
(
allotId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
#
region
不公示其他绩效
/// <summary>
///
材料科室考核
///
获取不公示其他绩效列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"
deptAssessment/{allotId}
"
)]
[
Route
(
"
apr/hide/getlist
"
)]
[
HttpPost
]
public
ApiResponse
Get
DeptAssessment
(
int
allotId
)
public
ApiResponse
Get
AprHideList
([
FromBody
]
AllotIdRequest
request
)
{
if
(
allotId
<=
0
)
if
(
request
.
AllotId
==
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数AllotId无效!"
);
var
result
=
employeeService
.
GetDeptAssessment
(
allotId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
var
employee
=
employeeService
.
GetAprHideList
(
request
.
AllotId
,
claim
.
GetUserId
());
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
employee
);
}
/// <summary>
/// 不公示其他绩效审核
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"apr/hide/getdeptlist"
)]
[
HttpPost
]
public
ApiResponse
GetAprHideGroupList
([
FromBody
]
AllotIdRequest
request
)
{
if
(
request
.
AllotId
==
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数AllotId无效!"
);
var
employee
=
employeeService
.
GetAprHideList
(
request
.
AllotId
,
claim
.
GetUserId
());
if
(
employee
==
null
||
!
employee
.
Any
())
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
employee
);
var
result
=
employee
.
GroupBy
(
t
=>
new
{
TypeInDepartment
=
t
.
TypeInDepartment
??
""
})
.
Select
(
t
=>
new
per_apr_amount
{
TypeInDepartment
=
t
.
Key
.
TypeInDepartment
,
Amount
=
t
.
Sum
(
s
=>
s
.
Amount
??
0
),
Status
=
t
.
Any
(
s
=>
s
.
Status
==
2
)
?
2
:
t
.
Any
(
s
=>
s
.
Status
==
4
)
?
4
:
t
.
FirstOrDefault
().
Status
,
});
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
result
);
}
/// <summary>
///不公示其他绩效审核详情
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"apr/hide/getdeptdetail"
)]
[
HttpPost
]
public
ApiResponse
GetAprHideDetail
([
FromBody
]
per_apr_amount
request
)
{
if
(
request
.
AllotId
==
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数AllotId无效!"
);
var
employee
=
employeeService
.
GetAprHideList
(
request
.
AllotId
,
request
.
TypeInDepartment
);
if
(
employee
==
null
||
!
employee
.
Any
())
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
employee
);
var
result
=
employee
.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
PersonnelNumber
,
t
.
DoctorName
}).
Select
(
t
=>
new
{
PersonnelNumber
=
t
.
Key
.
PersonnelNumber
,
DoctorName
=
t
.
Key
.
DoctorName
,
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
Status
=
t
.
Any
(
s
=>
s
.
Status
==
2
)
?
2
:
t
.
Any
(
s
=>
s
.
Status
==
4
)
?
4
:
t
.
FirstOrDefault
().
Status
,
Detail
=
t
.
GroupBy
(
group
=>
group
.
PerforType
).
Select
(
s
=>
new
TitleValue
<
decimal
>
{
Title
=
string
.
IsNullOrEmpty
(
s
.
Key
)
?
"未知"
:
s
.
Key
,
Value
=
s
.
Sum
(
sum
=>
sum
.
Amount
??
0
)
})
});
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
result
);
}
/// <summary>
/// 新增不公示其他绩效
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"apr/hide/insert"
)]
[
HttpPost
]
public
ApiResponse
InsertAprHide
([
FromBody
]
per_apr_amount_hide
request
)
{
if
(
request
.
AllotId
==
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数AllotId无效!"
);
var
result
=
employeeService
.
InsertAprHide
(
request
,
claim
.
GetUserId
());
return
result
?
new
ApiResponse
(
ResponseType
.
OK
,
"添加成功"
,
request
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"添加失败"
);
}
/// <summary>
/// 修改不公示其他绩效
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"apr/hide/update"
)]
[
HttpPost
]
public
ApiResponse
UpdateAprHide
([
FromBody
]
per_apr_amount_hide
request
)
{
if
(
request
.
AllotId
==
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数AllotId无效!"
);
var
result
=
employeeService
.
UpdateAprHide
(
request
);
return
result
?
new
ApiResponse
(
ResponseType
.
OK
,
"修改成功"
,
request
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"修改失败"
);
}
/// <summary>
/// 删除不公示其他绩效
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"apr/hide/delete"
)]
[
HttpPost
]
public
ApiResponse
DeleteAprHide
([
FromBody
]
IdRequest
request
)
{
if
(
request
.
Id
==
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数无效!"
);
if
(!
employeeService
.
DeleteAprHide
(
request
.
Id
))
return
new
ApiResponse
(
ResponseType
.
Fail
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
/// <summary>
/// 不公示其他绩效审核;驳回、成功
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
Route
(
"apr/hide/audit"
)]
public
ApiResponse
AuditResultHide
([
FromBody
]
AprAmountAuditRequest
request
)
{
var
userid
=
claim
.
GetUserId
();
var
result
=
employeeService
.
ConfirmAuditHide
(
userid
,
request
);
return
result
?
new
ApiResponse
(
ResponseType
.
OK
,
"操作成功"
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"操作失败"
);
}
/// <summary>
/// 上传不公示其他绩效
/// </summary>
/// <param name="form"></param>
/// <returns></returns>
[
Route
(
"apr/hide/import"
)]
[
HttpPost
]
public
ApiResponse
ImportAprHide
([
FromForm
]
IFormCollection
form
)
{
var
allotid
=
form
.
ToDictionary
().
GetValue
(
"allotid"
,
0
);
if
(
allotid
<=
0
)
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"allotid无效"
);
var
file
=
((
FormFileCollection
)
form
.
Files
).
FirstOrDefault
();
if
(
file
==
null
)
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"文件无效"
);
if
(!
ExtractHelper
.
IsXlsxFile
(
file
.
FileName
))
return
new
ApiResponse
(
ResponseType
.
Fail
,
"文件格式错误"
,
"文件暂只支持xlsx文件"
);
var
allot
=
allotService
.
GetAllot
(
allotid
);
if
(
allot
==
null
)
return
new
ApiResponse
(
ResponseType
.
Fail
,
"allotid不存在"
);
var
name
=
FileHelper
.
GetFileNameNoExtension
(
file
.
FileName
)
+
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmssfff"
);
var
ext
=
FileHelper
.
GetExtension
(
file
.
FileName
);
var
dpath
=
Path
.
Combine
(
evn
.
ContentRootPath
,
"Files"
,
$"
{
allot
.
HospitalId
}
"
,
$"
{
allot
.
Year
}{
allot
.
Month
.
ToString
().
PadLeft
(
2
,
'0'
)}
"
);
FileHelper
.
CreateDirectory
(
dpath
);
var
path
=
Path
.
Combine
(
dpath
,
$"
{
name
}{
ext
}
"
);
using
(
var
stream
=
file
.
OpenReadStream
())
{
byte
[]
bytes
=
new
byte
[
stream
.
Length
];
stream
.
Read
(
bytes
,
0
,
bytes
.
Length
);
if
(!
FileHelper
.
CreateFile
(
path
,
bytes
))
return
new
ApiResponse
(
ResponseType
.
Fail
,
$"
{
file
.
FileName
}
上传失败"
);
}
employeeService
.
ImpoerAprHideEmployees
(
allotid
,
path
,
claim
.
GetUserId
());
return
new
ApiResponse
(
ResponseType
.
OK
);
}
/// <summary>
/// 不公示其他绩效类型字典
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
[
HttpPost
(
"apr/hide/perfortype/{allotId}"
)]
public
ApiResponse
<
List
<
TitleValue
>>
GetPerforTypeDictHide
([
FromRoute
]
int
allotId
)
{
var
result
=
employeeService
.
GetPerforTypeDictHide
(
allotId
);
return
new
ApiResponse
<
List
<
TitleValue
>>(
ResponseType
.
OK
,
"绩效类型字典"
,
result
);
}
/// <summary>
/// 不公示其他绩效统计
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
[
Route
(
"apr/hide/overview/{allotId}"
)]
[
HttpPost
]
public
ApiResponse
AprHideOverview
(
int
allotId
)
{
var
relust
=
employeeService
.
GetOtherPerStatsHide
(
allotId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
relust
);
}
#
endregion
}
}
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
8d45a787
...
...
@@ -509,13 +509,6 @@
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ComputeController.OtherPerStats(System.Int32)"
>
<summary>
其他医院绩效统计
</summary>
<param
name=
"allotId"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ConfigController.GetDrugtypeList(Performance.DtoModels.DrugpropRequest)"
>
<summary>
获取 药占比类型信息列表
...
...
@@ -795,14 +788,14 @@
<param
name=
"allotid"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetAprList(Performance.
EntityModels.per_apr_amoun
t)"
>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetAprList(Performance.
DtoModels.AllotIdReques
t)"
>
<summary>
获取
人员补充
绩效列表
获取
医院其他
绩效列表
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetAprGroupList(Performance.
EntityModels.per_apr_amoun
t)"
>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetAprGroupList(Performance.
DtoModels.AllotIdReques
t)"
>
<summary>
医院其他绩效审核
</summary>
...
...
@@ -818,21 +811,21 @@
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.InsertApr(Performance.EntityModels.per_apr_amount)"
>
<summary>
新增
人员补充
绩效
新增
医院其他
绩效
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.UpdateApr(Performance.EntityModels.per_apr_amount)"
>
<summary>
修改
人员补充
绩效
修改
医院其他
绩效
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.DeleteApr(Performance.
EntityModels.per_apr_amoun
t)"
>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.DeleteApr(Performance.
DtoModels.IdReques
t)"
>
<summary>
删除
人员补充
绩效
删除
医院其他
绩效
</summary>
<param
name=
"request"
></param>
<returns></returns>
...
...
@@ -845,11 +838,25 @@
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.Import(Microsoft.AspNetCore.Http.IFormCollection)"
>
<summary>
上传
人员
绩效文件
上传
医院其他
绩效文件
</summary>
<param
name=
"form"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetPerforTypeDict(System.Int32)"
>
<summary>
绩效类型字典
</summary>
<param
name=
"allotId"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.AprOverview(System.Int32)"
>
<summary>
医院其他绩效统计
</summary>
<param
name=
"allotId"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetEmployeeMessage(Performance.EntityModels.per_apr_amount)"
>
<summary>
自动获取人员信息
...
...
@@ -867,17 +874,79 @@
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.Get
PerforTypeDic
t(System.Int32)"
>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.Get
DeptAssessmen
t(System.Int32)"
>
<summary>
绩效类型字典
材料科室考核
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetAprHideList(Performance.DtoModels.AllotIdRequest)"
>
<summary>
获取不公示其他绩效列表
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetAprHideGroupList(Performance.DtoModels.AllotIdRequest)"
>
<summary>
不公示其他绩效审核
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetAprHideDetail(Performance.EntityModels.per_apr_amount)"
>
<summary>
不公示其他绩效审核详情
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.InsertAprHide(Performance.EntityModels.per_apr_amount_hide)"
>
<summary>
新增不公示其他绩效
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.UpdateAprHide(Performance.EntityModels.per_apr_amount_hide)"
>
<summary>
修改不公示其他绩效
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.DeleteAprHide(Performance.DtoModels.IdRequest)"
>
<summary>
删除不公示其他绩效
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.AuditResultHide(Performance.DtoModels.AprAmountAuditRequest)"
>
<summary>
不公示其他绩效审核;驳回、成功
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.ImportAprHide(Microsoft.AspNetCore.Http.IFormCollection)"
>
<summary>
上传不公示其他绩效
</summary>
<param
name=
"form"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetPerforTypeDictHide(System.Int32)"
>
<summary>
不公示其他绩效类型字典
</summary>
<param
name=
"allotId"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.
GetDeptAssessment
(System.Int32)"
>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.
AprHideOverview
(System.Int32)"
>
<summary>
材料科室考核
不公示其他绩效统计
</summary>
<param
name=
"allotId"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ExConfigController.Extract(Performance.DtoModels.ModModuleRequest)"
>
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
8d45a787
...
...
@@ -220,6 +220,9 @@
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.per_apr_amount"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.per_apr_amount_hide"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.per_budget_amount"
>
<summary>
预算管理金额
</summary>
</member>
...
...
@@ -4411,6 +4414,86 @@
验证失败描述
</summary>
</member>
<member
name=
"T:Performance.EntityModels.per_apr_amount_hide"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_apr_amount_hide.Id"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_apr_amount_hide.AllotId"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_apr_amount_hide.PersonnelNumber"
>
<summary>
人员工号
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_apr_amount_hide.DoctorName"
>
<summary>
医生姓名
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_apr_amount_hide.PerforType"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_apr_amount_hide.Amount"
>
<summary>
金额
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_apr_amount_hide.TypeInDepartment"
>
<summary>
录入科室
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_apr_amount_hide.Status"
>
<summary>
状态 1 未提交 2 等待审核 3 审核通过 4 驳回
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_apr_amount_hide.AuditTime"
>
<summary>
审核时间
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_apr_amount_hide.AuditUser"
>
<summary>
审核人
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_apr_amount_hide.CreateDate"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_apr_amount_hide.CreateUser"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_apr_amount_hide.Remark"
>
<summary>
备注
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_apr_amount_hide.IsVerify"
>
<summary>
0 未通过验证 1 通过验证
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_apr_amount_hide.VerifyMessage"
>
<summary>
验证失败描述
</summary>
</member>
<member
name=
"T:Performance.EntityModels.per_budget_amount"
>
<summary>
预算管理金额
...
...
performance/Performance.DtoModels/Request/CommonRequest.cs
0 → 100644
View file @
8d45a787
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
AllotIdRequest
{
public
int
AllotId
{
get
;
set
;
}
}
public
class
IdRequest
{
public
int
Id
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
View file @
8d45a787
...
...
@@ -158,6 +158,8 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
public
virtual
DbSet
<
per_allot
>
per_allot
{
get
;
set
;
}
/// <summary> </summary>
public
virtual
DbSet
<
per_apr_amount
>
per_apr_amount
{
get
;
set
;
}
/// <summary> </summary>
public
virtual
DbSet
<
per_apr_amount_hide
>
per_apr_amount_hide
{
get
;
set
;
}
/// <summary> 预算管理金额 </summary>
public
virtual
DbSet
<
per_budget_amount
>
per_budget_amount
{
get
;
set
;
}
/// <summary> 预算管理占比 </summary>
...
...
performance/Performance.EntityModels/Entity/per_apr_amount.cs
View file @
8d45a787
...
...
@@ -7,45 +7,45 @@
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels
namespace
Performance.EntityModels
{
/// <summary>
///
/// </summary>
[
Table
(
"per_apr_amount"
)]
public
class
per_apr_amount
public
class
per_apr_amount
{
/// <summary>
///
/// </summary>
[
Key
]
public
int
Id
{
get
;
set
;
}
public
int
Id
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
AllotId
{
get
;
set
;
}
/// <summary>
/// 人员工号
/// </summary>
public
string
PersonnelNumber
{
get
;
set
;
}
/// <summary>
/// 医生姓名
/// </summary>
public
string
DoctorName
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
string
PerforType
{
get
;
set
;
}
/// <summary>
/// 金额
/// </summary>
public
Nullable
<
decimal
>
Amount
{
get
;
set
;
}
/// <summary>
/// 录入科室
/// </summary>
...
...
@@ -60,27 +60,27 @@ public class per_apr_amount
/// 状态 1 未提交 2 等待审核 3 审核通过 4 驳回
/// </summary>
public
Nullable
<
int
>
Status
{
get
;
set
;
}
/// <summary>
/// 审核时间
/// </summary>
public
Nullable
<
DateTime
>
AuditTime
{
get
;
set
;
}
/// <summary>
/// 审核人
/// </summary>
public
Nullable
<
int
>
AuditUser
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
DateTime
>
CreateDate
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
CreateUser
{
get
;
set
;
}
/// <summary>
/// 备注
/// </summary>
...
...
performance/Performance.EntityModels/Entity/per_apr_amount_hide.cs
0 → 100644
View file @
8d45a787
//-----------------------------------------------------------------------
// <copyright file=" per_apr_amount_hide.cs">
// * FileName: .cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels
{
/// <summary>
///
/// </summary>
[
Table
(
"per_apr_amount_hide"
)]
public
class
per_apr_amount_hide
{
/// <summary>
///
/// </summary>
[
Key
]
public
int
Id
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
AllotId
{
get
;
set
;
}
/// <summary>
/// 人员工号
/// </summary>
public
string
PersonnelNumber
{
get
;
set
;
}
/// <summary>
/// 医生姓名
/// </summary>
public
string
DoctorName
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
string
PerforType
{
get
;
set
;
}
/// <summary>
/// 金额
/// </summary>
public
Nullable
<
decimal
>
Amount
{
get
;
set
;
}
/// <summary>
/// 录入科室
/// </summary>
public
string
TypeInDepartment
{
get
;
set
;
}
/// <summary>
/// 状态 1 未提交 2 等待审核 3 审核通过 4 驳回
/// </summary>
public
Nullable
<
int
>
Status
{
get
;
set
;
}
/// <summary>
/// 审核时间
/// </summary>
public
Nullable
<
DateTime
>
AuditTime
{
get
;
set
;
}
/// <summary>
/// 审核人
/// </summary>
public
Nullable
<
int
>
AuditUser
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
DateTime
>
CreateDate
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
CreateUser
{
get
;
set
;
}
/// <summary>
/// 备注
/// </summary>
public
string
Remark
{
get
;
set
;
}
/// <summary>
/// 0 未通过验证 1 通过验证
/// </summary>
public
int
?
IsVerify
{
get
;
set
;
}
/// <summary>
/// 验证失败描述
/// </summary>
public
string
VerifyMessage
{
get
;
set
;
}
}
}
performance/Performance.Repository/PerforPerapramountRepository.cs
View file @
8d45a787
...
...
@@ -14,35 +14,36 @@ namespace Performance.Repository
/// per_apr_amount Repository
/// </summary>
public
partial
class
PerforPerapramountRepository
:
PerforRepository
<
per_apr_amount
>
{
{
public
List
<
view_per_apr_amount
>
GetFullAmount
(
Func
<
per_apr_amount
,
bool
>
predicate
)
{
var
employees
=
this
.
context
.
Set
<
per_employee
>().
AsEnumerable
();
var
amounts
=
this
.
context
.
Set
<
per_apr_amount
>().
Where
(
predicate
);
var
res
=
amounts
.
Join
(
employees
,
outer
=>
new
{
outer
.
AllotId
,
outer
.
PersonnelNumber
},
inner
=>
new
{
AllotId
=
inner
.
AllotId
??
0
,
inner
.
PersonnelNumber
},
(
outer
,
inner
)
=>
new
view_per_apr_amount
{
Id
=
outer
.
Id
,
AllotId
=
outer
.
AllotId
,
PersonnelNumber
=
outer
.
PersonnelNumber
,
DoctorName
=
outer
.
DoctorName
,
PerforType
=
outer
.
PerforType
,
Amount
=
outer
.
Amount
,
AccountingUnit
=
inner
.
AccountingUnit
,
UnitType
=
inner
.
UnitType
,
TypeInDepartment
=
outer
.
TypeInDepartment
,
Status
=
outer
.
Status
,
AuditTime
=
outer
.
AuditTime
,
AuditUser
=
outer
.
AuditUser
,
CreateDate
=
outer
.
CreateDate
,
CreateUser
=
outer
.
CreateUser
,
Remark
=
outer
.
Remark
,
IsVerify
=
outer
.
IsVerify
,
VerifyMessage
=
outer
.
VerifyMessage
,
});
var
res
=
from
outer
in
amounts
join
inner
in
employees
on
new
{
outer
.
AllotId
,
outer
.
PersonnelNumber
}
equals
new
{
AllotId
=
inner
.
AllotId
??
0
,
inner
.
PersonnelNumber
}
into
temp
from
tt
in
temp
.
DefaultIfEmpty
()
select
new
view_per_apr_amount
{
Id
=
outer
.
Id
,
AllotId
=
outer
.
AllotId
,
PersonnelNumber
=
outer
.
PersonnelNumber
,
DoctorName
=
outer
.
DoctorName
,
PerforType
=
outer
.
PerforType
,
Amount
=
outer
.
Amount
,
AccountingUnit
=
tt
?.
AccountingUnit
??
""
,
UnitType
=
tt
?.
UnitType
??
""
,
TypeInDepartment
=
outer
.
TypeInDepartment
,
Status
=
outer
.
Status
,
AuditTime
=
outer
.
AuditTime
,
AuditUser
=
outer
.
AuditUser
,
CreateDate
=
outer
.
CreateDate
,
CreateUser
=
outer
.
CreateUser
,
Remark
=
outer
.
Remark
,
IsVerify
=
outer
.
IsVerify
,
VerifyMessage
=
outer
.
VerifyMessage
,
};
return
res
.
ToList
()
??
new
List
<
view_per_apr_amount
>();
}
}
...
...
performance/Performance.Repository/PerforPerapramounthideRepository.cs
0 → 100644
View file @
8d45a787
//-----------------------------------------------------------------------
// <copyright file=" per_apr_amount.cs">
// * FileName: per_apr_amount.cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
Performance.EntityModels
;
namespace
Performance.Repository
{
/// <summary>
/// per_apr_amount Repository
/// </summary>
public
partial
class
PerforPerapramounthideRepository
:
PerforRepository
<
per_apr_amount_hide
>
{
public
List
<
view_per_apr_amount
>
GetFullAmount
(
Func
<
per_apr_amount_hide
,
bool
>
predicate
)
{
var
employees
=
this
.
context
.
Set
<
per_employee
>().
AsEnumerable
();
var
amounts
=
this
.
context
.
Set
<
per_apr_amount_hide
>().
Where
(
predicate
);
var
res
=
from
outer
in
amounts
join
inner
in
employees
on
new
{
outer
.
AllotId
,
outer
.
PersonnelNumber
}
equals
new
{
AllotId
=
inner
.
AllotId
??
0
,
inner
.
PersonnelNumber
}
into
temp
from
tt
in
temp
.
DefaultIfEmpty
()
select
new
view_per_apr_amount
{
Id
=
outer
.
Id
,
AllotId
=
outer
.
AllotId
,
PersonnelNumber
=
outer
.
PersonnelNumber
,
DoctorName
=
outer
.
DoctorName
,
PerforType
=
outer
.
PerforType
,
Amount
=
outer
.
Amount
,
AccountingUnit
=
tt
?.
AccountingUnit
??
""
,
UnitType
=
tt
?.
UnitType
??
""
,
TypeInDepartment
=
outer
.
TypeInDepartment
,
Status
=
outer
.
Status
,
AuditTime
=
outer
.
AuditTime
,
AuditUser
=
outer
.
AuditUser
,
CreateDate
=
outer
.
CreateDate
,
CreateUser
=
outer
.
CreateUser
,
Remark
=
outer
.
Remark
,
IsVerify
=
outer
.
IsVerify
,
VerifyMessage
=
outer
.
VerifyMessage
,
};
return
res
.
ToList
()
??
new
List
<
view_per_apr_amount
>();
}
}
}
performance/Performance.Repository/Repository/PerforPerapramounthideRepository.cs
0 → 100644
View file @
8d45a787
//-----------------------------------------------------------------------
// <copyright file=" per_apr_amount.cs">
// * FileName: per_apr_amount.cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
Performance.EntityModels
;
namespace
Performance.Repository
{
/// <summary>
/// per_apr_amount Repository
/// </summary>
public
partial
class
PerforPerapramounthideRepository
:
PerforRepository
<
per_apr_amount_hide
>
{
public
PerforPerapramounthideRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
{
}
}
}
performance/Performance.Services/AprAmountService.cs
View file @
8d45a787
using
Performance.Repository
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
//
using Performance.Repository;
//
using System;
//
using System.Collections.Generic;
//
using System.Linq;
//
using System.Text;
namespace
Performance.Services
{
public
class
AprAmountService
:
IAutoInjection
{
private
readonly
PerforPeremployeeRepository
_peremployeeRepository
;
private
readonly
PerforPerapramountRepository
_perapramountRepository
;
//
namespace Performance.Services
//
{
//
public class AprAmountService : IAutoInjection
//
{
//
private readonly PerforPeremployeeRepository _peremployeeRepository;
//
private readonly PerforPerapramountRepository _perapramountRepository;
public
AprAmountService
(
PerforPeremployeeRepository
peremployeeRepository
,
PerforPerapramountRepository
perapramountRepository
)
{
_peremployeeRepository
=
peremployeeRepository
;
_perapramountRepository
=
perapramountRepository
;
}
//
public AprAmountService(
//
PerforPeremployeeRepository peremployeeRepository,
//
PerforPerapramountRepository perapramountRepository)
//
{
//
_peremployeeRepository = peremployeeRepository;
//
_perapramountRepository = perapramountRepository;
//
}
/// <summary>
/// 获取医院其他绩效 默认审核通过 status = 3
/// 科室及核算组别使用人员字典
/// </summary>
/// <param name="allotId"></param>
/// <param name="status"></param>
/// <returns></returns>
public
List
<
AprAmount
>
GetAprAmount
(
int
allotId
,
int
status
=
3
)
{
var
perapramounts
=
_perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Status
==
status
);
var
employees
=
_peremployeeRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
);
//
/// <summary>
//
/// 获取医院其他绩效 默认审核通过 status = 3
//
/// 科室及核算组别使用人员字典
//
/// </summary>
//
/// <param name="allotId"></param>
//
/// <param name="status"></param>
//
/// <returns></returns>
//
public List<AprAmount> GetAprAmount(int allotId, int status = 3)
//
{
//
var perapramounts = _perapramountRepository.GetEntities(t => t.AllotId == allotId && t.Status == status);
//
var employees = _peremployeeRepository.GetEntities(t => t.AllotId == allotId);
var
result
=
perapramounts
.
Join
(
employees
,
amt
=>
amt
.
PersonnelNumber
,
epy
=>
epy
.
PersonnelNumber
,
(
amt
,
epy
)
=>
new
AprAmount
{
AccountingUnit
=
epy
.
AccountingUnit
,
UnitType
=
epy
.
UnitType
,
PersonnelNumber
=
amt
.
PersonnelNumber
,
DoctorName
=
amt
.
DoctorName
,
PerforType
=
amt
.
PerforType
,
Amount
=
amt
.
Amount
});
return
result
?.
ToList
()
??
new
List
<
AprAmount
>();
}
}
//
var result = perapramounts.Join(employees, amt => amt.PersonnelNumber, epy => epy.PersonnelNumber,
//
(amt, epy) => new AprAmount
//
{
//
AccountingUnit = epy.AccountingUnit,
//
UnitType = epy.UnitType,
//
PersonnelNumber = amt.PersonnelNumber,
//
DoctorName = amt.DoctorName,
//
PerforType = amt.PerforType,
//
Amount = amt.Amount
//
});
//
return result?.ToList() ?? new List<AprAmount>();
//
}
//
}
public
class
AprAmount
{
/// <summary>
/// 核算单元
/// </summary>
public
string
UnitType
{
get
;
set
;
}
//
public class AprAmount
//
{
//
/// <summary>
//
/// 核算单元
//
/// </summary>
//
public string UnitType { get; set; }
/// <summary>
/// 人员工号
/// </summary>
public
string
PersonnelNumber
{
get
;
set
;
}
//
/// <summary>
//
/// 人员工号
//
/// </summary>
//
public string PersonnelNumber { get; set; }
/// <summary>
/// 医生姓名
/// </summary>
public
string
DoctorName
{
get
;
set
;
}
//
/// <summary>
//
/// 医生姓名
//
/// </summary>
//
public string DoctorName { get; set; }
/// <summary>
///
/// </summary>
public
string
PerforType
{
get
;
set
;
}
//
/// <summary>
//
///
//
/// </summary>
//
public string PerforType { get; set; }
/// <summary>
/// 金额
/// </summary>
public
Nullable
<
decimal
>
Amount
{
get
;
set
;
}
//
/// <summary>
//
/// 金额
//
/// </summary>
//
public Nullable<decimal> Amount { get; set; }
/// <summary>
/// 核算单元
/// </summary>
public
string
AccountingUnit
{
get
;
set
;
}
}
}
//
/// <summary>
//
/// 核算单元
//
/// </summary>
//
public string AccountingUnit { get; set; }
//
}
//
}
performance/Performance.Services/ComputeService.cs
View file @
8d45a787
...
...
@@ -32,9 +32,11 @@ public class ComputeService : IAutoInjection
private
readonly
PerforHospitalRepository
hospitalRepository
;
private
readonly
PerforPerapramountRepository
perapramountRepository
;
private
readonly
PerforPeremployeeRepository
perforPeremployeeRepository
;
private
readonly
PerforPerapramounthideRepository
_hideRepository
;
private
readonly
PerforCofworkitemRepository
cofworkitemRepository
;
public
ComputeService
(
PerforResaccountRepository
perforResaccountRepository
,
public
ComputeService
(
PerforResaccountRepository
perforResaccountRepository
,
PerforPersheetRepository
perforPerSheetRepository
,
PerforImdataRepository
perforImDataRepository
,
PerforImheaderRepository
perforImheaderRepository
,
...
...
@@ -49,6 +51,7 @@ public class ComputeService : IAutoInjection
PerforHospitalRepository
hospitalRepository
,
PerforPerapramountRepository
perapramountRepository
,
PerforPeremployeeRepository
perforPeremployeeRepository
,
PerforPerapramounthideRepository
hideRepository
,
PerforCofworkitemRepository
cofworkitemRepository
)
{
this
.
perforResaccountRepository
=
perforResaccountRepository
;
...
...
@@ -66,6 +69,7 @@ public class ComputeService : IAutoInjection
this
.
hospitalRepository
=
hospitalRepository
;
this
.
perapramountRepository
=
perapramountRepository
;
this
.
perforPeremployeeRepository
=
perforPeremployeeRepository
;
_hideRepository
=
hideRepository
;
this
.
cofworkitemRepository
=
cofworkitemRepository
;
}
...
...
@@ -589,8 +593,8 @@ public List<DeptResponse> GetAdminPerformance(int allotId)
result
.
AddRange
(
officeResult
);
// 获取各科室 医院其他绩效
var
amounts
=
perapramountRepository
.
GetFullAmount
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Status
==
3
)
;
var
otherPerformances
=
a
mounts
var
fullAmounts
=
GetTotalAmount
(
allotId
);
;
var
otherPerformances
=
fullA
mounts
?.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
UnitType
})
.
Select
(
t
=>
new
view_per_total_amount
{
...
...
@@ -748,7 +752,7 @@ public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowM
// 人员字典
var
employees
=
perforPeremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
allotId
);
// 获取医院其他绩效汇总结果
var
tota
lAmounts
=
GetTotalAmount
(
allotId
);
var
ful
lAmounts
=
GetTotalAmount
(
allotId
);
// 获取一次绩效结果
var
one
=
GetAllotPerformance
(
allotId
,
hospitalId
,
isShowManage
);
// 获取二次绩效结果
...
...
@@ -760,6 +764,18 @@ public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowM
if
(
two
!=
null
)
response
.
AddRange
(
two
);
// 其他绩效汇总
var
totalAmounts
=
fullAmounts
?.
GroupBy
(
w
=>
new
{
w
.
AccountingUnit
,
w
.
UnitType
,
w
.
PersonnelNumber
})
.
Select
(
w
=>
new
view_per_total_amount
{
AccountingUnit
=
w
.
Key
.
AccountingUnit
,
UnitType
=
w
.
Key
.
UnitType
,
PersonnelNumber
=
w
.
Key
.
PersonnelNumber
,
Amount
=
w
.
Sum
(
t
=>
t
.
Amount
)
??
0
,
Use
=
false
,
})?.
ToList
();
// 补充医院其他绩效
AddAprAmount
(
response
,
totalAmounts
);
...
...
@@ -824,26 +840,24 @@ public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowM
}
/// <summary>
///
获取医院其他绩效汇总结果
///
合并医院其他绩效、不公示其他绩效
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
private
List
<
view_per_
total
_amount
>
GetTotalAmount
(
int
allotId
)
private
List
<
view_per_
apr
_amount
>
GetTotalAmount
(
int
allotId
)
{
var
fullAmounts
=
perapramountRepository
.
GetFullAmount
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Status
==
3
);
var
fullAmounts
1
=
perapramountRepository
.
GetFullAmount
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Status
==
3
)
??
new
List
<
view_per_apr_amount
>(
);
var
totalAmounts
=
fullAmounts
?.
GroupBy
(
w
=>
new
{
w
.
AccountingUnit
,
w
.
UnitType
,
w
.
PersonnelNumber
})
.
Select
(
w
=>
new
view_per_total_amount
{
AccountingUnit
=
w
.
Key
.
AccountingUnit
,
UnitType
=
w
.
Key
.
UnitType
,
PersonnelNumber
=
w
.
Key
.
PersonnelNumber
,
Amount
=
w
.
Sum
(
t
=>
t
.
Amount
)
??
0
,
Use
=
false
,
});
var
fullAmounts2
=
_hideRepository
.
GetFullAmount
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Status
==
3
)
??
new
List
<
view_per_apr_amount
>();
var
fullAmounts
=
new
List
<
view_per_apr_amount
>();
if
(
fullAmounts1
!=
null
&&
fullAmounts1
.
Any
())
fullAmounts
.
AddRange
(
fullAmounts1
);
if
(
fullAmounts2
!=
null
&&
fullAmounts2
.
Any
())
fullAmounts
.
AddRange
(
fullAmounts2
);
return
totalAmounts
?.
ToList
()
??
new
List
<
view_per_total_amount
>()
;
return
fullAmounts
;
}
/// <summary>
...
...
performance/Performance.Services/ConfigService.cs
View file @
8d45a787
...
...
@@ -959,37 +959,37 @@ public List<TitleValue> WorkHeader(int allotId)
return
null
;
}
/// <summary>
/// 人员绩效额外金额
/// </summary>
private
void
CopyAprData
(
int
prevAllotId
,
int
allotId
)
{
if
(
prevAllotId
==
0
)
return
;
var
list
=
perapramountRepository
.
GetEntities
(
t
=>
new
List
<
int
>
{
prevAllotId
,
allotId
}.
Contains
(
t
.
AllotId
));
if
(
list
==
null
||
!
list
.
Any
(
t
=>
t
.
AllotId
==
prevAllotId
))
return
;
///
//
<summary>
///
//
人员绩效额外金额
///
//
</summary>
//
private void CopyAprData(int prevAllotId, int allotId)
//
{
//
if (prevAllotId == 0) return;
//
var list = perapramountRepository.GetEntities(t => new List<int> { prevAllotId, allotId }.Contains(t.AllotId));
//
if (list == null || !list.Any(t => t.AllotId == prevAllotId)) return;
if
(
list
.
Any
(
t
=>
t
.
AllotId
==
allotId
))
{
var
prevData
=
list
.
Where
(
t
=>
t
.
AllotId
==
prevAllotId
);
var
existData
=
list
.
Where
(
t
=>
t
.
AllotId
==
allotId
);
if
(
existData
!=
null
&&
existData
.
Any
())
list
=
prevData
.
Where
(
t
=>
!
existData
.
Select
(
w
=>
w
.
PersonnelNumber
).
Contains
(
t
.
PersonnelNumber
)).
ToList
();
}
if
(
list
.
Any
())
{
var
data
=
list
.
Select
(
t
=>
new
per_apr_amount
{
Status
=
2
,
AllotId
=
allotId
,
PersonnelNumber
=
t
.
PersonnelNumber
,
DoctorName
=
t
.
DoctorName
,
PerforType
=
t
.
PerforType
,
Amount
=
t
.
Amount
,
CreateDate
=
DateTime
.
Now
});
perapramountRepository
.
AddRange
(
data
.
ToArray
());
}
}
//
if (list.Any(t => t.AllotId == allotId))
//
{
//
var prevData = list.Where(t => t.AllotId == prevAllotId);
//
var existData = list.Where(t => t.AllotId == allotId);
//
if (existData != null && existData.Any())
//
list = prevData.Where(t => !existData.Select(w => w.PersonnelNumber).Contains(t.PersonnelNumber)).ToList();
//
}
//
if (list.Any())
//
{
//
var data = list.Select(t => new per_apr_amount
//
{
//
Status = 2,
//
AllotId = allotId,
//
PersonnelNumber = t.PersonnelNumber,
//
DoctorName = t.DoctorName,
//
PerforType = t.PerforType,
//
Amount = t.Amount,
//
CreateDate = DateTime.Now
//
});
//
perapramountRepository.AddRange(data.ToArray());
//
}
//
}
#
region
HRP
人员科室
...
...
performance/Performance.Services/EmployeeService.cs
View file @
8d45a787
...
...
@@ -32,6 +32,7 @@ public class EmployeeService : IAutoInjection
private
PerforPeremployeeRepository
peremployeeRepository
;
private
PerforUserRepository
userRepository
;
private
readonly
PerforRoleRepository
_roleRepository
;
private
readonly
PerforPerapramounthideRepository
_hideRepository
;
private
ILogger
<
EmployeeService
>
logger
;
public
EmployeeService
(
...
...
@@ -48,6 +49,7 @@ public class EmployeeService : IAutoInjection
PerforPeremployeeRepository
peremployeeRepository
,
PerforUserRepository
userRepository
,
PerforRoleRepository
roleRepository
,
PerforPerapramounthideRepository
hideRepository
,
ILogger
<
EmployeeService
>
logger
)
{
this
.
perforImemployeeRepository
=
perforImemployeeRepository
;
...
...
@@ -63,6 +65,7 @@ public class EmployeeService : IAutoInjection
this
.
peremployeeRepository
=
peremployeeRepository
;
this
.
userRepository
=
userRepository
;
_roleRepository
=
roleRepository
;
_hideRepository
=
hideRepository
;
this
.
logger
=
logger
;
}
...
...
@@ -390,6 +393,13 @@ public bool Audit(int allotId)
return
perforPerallotRepository
.
Update
(
allot
);
}
#
region
医院其他绩效
/// <summary>
/// 获取所有医院其他绩效
/// </summary>
/// <param name="allotId"></param>
/// <param name="userId"></param>
/// <returns></returns>
public
List
<
per_apr_amount
>
GetAprList
(
int
allotId
,
int
userId
)
{
var
userrole
=
userroleRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userId
);
...
...
@@ -405,7 +415,12 @@ public List<per_apr_amount> GetAprList(int allotId, int userId)
return
list
;
}
/// <summary>
/// 医院其他绩效审核详情
/// </summary>
/// <param name="allotId"></param>
/// <param name="department"></param>
/// <returns></returns>
public
List
<
view_per_apr_amount
>
GetAprList
(
int
allotId
,
string
department
)
{
var
list
=
perapramountRepository
.
GetFullAmount
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Amount
.
HasValue
&&
t
.
Amount
!=
0
&&
(
t
.
TypeInDepartment
??
""
)
==
department
);
...
...
@@ -414,7 +429,12 @@ public List<view_per_apr_amount> GetAprList(int allotId, string department)
return
list
;
}
/// <summary>
/// 新增医院其他绩效
/// </summary>
/// <param name="request"></param>
/// <param name="userId"></param>
/// <returns></returns>
public
bool
InsertApr
(
per_apr_amount
request
,
int
userId
)
{
if
(
request
==
null
)
...
...
@@ -431,7 +451,11 @@ public bool InsertApr(per_apr_amount request, int userId)
request
.
CreateUser
=
userId
;
return
perapramountRepository
.
Add
(
request
);
}
/// <summary>
/// 修改医院其他绩效
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
bool
UpdateApr
(
per_apr_amount
request
)
{
if
(
request
==
null
)
...
...
@@ -456,7 +480,11 @@ public bool UpdateApr(per_apr_amount request)
return
perapramountRepository
.
Update
(
data
);
}
/// <summary>
/// 删除医院其他绩效
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public
bool
DeleteApr
(
int
id
)
{
var
data
=
perapramountRepository
.
GetEntity
(
t
=>
t
.
Id
==
id
);
...
...
@@ -501,28 +529,12 @@ public bool ConfirmAudit(int userid, AprAmountAuditRequest request)
}
return
true
;
}
/// <summary>
///
更加用户ID获取录入科室
///
上传导入医院其他绩效
/// </summary>
/// <param name="userId"></param>
/// <returns></returns>
public
string
GetTypeInDepartment
(
int
userId
)
{
var
userrole
=
userroleRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userId
);
if
(
userrole
==
null
)
throw
new
PerformanceException
(
"用户未绑定角色"
);
string
typeIn
=
""
;
// 护士长/科主任/特殊科室/行政科室 录入科室为核算单元
if
(
new
int
[]
{
3
,
4
,
9
,
10
}.
Contains
(
userrole
.
RoleID
))
typeIn
=
userRepository
.
GetEntity
(
w
=>
w
.
ID
==
userId
)?.
Department
??
""
;
// 非 护士长/科主任/特殊科室/行政科室 则为角色名称
else
typeIn
=
_roleRepository
.
GetEntity
(
w
=>
w
.
ID
==
userrole
.
RoleID
)?.
RoleName
??
""
;
return
typeIn
;
}
/// <param name="allotid"></param>
/// <param name="path"></param>
/// <param name="userid"></param>
public
void
ImpoerAprEmployees
(
int
allotid
,
string
path
,
int
userid
)
{
var
userrole
=
userroleRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userid
);
...
...
@@ -627,6 +639,64 @@ public void ImpoerAprEmployees(int allotid, string path, int userid)
}
/// <summary>
/// 获取绩效类型字典
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
public
List
<
TitleValue
>
GetPerforTypeDict
(
int
allotId
)
{
var
defaultTypes
=
new
List
<
string
>
{
"基础绩效"
,
"管理绩效"
};
var
aprAmountList
=
perapramountRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
allotId
);
if
(
aprAmountList
!=
null
&&
aprAmountList
.
Any
(
w
=>
!
defaultTypes
.
Contains
(
w
.
PerforType
)))
{
var
savedTypes
=
aprAmountList
.
Where
(
w
=>
!
defaultTypes
.
Contains
(
w
.
PerforType
)).
Select
(
t
=>
t
.
PerforType
).
Distinct
().
OrderBy
(
t
=>
t
).
ToList
();
defaultTypes
.
AddRange
(
savedTypes
);
}
return
defaultTypes
.
Select
(
t
=>
new
TitleValue
{
Title
=
t
,
Value
=
t
}).
ToList
();
}
/// <summary>
/// 医院其他绩效统计
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
public
List
<
Dictionary
<
string
,
string
>>
GetOtherPerStats
(
int
allotId
)
{
var
others
=
new
List
<
Dictionary
<
string
,
string
>>();
var
aprAmountList
=
perapramountRepository
.
GetFullAmount
(
w
=>
w
.
AllotId
==
allotId
&&
w
.
Status
==
3
);
var
perForType
=
aprAmountList
.
Select
(
t
=>
t
.
PerforType
).
Distinct
();
foreach
(
var
num
in
aprAmountList
.
Select
(
t
=>
t
.
PersonnelNumber
).
Distinct
())
{
var
dicData
=
new
Dictionary
<
string
,
string
>();
var
amount
=
aprAmountList
.
FirstOrDefault
(
t
=>
t
.
PersonnelNumber
==
num
);
if
(
amount
==
null
)
continue
;
dicData
.
Add
(
"核算单元"
,
amount
?.
AccountingUnit
??
""
);
dicData
.
Add
(
"工号"
,
amount
?.
PersonnelNumber
??
""
);
dicData
.
Add
(
"人员姓名"
,
amount
?.
DoctorName
??
""
);
foreach
(
var
type
in
perForType
)
{
var
emp
=
aprAmountList
.
Where
(
t
=>
t
.
PerforType
==
type
&&
t
.
PersonnelNumber
==
num
);
dicData
.
Add
(
type
,
Math
.
Round
(
emp
?.
Sum
(
c
=>
c
.
Amount
)
??
0
,
2
).
ToString
());
}
var
sum
=
aprAmountList
.
Where
(
c
=>
c
.
PersonnelNumber
==
num
)?.
Sum
(
t
=>
t
.
Amount
);
dicData
.
Add
(
"合计"
,
Math
.
Round
(
sum
??
0
,
2
).
ToString
());
others
.
Add
(
dicData
);
}
return
others
;
}
#
endregion
/// <summary>
/// 根据人员工号获取人员信息
/// </summary>
/// <param name="allotId"></param>
...
...
@@ -653,25 +723,24 @@ public view_per_apr_amount GetEmployeeMessage(int allotId, string personnelNumbe
}
/// <summary>
///
获取绩效类型字典
///
更加用户ID获取录入科室
/// </summary>
/// <param name="
allot
Id"></param>
/// <param name="
user
Id"></param>
/// <returns></returns>
public
List
<
TitleValue
>
GetPerforTypeDict
(
int
allot
Id
)
public
string
GetTypeInDepartment
(
int
user
Id
)
{
var
defaultTypes
=
new
List
<
string
>
{
"基础绩效"
,
"管理绩效"
};
var
userrole
=
userroleRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userId
);
if
(
userrole
==
null
)
throw
new
PerformanceException
(
"用户未绑定角色"
);
var
aprAmountList
=
perapramountRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
allotId
);
if
(
aprAmountList
!=
null
&&
aprAmountList
.
Any
(
w
=>
!
defaultTypes
.
Contains
(
w
.
PerforType
)))
{
var
savedTypes
=
aprAmountList
.
Where
(
w
=>
!
defaultTypes
.
Contains
(
w
.
PerforType
)).
Select
(
t
=>
t
.
PerforType
).
Distinct
().
OrderBy
(
t
=>
t
).
ToList
();
defaultTypes
.
AddRange
(
savedTypes
);
}
return
defaultTypes
.
Select
(
t
=>
new
TitleValue
{
Title
=
t
,
Value
=
t
}).
ToList
();
string
typeIn
=
""
;
// 护士长/科主任/特殊科室/行政科室 录入科室为核算单元
if
(
new
int
[]
{
3
,
4
,
9
,
10
}.
Contains
(
userrole
.
RoleID
))
typeIn
=
userRepository
.
GetEntity
(
w
=>
w
.
ID
==
userId
)?.
Department
??
""
;
// 非 护士长/科主任/特殊科室/行政科室 则为角色名称
else
typeIn
=
_roleRepository
.
GetEntity
(
w
=>
w
.
ID
==
userrole
.
RoleID
)?.
RoleName
??
""
;
return
typeIn
;
}
#
region
科室考核
...
...
@@ -724,11 +793,274 @@ public List<TitleValue> GetPerforTypeDict(int allotId)
#
endregion
#
region
不公示其他绩效
/// <summary>
/// 获取所有医院其他绩效
/// </summary>
/// <param name="allotId"></param>
/// <param name="userId"></param>
/// <returns></returns>
public
List
<
per_apr_amount_hide
>
GetAprHideList
(
int
allotId
,
int
userId
)
{
var
userrole
=
userroleRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userId
);
if
(
userrole
==
null
)
throw
new
PerformanceException
(
"用户未绑定角色"
);
public
List
<
Dictionary
<
string
,
string
>>
GetOtherPerStats
(
int
allotId
)
var
list
=
new
List
<
per_apr_amount_hide
>();
if
(
new
int
[]
{
1
,
2
,
5
,
6
}.
Contains
(
userrole
.
RoleID
))
// 绩效管理员、医院管理员、绩效核算办、院领导查看所有科室的数据
list
=
_hideRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
&&
(
t
.
Amount
??
0
)
!=
0
);
else
list
=
_hideRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
&&
(
t
.
Amount
??
0
)
!=
0
&&
t
.
CreateUser
==
userId
);
if
(
list
!=
null
&&
list
.
Any
())
list
=
list
.
OrderBy
(
w
=>
w
.
IsVerify
).
ThenBy
(
t
=>
t
.
DoctorName
).
ToList
();
return
list
;
}
/// <summary>
/// 医院其他绩效审核详情
/// </summary>
/// <param name="allotId"></param>
/// <param name="department"></param>
/// <returns></returns>
public
List
<
view_per_apr_amount
>
GetAprHideList
(
int
allotId
,
string
department
)
{
var
list
=
_hideRepository
.
GetFullAmount
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Amount
.
HasValue
&&
t
.
Amount
!=
0
&&
(
t
.
TypeInDepartment
??
""
)
==
department
);
if
(
list
!=
null
&&
list
.
Any
())
list
=
list
.
OrderBy
(
t
=>
t
.
DoctorName
).
ToList
();
return
list
;
}
/// <summary>
/// 新增医院其他绩效
/// </summary>
/// <param name="request"></param>
/// <param name="userId"></param>
/// <returns></returns>
public
bool
InsertAprHide
(
per_apr_amount_hide
request
,
int
userId
)
{
if
(
request
==
null
)
return
false
;
if
(
string
.
IsNullOrEmpty
(
request
.
PersonnelNumber
))
throw
new
PerformanceException
(
"文件中存在“工号”为空的数据"
);
if
(
string
.
IsNullOrEmpty
(
request
.
PerforType
)
&&
request
.
Amount
!=
0
)
throw
new
PerformanceException
(
"文件中存在“绩效类型”为空的数据"
);
request
.
TypeInDepartment
=
GetTypeInDepartment
(
userId
);
request
.
Status
=
2
;
request
.
CreateDate
=
DateTime
.
Now
;
request
.
CreateUser
=
userId
;
return
_hideRepository
.
Add
(
request
);
}
/// <summary>
/// 修改医院其他绩效
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
bool
UpdateAprHide
(
per_apr_amount_hide
request
)
{
if
(
request
==
null
)
return
false
;
if
(
string
.
IsNullOrEmpty
(
request
.
PersonnelNumber
))
throw
new
PerformanceException
(
"文件中存在“工号”为空的数据"
);
if
(
string
.
IsNullOrEmpty
(
request
.
PerforType
)
&&
request
.
Amount
!=
0
)
throw
new
PerformanceException
(
"文件中存在“绩效类型”为空的数据"
);
var
data
=
_hideRepository
.
GetEntity
(
t
=>
t
.
Id
==
request
.
Id
);
if
(
data
==
null
)
throw
new
PerformanceException
(
"修改数据无效"
);
data
.
Status
=
2
;
data
.
PersonnelNumber
=
request
.
PersonnelNumber
;
data
.
DoctorName
=
request
.
DoctorName
;
data
.
PerforType
=
request
.
PerforType
;
//data.AccountingUnit = request.AccountingUnit;
data
.
Amount
=
request
.
Amount
;
return
_hideRepository
.
Update
(
data
);
}
/// <summary>
/// 删除医院其他绩效
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public
bool
DeleteAprHide
(
int
id
)
{
var
data
=
_hideRepository
.
GetEntity
(
t
=>
t
.
Id
==
id
);
if
(
data
!=
null
)
return
_hideRepository
.
Remove
(
data
);
return
true
;
}
/// <summary>
/// 审核医院其他绩效
/// </summary>
/// <param name="userid"></param>
/// <param name="request"></param>
/// <returns></returns>
public
bool
ConfirmAuditHide
(
int
userid
,
AprAmountAuditRequest
request
)
{
if
(
request
?.
Members
==
null
)
throw
new
PerformanceException
(
"审核信息无效,请确认"
);
foreach
(
var
item
in
request
.
Members
)
{
if
(
string
.
IsNullOrEmpty
(
item
.
DoctorName
)
&&
string
.
IsNullOrEmpty
(
item
.
PersonnelNumber
))
throw
new
PerformanceException
(
"审核信息无效,请确认"
);
}
var
allApramounts
=
_hideRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
request
.
AllotId
);
foreach
(
var
member
in
request
.
Members
)
{
var
apramounts
=
allApramounts
?.
Where
(
t
=>
(
t
.
DoctorName
??
""
)
==
member
.
DoctorName
&&
(
t
.
PersonnelNumber
??
""
)
==
member
.
PersonnelNumber
);
if
(
apramounts
==
null
)
throw
new
PerformanceException
(
"审核信息无效,请确认"
);
foreach
(
var
item
in
apramounts
)
{
item
.
Status
=
(
request
.
IsPass
==
1
)
?
3
:
4
;
item
.
AuditUser
=
userid
;
item
.
AuditTime
=
DateTime
.
Now
;
item
.
Remark
=
request
.
Remark
;
_hideRepository
.
UpdateRange
(
apramounts
.
ToArray
());
}
}
return
true
;
}
/// <summary>
/// 上传导入医院其他绩效
/// </summary>
/// <param name="allotid"></param>
/// <param name="path"></param>
/// <param name="userid"></param>
public
void
ImpoerAprHideEmployees
(
int
allotid
,
string
path
,
int
userid
)
{
var
userrole
=
userroleRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userid
);
if
(
userrole
==
null
)
throw
new
PerformanceException
(
"用户未绑定角色"
);
var
data
=
new
List
<
per_apr_amount_hide
>();
if
(
new
int
[]
{
1
,
2
,
5
}.
Contains
(
userrole
.
RoleID
))
// 绩效管理员、医院管理员、绩效核算办查看所有科室的数据
data
=
_hideRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotid
&&
(
t
.
Amount
??
0
)
!=
0
);
else
data
=
_hideRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotid
&&
(
t
.
Amount
??
0
)
!=
0
&&
t
.
CreateUser
==
userid
);
if
(
data
!=
null
&&
data
.
Any
())
_hideRepository
.
RemoveRange
(
data
.
ToArray
());
try
{
IWorkbook
workbook
=
null
;
var
version
=
FileHelper
.
GetExtension
(
path
)
==
".xlsx"
?
ExcelVersion
.
xlsx
:
ExcelVersion
.
xls
;
using
(
FileStream
fs
=
new
FileStream
(
path
,
FileMode
.
OpenOrCreate
))
{
workbook
=
(
version
==
ExcelVersion
.
xlsx
)
?
(
IWorkbook
)(
new
XSSFWorkbook
(
fs
))
:
(
IWorkbook
)(
new
HSSFWorkbook
(
fs
));
}
if
(
workbook
==
null
)
return
;
var
sheet
=
workbook
.
GetSheetAt
(
0
);
var
firstRow
=
sheet
.
GetRow
(
0
);
Dictionary
<
int
,
string
>
excelheader
=
new
Dictionary
<
int
,
string
>();
for
(
int
cellindex
=
0
;
cellindex
<
firstRow
.
LastCellNum
+
1
;
cellindex
++)
{
var
value
=
firstRow
.
GetCell
(
cellindex
).
GetValue
();
if
(!
string
.
IsNullOrEmpty
(
value
)
&&
!
excelheader
.
ContainsKey
(
cellindex
))
excelheader
.
Add
(
cellindex
,
value
);
}
if
(
excelheader
==
null
||
excelheader
.
Count
==
0
)
throw
new
PerformanceException
(
"上传excel内容错误"
);
Dictionary
<
string
,
int
>
dict
=
new
Dictionary
<
string
,
int
>
{
{
"人员工号"
,
-
1
},
{
"姓名"
,
-
1
},
{
"绩效类型"
,
-
1
},
{
"金额"
,
-
1
},
};
foreach
(
var
key
in
dict
.
Keys
.
ToList
())
{
if
(
excelheader
.
Any
(
w
=>
w
.
Value
==
key
))
dict
[
key
]
=
excelheader
.
First
(
w
=>
w
.
Value
==
key
).
Key
;
}
var
entities
=
new
List
<
per_apr_amount_hide
>();
var
createtime
=
DateTime
.
Now
;
var
typeIn
=
GetTypeInDepartment
(
userid
);
for
(
int
rowindex
=
1
;
rowindex
<
sheet
.
LastRowNum
+
1
;
rowindex
++)
{
var
row
=
sheet
.
GetRow
(
rowindex
);
if
(
row
==
null
)
continue
;
var
entity
=
new
per_apr_amount_hide
{
Status
=
2
,
PersonnelNumber
=
dict
[
"人员工号"
]
<
0
?
""
:
row
.
GetCell
(
dict
[
"人员工号"
]).
GetValue
(),
DoctorName
=
dict
[
"姓名"
]
<
0
?
""
:
row
.
GetCell
(
dict
[
"姓名"
]).
GetValue
(),
PerforType
=
dict
[
"绩效类型"
]
<
0
?
""
:
row
.
GetCell
(
dict
[
"绩效类型"
]).
GetValue
(),
Amount
=
dict
[
"金额"
]
<
0
?
0
:
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
dict
[
"金额"
]).
GetValue
(),
0
),
TypeInDepartment
=
typeIn
,
AllotId
=
allotid
,
CreateDate
=
createtime
,
CreateUser
=
userid
,
};
entities
.
Add
(
entity
);
}
// 补充核算单元
if
(
entities
.
Any
())
{
if
(
entities
.
Any
(
w
=>
string
.
IsNullOrEmpty
(
w
.
PersonnelNumber
)
&&
w
.
Amount
!=
0
))
throw
new
PerformanceException
(
"文件中存在“工号”为空的数据"
);
if
(
entities
.
Any
(
w
=>
string
.
IsNullOrEmpty
(
w
.
PerforType
)
&&
w
.
Amount
!=
0
))
throw
new
PerformanceException
(
"文件中存在“绩效类型”为空的数据"
);
_hideRepository
.
AddRange
(
entities
.
ToArray
());
}
}
catch
(
PerformanceException
ex
)
{
throw
ex
;
}
catch
(
Exception
ex
)
{
logger
.
LogError
(
ex
.
ToString
());
}
}
/// <summary>
/// 获取绩效类型字典
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
public
List
<
TitleValue
>
GetPerforTypeDictHide
(
int
allotId
)
{
var
defaultTypes
=
new
List
<
string
>
{
"基础绩效"
,
"管理绩效"
};
var
aprAmountList
=
_hideRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
allotId
);
if
(
aprAmountList
!=
null
&&
aprAmountList
.
Any
(
w
=>
!
defaultTypes
.
Contains
(
w
.
PerforType
)))
{
var
savedTypes
=
aprAmountList
.
Where
(
w
=>
!
defaultTypes
.
Contains
(
w
.
PerforType
)).
Select
(
t
=>
t
.
PerforType
).
Distinct
().
OrderBy
(
t
=>
t
).
ToList
();
defaultTypes
.
AddRange
(
savedTypes
);
}
return
defaultTypes
.
Select
(
t
=>
new
TitleValue
{
Title
=
t
,
Value
=
t
}).
ToList
();
}
/// <summary>
/// 医院其他绩效统计
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
public
List
<
Dictionary
<
string
,
string
>>
GetOtherPerStatsHide
(
int
allotId
)
{
var
others
=
new
List
<
Dictionary
<
string
,
string
>>();
var
aprAmountList
=
perapramount
Repository
.
GetFullAmount
(
w
=>
w
.
AllotId
==
allotId
&&
w
.
Status
==
3
);
var
aprAmountList
=
_hide
Repository
.
GetFullAmount
(
w
=>
w
.
AllotId
==
allotId
&&
w
.
Status
==
3
);
var
perForType
=
aprAmountList
.
Select
(
t
=>
t
.
PerforType
).
Distinct
();
foreach
(
var
num
in
aprAmountList
.
Select
(
t
=>
t
.
PersonnelNumber
).
Distinct
())
...
...
@@ -754,5 +1086,6 @@ public List<TitleValue> GetPerforTypeDict(int allotId)
return
others
;
}
#
endregion
}
}
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