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
7a10fa1a
Commit
7a10fa1a
authored
Sep 04, 2020
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预留比例
parent
d87f31c9
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
710 additions
and
36 deletions
+710
-36
performance/Performance.Api/Controllers/AllotController.cs
+77
-0
performance/Performance.Api/Controllers/SecondAllotController.cs
+11
-2
performance/Performance.Api/wwwroot/Performance.Api.xml
+6
-0
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+172
-14
performance/Performance.DtoModels/Request/ReservedRequest.cs
+12
-0
performance/Performance.DtoModels/Response/ComputeResponse.cs
+2
-0
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
+2
-0
performance/Performance.EntityModels/Entity/per_employee.cs
+14
-14
performance/Performance.EntityModels/Entity/res_reserved.cs
+171
-0
performance/Performance.Repository/Repository/PerforresreservedRepository.cs
+20
-0
performance/Performance.Services/AllotCompute/ImportDataService.cs
+1
-1
performance/Performance.Services/AllotCompute/ResultComputeService.cs
+182
-3
performance/Performance.Services/AllotService.cs
+38
-0
performance/Performance.Services/ComputeService.cs
+2
-2
No files found.
performance/Performance.Api/Controllers/AllotController.cs
View file @
7a10fa1a
...
...
@@ -282,5 +282,82 @@ public ApiResponse UpdateAllotShowFormula([FromBody] AllotRequest request)
var
result
=
_allotService
.
UpdateAllotShowFormula
(
request
.
ID
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
/// <summary>
/// 获取
/// </summary>
/// <returns></returns>
[
Route
(
"reserved"
)]
[
HttpPost
]
public
ApiResponse
Reserved
([
FromBody
]
ReservedRequest
request
)
{
if
(
request
.
HospitalId
<
1
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"绩效信息无效"
);
var
userid
=
_claim
.
GetUserId
();
var
reserveds
=
_allotService
.
GetReserved
(
request
.
HospitalId
,
request
.
Year
,
userid
);
#
region
格式转换
var
result
=
reserveds
?.
Select
(
w
=>
new
{
w
.
HospitalId
,
w
.
Year
,
w
.
UnitType
,
w
.
AccountingUnit
,
w
.
EmployeeName
,
w
.
JobNumber
,
JanReseFee
=
w
.
JanFee
*
w
.
JanRatio
,
JanGiveFee
=
w
.
JanFee
*
(
1
-
w
.
JanRatio
),
FebReseFee
=
w
.
FebFee
*
w
.
FebRatio
,
FebGiveFee
=
w
.
FebFee
*
(
1
-
w
.
FebRatio
),
MarReseFee
=
w
.
MarFee
*
w
.
MarRatio
,
MarGiveFee
=
w
.
MarFee
*
(
1
-
w
.
MarRatio
),
AprReseFee
=
w
.
AprFee
*
w
.
AprRatio
,
AprGiveFee
=
w
.
AprFee
*
(
1
-
w
.
AprRatio
),
MayReseFee
=
w
.
MayFee
*
w
.
MayRatio
,
MayGiveFee
=
w
.
MayFee
*
(
1
-
w
.
MayRatio
),
JunReseFee
=
w
.
JunFee
*
w
.
JunRatio
,
JunGiveFee
=
w
.
JunFee
*
(
1
-
w
.
JunRatio
),
JulReseFee
=
w
.
JulFee
*
w
.
JulRatio
,
JulGiveFee
=
w
.
JulFee
*
(
1
-
w
.
JulRatio
),
AugReseFee
=
w
.
AugFee
*
w
.
AugRatio
,
AugGiveFee
=
w
.
AugFee
*
(
1
-
w
.
AugRatio
),
SepReseFee
=
w
.
SepFee
*
w
.
SepRatio
,
SepGiveFee
=
w
.
SepFee
*
(
1
-
w
.
SepRatio
),
OctReseFee
=
w
.
OctFee
*
w
.
OctRatio
,
OctGiveFee
=
w
.
OctFee
*
(
1
-
w
.
OctRatio
),
NovReseFee
=
w
.
NovFee
*
w
.
NovRatio
,
NovGiveFee
=
w
.
NovFee
*
(
1
-
w
.
NovRatio
),
DecReseFee
=
w
.
DecFee
*
w
.
DecRatio
,
DecGiveFee
=
w
.
DecFee
*
(
1
-
w
.
DecRatio
),
TotalReseFee
=
w
.
JanFee
*
w
.
JanRatio
+
w
.
FebFee
*
w
.
FebRatio
+
w
.
MarFee
*
w
.
MarRatio
+
w
.
AprFee
*
w
.
AprRatio
+
w
.
MayFee
*
w
.
MayRatio
+
w
.
JunFee
*
w
.
JunRatio
+
w
.
JulFee
*
w
.
JulRatio
+
w
.
AugFee
*
w
.
AugRatio
+
w
.
SepFee
*
w
.
SepRatio
+
w
.
OctFee
*
w
.
OctRatio
+
w
.
NovFee
*
w
.
NovRatio
+
w
.
DecFee
*
w
.
DecRatio
,
TotalGiveFee
=
w
.
JanFee
*
(
1
-
w
.
JanRatio
)
+
w
.
FebFee
*
(
1
-
w
.
FebRatio
)
+
w
.
MarFee
*
(
1
-
w
.
MarRatio
)
+
w
.
AprFee
*
(
1
-
w
.
AprRatio
)
+
w
.
MayFee
*
(
1
-
w
.
MayRatio
)
+
w
.
JunFee
*
(
1
-
w
.
JunRatio
)
+
w
.
JulFee
*
(
1
-
w
.
JulRatio
)
+
w
.
AugFee
*
(
1
-
w
.
AugRatio
)
+
w
.
SepFee
*
(
1
-
w
.
SepRatio
)
+
w
.
OctFee
*
(
1
-
w
.
OctRatio
)
+
w
.
NovFee
*
(
1
-
w
.
NovRatio
)
+
w
.
DecFee
*
(
1
-
w
.
DecRatio
),
});
#
endregion
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
}
}
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
7a10fa1a
...
...
@@ -4,6 +4,7 @@
using
Performance.DtoModels
;
using
Performance.EntityModels
;
using
Performance.Services
;
using
Performance.Services.AllotCompute
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
...
...
@@ -19,12 +20,16 @@ public class SecondAllotController : ControllerBase
{
private
readonly
ClaimService
claimService
;
private
readonly
SecondAllotService
secondAllotService
;
private
readonly
ResultComputeService
resultComputeService
;
public
SecondAllotController
(
ClaimService
claimService
,
SecondAllotService
secondAllotService
)
public
SecondAllotController
(
ClaimService
claimService
,
SecondAllotService
secondAllotService
,
ResultComputeService
resultComputeService
)
{
this
.
claimService
=
claimService
;
this
.
secondAllotService
=
secondAllotService
;
this
.
resultComputeService
=
resultComputeService
;
}
#
region
二次绩效列表、录入数据展示,保存数据
...
...
@@ -317,6 +322,10 @@ public ApiResponse AuditResult([FromBody] SecondAuditRequest request)
{
var
userid
=
claimService
.
GetUserId
();
var
result
=
secondAllotService
.
ConfirmAudit
(
userid
,
request
);
if
(
request
.
IsPass
==
1
)
{
resultComputeService
.
SaveSecondReserved
(
request
.
SecondId
);
}
return
result
?
new
ApiResponse
(
ResponseType
.
OK
,
"操作成功"
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"操作失败"
);
}
#
endregion
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
7a10fa1a
...
...
@@ -227,6 +227,12 @@
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.AllotController.Reserved(Performance.DtoModels.ReservedRequest)"
>
<summary>
获取
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.BudgetController.Query(Performance.DtoModels.Request.BudgetRequest)"
>
<summary>
预算管理查询(包含金额、占比)
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
7a10fa1a
...
...
@@ -208,6 +208,9 @@
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.res_compute"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.res_reserved"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.res_specialunit"
>
<summary>
</summary>
</member>
...
...
@@ -3389,6 +3392,16 @@
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_employee.HospitalId"
>
<summary>
医院Id
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_employee.AllotId"
>
<summary>
绩效Id
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_employee.AccountingUnit"
>
<summary>
核算单元
...
...
@@ -3464,24 +3477,14 @@
年龄
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_employee.Remark"
>
<summary>
备注
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_employee.HospitalId"
>
<summary>
医院Id
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_employee.AllotId"
>
<member
name=
"P:Performance.EntityModels.per_employee.ReservedRatio"
>
<summary>
绩效Id
预留比例
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_employee.Re
servedRatio
"
>
<member
name=
"P:Performance.EntityModels.per_employee.Re
mark
"
>
<summary>
预留比例
备注
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_employee.CreateTime"
>
...
...
@@ -4474,6 +4477,161 @@
效率绩效人数
</summary>
</member>
<member
name=
"T:Performance.EntityModels.res_reserved"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.Id"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.HospitalId"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.Year"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.AccountingUnit"
>
<summary>
核算单元
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.EmployeeName"
>
<summary>
人员姓名
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.JobNumber"
>
<summary>
工号
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.JanFee"
>
<summary>
一月
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.JanRatio"
>
<summary>
一月
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.FebFee"
>
<summary>
二月
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.FebRatio"
>
<summary>
二月
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.MarFee"
>
<summary>
三月
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.MarRatio"
>
<summary>
三月
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.AprFee"
>
<summary>
四月
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.AprRatio"
>
<summary>
四月
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.MayFee"
>
<summary>
五月
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.MayRatio"
>
<summary>
五月
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.JunFee"
>
<summary>
六月
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.JunRatio"
>
<summary>
六月
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.JulFee"
>
<summary>
七月
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.JulRatio"
>
<summary>
七月
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.AugFee"
>
<summary>
八月
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.AugRatio"
>
<summary>
八月
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.SepFee"
>
<summary>
九月
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.SepRatio"
>
<summary>
九月
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.OctFee"
>
<summary>
十月
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.OctRatio"
>
<summary>
十月
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.NovFee"
>
<summary>
十一月
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.NovRatio"
>
<summary>
十一月
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.DecFee"
>
<summary>
十二月
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_reserved.DecRatio"
>
<summary>
十二月
</summary>
</member>
<member
name=
"T:Performance.EntityModels.res_specialunit"
>
<summary>
...
...
performance/Performance.DtoModels/Request/ReservedRequest.cs
0 → 100644
View file @
7a10fa1a
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
ReservedRequest
{
public
int
HospitalId
{
get
;
set
;
}
public
int
Year
{
get
;
set
;
}
}
}
performance/Performance.DtoModels/Response/ComputeResponse.cs
View file @
7a10fa1a
...
...
@@ -11,6 +11,8 @@ public class ComputeResponse
/// </summary>
public
string
Source
{
get
;
set
;
}
public
string
UnitType
{
get
;
set
;
}
/// <summary>
/// 核算单元
/// </summary>
...
...
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
View file @
7a10fa1a
...
...
@@ -157,6 +157,8 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
/// <summary> </summary>
public
virtual
DbSet
<
res_compute
>
res_compute
{
get
;
set
;
}
/// <summary> </summary>
public
virtual
DbSet
<
res_reserved
>
res_reserved
{
get
;
set
;
}
/// <summary> </summary>
public
virtual
DbSet
<
res_specialunit
>
res_specialunit
{
get
;
set
;
}
/// <summary> 医院数据提取脚本 </summary>
public
virtual
DbSet
<
sys_extract
>
sys_extract
{
get
;
set
;
}
...
...
performance/Performance.EntityModels/Entity/per_employee.cs
View file @
7a10fa1a
...
...
@@ -22,6 +22,16 @@ public class per_employee
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 医院Id
/// </summary>
public
Nullable
<
int
>
HospitalId
{
get
;
set
;
}
/// <summary>
/// 绩效Id
/// </summary>
public
Nullable
<
int
>
AllotId
{
get
;
set
;
}
/// <summary>
/// 核算单元
/// </summary>
public
string
AccountingUnit
{
get
;
set
;
}
...
...
@@ -97,24 +107,14 @@ public class per_employee
public
Nullable
<
int
>
Age
{
get
;
set
;
}
/// <summary>
/// 备注
/// </summary>
public
string
Remark
{
get
;
set
;
}
/// <summary>
/// 医院Id
/// </summary>
public
Nullable
<
int
>
HospitalId
{
get
;
set
;
}
/// <summary>
/// 绩效Id
/// 预留比例
/// </summary>
public
Nullable
<
int
>
AllotId
{
get
;
set
;
}
public
Nullable
<
decimal
>
ReservedRatio
{
get
;
set
;
}
/// <summary>
///
预留比例
///
备注
/// </summary>
public
Nullable
<
decimal
>
ReservedRatio
{
get
;
set
;
}
public
string
Remark
{
get
;
set
;
}
/// <summary>
///
...
...
performance/Performance.EntityModels/Entity/res_reserved.cs
0 → 100644
View file @
7a10fa1a
//-----------------------------------------------------------------------
// <copyright file=" res_reserved.cs">
// * FileName: .cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels
{
/// <summary>
///
/// </summary>
[
Table
(
"res_reserved"
)]
public
class
res_reserved
{
/// <summary>
///
/// </summary>
[
Key
]
public
int
Id
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
HospitalId
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
Year
{
get
;
set
;
}
public
string
UnitType
{
get
;
set
;
}
/// <summary>
/// 核算单元
/// </summary>
public
string
AccountingUnit
{
get
;
set
;
}
/// <summary>
/// 人员姓名
/// </summary>
public
string
EmployeeName
{
get
;
set
;
}
/// <summary>
/// 工号
/// </summary>
public
string
JobNumber
{
get
;
set
;
}
/// <summary>
/// 一月
/// </summary>
public
Nullable
<
decimal
>
JanFee
{
get
;
set
;
}
/// <summary>
/// 一月
/// </summary>
public
Nullable
<
decimal
>
JanRatio
{
get
;
set
;
}
/// <summary>
/// 二月
/// </summary>
public
Nullable
<
decimal
>
FebFee
{
get
;
set
;
}
/// <summary>
/// 二月
/// </summary>
public
Nullable
<
decimal
>
FebRatio
{
get
;
set
;
}
/// <summary>
/// 三月
/// </summary>
public
Nullable
<
decimal
>
MarFee
{
get
;
set
;
}
/// <summary>
/// 三月
/// </summary>
public
Nullable
<
decimal
>
MarRatio
{
get
;
set
;
}
/// <summary>
/// 四月
/// </summary>
public
Nullable
<
decimal
>
AprFee
{
get
;
set
;
}
/// <summary>
/// 四月
/// </summary>
public
Nullable
<
decimal
>
AprRatio
{
get
;
set
;
}
/// <summary>
/// 五月
/// </summary>
public
Nullable
<
decimal
>
MayFee
{
get
;
set
;
}
/// <summary>
/// 五月
/// </summary>
public
Nullable
<
decimal
>
MayRatio
{
get
;
set
;
}
/// <summary>
/// 六月
/// </summary>
public
Nullable
<
decimal
>
JunFee
{
get
;
set
;
}
/// <summary>
/// 六月
/// </summary>
public
Nullable
<
decimal
>
JunRatio
{
get
;
set
;
}
/// <summary>
/// 七月
/// </summary>
public
Nullable
<
decimal
>
JulFee
{
get
;
set
;
}
/// <summary>
/// 七月
/// </summary>
public
Nullable
<
decimal
>
JulRatio
{
get
;
set
;
}
/// <summary>
/// 八月
/// </summary>
public
Nullable
<
decimal
>
AugFee
{
get
;
set
;
}
/// <summary>
/// 八月
/// </summary>
public
Nullable
<
decimal
>
AugRatio
{
get
;
set
;
}
/// <summary>
/// 九月
/// </summary>
public
Nullable
<
decimal
>
SepFee
{
get
;
set
;
}
/// <summary>
/// 九月
/// </summary>
public
Nullable
<
decimal
>
SepRatio
{
get
;
set
;
}
/// <summary>
/// 十月
/// </summary>
public
Nullable
<
decimal
>
OctFee
{
get
;
set
;
}
/// <summary>
/// 十月
/// </summary>
public
Nullable
<
decimal
>
OctRatio
{
get
;
set
;
}
/// <summary>
/// 十一月
/// </summary>
public
Nullable
<
decimal
>
NovFee
{
get
;
set
;
}
/// <summary>
/// 十一月
/// </summary>
public
Nullable
<
decimal
>
NovRatio
{
get
;
set
;
}
/// <summary>
/// 十二月
/// </summary>
public
Nullable
<
decimal
>
DecFee
{
get
;
set
;
}
/// <summary>
/// 十二月
/// </summary>
public
Nullable
<
decimal
>
DecRatio
{
get
;
set
;
}
}
}
performance/Performance.Repository/Repository/PerforresreservedRepository.cs
0 → 100644
View file @
7a10fa1a
//-----------------------------------------------------------------------
// <copyright file=" cof_guarantee.cs">
// * FileName: cof_guarantee.cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
Performance.EntityModels
;
namespace
Performance.Repository
{
/// <summary>
/// cof_guarantee Repository
/// </summary>
public
partial
class
PerforresreservedRepository
:
PerforRepository
<
res_reserved
>
{
public
PerforresreservedRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
{
}
}
}
performance/Performance.Services/AllotCompute/ImportDataService.cs
View file @
7a10fa1a
...
...
@@ -206,7 +206,7 @@ private void SaveClinicEmployee(PerSheet sheet, int allotId)
var
imdata
=
Mapper
.
Map
<
im_employee_clinic
>(
data
);
imdata
.
SheetID
=
imsheet
.
ID
;
imdata
.
AllotID
=
allotId
;
//
imdata.OtherPerfor = data.OthePerfor;
imdata
.
OtherPerfor
=
data
.
OthePerfor
;
addList
.
Add
(
imdata
);
}
perforImemployeeclinicRepository
.
AddRange
(
addList
.
ToArray
());
...
...
performance/Performance.Services/AllotCompute/ResultComputeService.cs
View file @
7a10fa1a
...
...
@@ -18,6 +18,11 @@ public class ResultComputeService : IAutoInjection
private
readonly
BaiscNormService
baiscNormService
;
private
readonly
ComputeDirector
computeDirector
;
private
readonly
BudgetService
budgetService
;
private
readonly
PerforPeremployeeRepository
perforPeremployeeRepository
;
private
readonly
PerforPerallotRepository
perforPerallotRepository
;
private
readonly
PerforAgcomputeRepository
perforAgcomputeRepository
;
private
readonly
PerforAgsecondallotRepository
perforAgsecondallotRepository
;
private
readonly
PerforresreservedRepository
perforresreservedRepository
;
private
readonly
PerforImemployeeRepository
perforImEmployeeRepository
;
private
readonly
PerforRescomputeRepository
perforRescomputeRepository
;
private
readonly
PerforResbaiscnormRepository
perforResbaiscnormRepository
;
...
...
@@ -35,6 +40,11 @@ public class ResultComputeService : IAutoInjection
PerforImaccountbasicRepository
perforImaccountbasicRepository
,
BaiscNormService
baiscNormService
,
ComputeDirector
computeDirector
,
LogManageService
logManageService
,
BudgetService
budgetService
,
PerforPeremployeeRepository
perforPeremployeeRepository
,
PerforPerallotRepository
perforPerallotRepository
,
PerforAgcomputeRepository
perforAgcomputeRepository
,
PerforAgsecondallotRepository
perforAgsecondallotRepository
,
PerforresreservedRepository
perforresreservedRepository
,
PerforImemployeeclinicRepository
perforImemployeeclinicRepository
,
PerforImemployeelogisticsRepository
perforImemployeelogisticsRepository
)
{
...
...
@@ -47,6 +57,11 @@ public class ResultComputeService : IAutoInjection
this
.
perforImaccountbasicRepository
=
perforImaccountbasicRepository
;
this
.
logManageService
=
logManageService
;
this
.
budgetService
=
budgetService
;
this
.
perforPeremployeeRepository
=
perforPeremployeeRepository
;
this
.
perforPerallotRepository
=
perforPerallotRepository
;
this
.
perforAgcomputeRepository
=
perforAgcomputeRepository
;
this
.
perforAgsecondallotRepository
=
perforAgsecondallotRepository
;
this
.
perforresreservedRepository
=
perforresreservedRepository
;
this
.
perforImemployeeclinicRepository
=
perforImemployeeclinicRepository
;
this
.
perforImemployeelogisticsRepository
=
perforImemployeelogisticsRepository
;
}
...
...
@@ -151,9 +166,9 @@ public class ResultComputeService : IAutoInjection
foreach
(
var
item
in
accountDataList
)
{
//科室奖罚汇总结果
var
extra
=
accountExtras
?.
FirstOrDefault
(
w
=>
w
.
UnitType
==
UnitType
.
特殊核算组
.
ToString
()
&&
w
.
AccountingUnit
==
dept
.
AccountingUnit
)?.
TotelValue
;
var
drugExtra
=
drugExtras
?.
FirstOrDefault
(
w
=>
w
.
UnitType
==
UnitType
.
特殊核算组
.
ToString
()
&&
w
.
AccountingUnit
==
dept
.
AccountingUnit
)?.
TotelValue
;
var
materialsExtra
=
materialsExtras
?.
FirstOrDefault
(
w
=>
w
.
UnitType
==
UnitType
.
特殊核算组
.
ToString
()
&&
w
.
AccountingUnit
==
dept
.
AccountingUnit
)?.
TotelValue
;
var
extra
=
accountExtras
?.
FirstOrDefault
(
w
=>
w
.
UnitType
==
UnitType
.
特殊核算组
.
ToString
()
&&
w
.
AccountingUnit
==
dept
?
.
AccountingUnit
)?.
TotelValue
;
var
drugExtra
=
drugExtras
?.
FirstOrDefault
(
w
=>
w
.
UnitType
==
UnitType
.
特殊核算组
.
ToString
()
&&
w
.
AccountingUnit
==
dept
?
.
AccountingUnit
)?.
TotelValue
;
var
materialsExtra
=
materialsExtras
?.
FirstOrDefault
(
w
=>
w
.
UnitType
==
UnitType
.
特殊核算组
.
ToString
()
&&
w
.
AccountingUnit
==
dept
?
.
AccountingUnit
)?.
TotelValue
;
var
res
=
new
res_specialunit
{
...
...
@@ -274,5 +289,169 @@ private IEnumerable<PerDataSpecialUnit> CalculateSpecialUnit(PerSheet specialUni
}
return
dataList
;
}
#
region
预留金额
/// <summary>
/// 二次绩效审核通过后修改绩效预留金额
/// </summary>
/// <param name="secondId"></param>
public
void
SaveSecondReserved
(
int
secondId
)
{
var
second
=
perforAgsecondallotRepository
.
GetEntity
(
t
=>
t
.
Id
==
secondId
);
if
(
second
==
null
)
throw
new
PerformanceException
(
"参数信息无效"
);
var
allot
=
perforPerallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
second
.
AllotId
);
if
(
allot
==
null
)
throw
new
PerformanceException
(
"参数信息无效"
);
var
again
=
perforAgcomputeRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allot
.
ID
);
if
(
again
!=
null
&&
again
.
Any
())
{
var
empDic
=
perforPeremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
allot
.
ID
);
var
group
=
again
.
GroupBy
(
t
=>
new
{
t
.
Department
,
t
.
JobNumber
,
t
.
PersonName
})
.
Select
(
t
=>
new
ComputeResponse
{
UnitType
=
second
.
UnitType
,
AccountingUnit
=
t
.
Key
.
Department
,
JobNumber
=
t
.
Key
.
JobNumber
,
EmployeeName
=
t
.
Key
.
PersonName
,
RealGiveFee
=
t
.
Sum
(
g
=>
g
.
RealGiveFee
)
});
AddOrUpdate
(
allot
,
empDic
,
group
);
}
}
/// <summary>
/// 绩效生成完成后修改绩效预留金额
/// </summary>
/// <param name="allot"></param>
public
void
SaveReserved
(
per_allot
allot
)
{
var
mTypes
=
new
[]
{
AccountUnitType
.
护士长
.
ToString
(),
AccountUnitType
.
科主任
.
ToString
(),
AccountUnitType
.
行政中层
.
ToString
(),
AccountUnitType
.
行政高层
.
ToString
()
};
var
resComputes
=
perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
&&
mTypes
.
Contains
(
t
.
AccountType
))?.
OrderByDescending
(
t
=>
t
.
AccountingUnit
);
if
(
resComputes
!=
null
&&
resComputes
.
Any
())
{
var
empDic
=
perforPeremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
allot
.
ID
);
var
group
=
resComputes
.
GroupBy
(
t
=>
new
{
t
.
UnitType
,
t
.
AccountingUnit
,
t
.
EmployeeName
,
t
.
JobNumber
})
.
Select
(
t
=>
new
ComputeResponse
{
UnitType
=
t
.
Key
.
UnitType
,
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
EmployeeName
=
t
.
Key
.
EmployeeName
,
JobNumber
=
t
.
Key
.
JobNumber
,
RealGiveFee
=
t
.
Sum
(
g
=>
g
.
RealGiveFee
)
});
AddOrUpdate
(
allot
,
empDic
,
group
);
}
}
private
void
AddOrUpdate
(
per_allot
allot
,
List
<
per_employee
>
empDic
,
IEnumerable
<
ComputeResponse
>
group
)
{
var
reserveds
=
perforresreservedRepository
.
GetEntities
(
w
=>
w
.
HospitalId
==
allot
.
HospitalId
&&
w
.
Year
==
allot
.
Year
);
List
<
res_reserved
>
updates
=
new
List
<
res_reserved
>(),
inserts
=
new
List
<
res_reserved
>();
foreach
(
var
item
in
group
)
{
var
ratio
=
empDic
?.
FirstOrDefault
(
w
=>
w
.
DoctorName
==
item
.
EmployeeName
&&
w
.
PersonnelNumber
==
item
.
JobNumber
)?.
ReservedRatio
??
0
;
var
reserved
=
reserveds
?.
FirstOrDefault
(
w
=>
w
.
AccountingUnit
==
item
.
AccountingUnit
&&
w
.
JobNumber
==
item
.
JobNumber
&&
w
.
EmployeeName
==
item
.
EmployeeName
);
if
(
reserved
==
null
)
{
reserved
=
new
res_reserved
{
UnitType
=
item
.
UnitType
,
HospitalId
=
allot
.
HospitalId
,
Year
=
allot
.
Year
,
AccountingUnit
=
item
.
AccountingUnit
,
JobNumber
=
item
.
JobNumber
,
EmployeeName
=
item
.
EmployeeName
,
};
inserts
.
Add
(
reserved
);
}
else
updates
.
Add
(
reserved
);
ChangeRealGiveFee
(
reserved
,
allot
,
item
.
RealGiveFee
??
0
,
ratio
);
}
perforresreservedRepository
.
AddRange
(
inserts
.
ToArray
());
perforresreservedRepository
.
UpdateRange
(
updates
.
ToArray
());
}
/// <summary>
/// 修改绩效金额
/// </summary>
/// <param name="reserved"></param>
/// <param name="allot"></param>
/// <param name="realGiveFee"></param>
/// <param name="ratio"></param>
private
void
ChangeRealGiveFee
(
res_reserved
reserved
,
per_allot
allot
,
decimal
realGiveFee
,
decimal
ratio
)
{
if
(
allot
.
Month
==
1
)
{
reserved
.
JanFee
=
realGiveFee
;
reserved
.
JanRatio
=
ratio
;
}
else
if
(
allot
.
Month
==
2
)
{
reserved
.
FebFee
=
realGiveFee
;
reserved
.
FebRatio
=
ratio
;
}
else
if
(
allot
.
Month
==
3
)
{
reserved
.
MarFee
=
realGiveFee
;
reserved
.
MarRatio
=
ratio
;
}
else
if
(
allot
.
Month
==
4
)
{
reserved
.
AprFee
=
realGiveFee
;
reserved
.
AprRatio
=
ratio
;
}
else
if
(
allot
.
Month
==
5
)
{
reserved
.
MayFee
=
realGiveFee
;
reserved
.
MayRatio
=
ratio
;
}
else
if
(
allot
.
Month
==
6
)
{
reserved
.
JunFee
=
realGiveFee
;
reserved
.
JunRatio
=
ratio
;
}
else
if
(
allot
.
Month
==
7
)
{
reserved
.
JulFee
=
realGiveFee
;
reserved
.
JulRatio
=
ratio
;
}
else
if
(
allot
.
Month
==
8
)
{
reserved
.
AugFee
=
realGiveFee
;
reserved
.
AugRatio
=
ratio
;
}
else
if
(
allot
.
Month
==
9
)
{
reserved
.
SepFee
=
realGiveFee
;
reserved
.
SepRatio
=
ratio
;
}
else
if
(
allot
.
Month
==
10
)
{
reserved
.
OctFee
=
realGiveFee
;
reserved
.
OctRatio
=
ratio
;
}
else
if
(
allot
.
Month
==
11
)
{
reserved
.
NovFee
=
realGiveFee
;
reserved
.
NovRatio
=
ratio
;
}
else
if
(
allot
.
Month
==
12
)
{
reserved
.
DecFee
=
realGiveFee
;
reserved
.
DecRatio
=
ratio
;
}
}
#
endregion
}
}
performance/Performance.Services/AllotService.cs
View file @
7a10fa1a
...
...
@@ -25,6 +25,7 @@ public class AllotService : IAutoInjection
private
ProcessComputService
processComputService
;
private
ResultComputeService
resultComputeService
;
private
PerforLogdbugRepository
logdbug
;
private
readonly
PerforresreservedRepository
perforresreservedRepository
;
private
ConfigService
configService
;
private
IHostingEnvironment
_evn
;
private
ILogger
<
AllotService
>
_logger
;
...
...
@@ -36,6 +37,8 @@ public class AllotService : IAutoInjection
private
readonly
PerforHospitalRepository
perforHospitalRepository
;
private
readonly
PerforResbaiscnormRepository
perforResbaiscnormRepository
;
private
PerforHospitalconfigRepository
perforHospitalconfigRepository
;
private
readonly
RoleService
roleService
;
private
readonly
UserService
userService
;
private
PerforCofdirectorRepository
perforCofdirectorRepository
;
//private readonly IHubContext<AllotLogHub> hubContext;
...
...
@@ -51,6 +54,7 @@ public class AllotService : IAutoInjection
ResultComputeService
resultComputeService
,
ConfigService
configService
,
PerforLogdbugRepository
logdbug
,
PerforresreservedRepository
perforresreservedRepository
,
IHostingEnvironment
evn
,
ILogger
<
AllotService
>
logger
,
IEmailService
emailService
,
IOptions
<
Application
>
options
,
...
...
@@ -60,6 +64,8 @@ public class AllotService : IAutoInjection
PerforResbaiscnormRepository
perforResbaiscnormRepository
,
PerforHospitalconfigRepository
perforHospitalconfigRepository
,
//IHubContext<AllotLogHub> hubContext
RoleService
roleService
,
UserService
userService
,
LogManageService
logManageService
,
ReportService
reportService
,
PerforCofdirectorRepository
perforCofdirectorRepository
,
...
...
@@ -78,10 +84,13 @@ public class AllotService : IAutoInjection
this
.
options
=
options
;
this
.
configService
=
configService
;
this
.
logdbug
=
logdbug
;
this
.
perforresreservedRepository
=
perforresreservedRepository
;
this
.
perforLogcheckRepository
=
perforLogcheckRepository
;
this
.
perforHospitalRepository
=
perforHospitalRepository
;
this
.
perforResbaiscnormRepository
=
perforResbaiscnormRepository
;
this
.
perforHospitalconfigRepository
=
perforHospitalconfigRepository
;
this
.
roleService
=
roleService
;
this
.
userService
=
userService
;
//this.hubContext = hubContext;
this
.
logManageService
=
logManageService
;
this
.
reportService
=
reportService
;
...
...
@@ -387,6 +396,10 @@ public void Generate(per_allot allot, string mail)
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"保存绩效人均参考标准"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
perforResbaiscnormRepository
.
AddRange
(
baiscnormList
.
ToArray
());
// 保存预留绩效
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"保存预留绩效金额"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
resultComputeService
.
SaveReserved
(
allot
);
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
GenerateAccomplish
,
EnumHelper
.
GetDescription
(
AllotStates
.
GenerateAccomplish
),
generate
);
perforCofdirectorRepository
.
SupplementaryData
(
allot
.
ID
);
...
...
@@ -511,5 +524,30 @@ public List<log_dbug> AllotLog(per_allot allot, int type)
list
=
list
.
OrderBy
(
t
=>
t
.
CreateTime
).
ToList
();
return
list
;
}
public
List
<
res_reserved
>
GetReserved
(
int
hospitalId
,
int
year
,
int
userid
)
{
var
user
=
userService
.
GetUser
(
userid
);
if
(
user
==
null
)
throw
new
PerformanceException
(
"用户信息错误"
);
var
role
=
roleService
.
GetUserRole
(
userid
)?.
FirstOrDefault
()?.
Type
;
if
(!
role
.
HasValue
)
throw
new
PerformanceException
(
"用户信息错误"
);
var
roleTypes
=
new
[]
{
options
.
Value
.
NurseRole
,
options
.
Value
.
DirectorRole
,
options
.
Value
.
SpecialRole
};
var
reserveds
=
perforresreservedRepository
.
GetEntities
(
w
=>
w
.
HospitalId
==
hospitalId
&&
w
.
Year
==
year
);
if
(
role
.
Value
==
options
.
Value
.
NurseRole
)
reserveds
=
reserveds
.
Where
(
w
=>
w
.
UnitType
.
Contains
(
UnitType
.
护理组
.
ToString
())
&&
w
.
AccountingUnit
==
user
.
Department
)?.
ToList
();
else
if
(
role
.
Value
==
options
.
Value
.
DirectorRole
)
reserveds
=
reserveds
.
Where
(
w
=>
(
w
.
UnitType
.
Contains
(
UnitType
.
医生组
.
ToString
())
||
w
.
UnitType
.
Contains
(
UnitType
.
医技组
.
ToString
()))
&&
w
.
AccountingUnit
==
user
.
Department
)?.
ToList
();
else
if
(
role
.
Value
==
options
.
Value
.
SpecialRole
)
reserveds
=
reserveds
.
Where
(
w
=>
w
.
UnitType
.
Contains
(
UnitType
.
特殊核算组
.
ToString
())
&&
w
.
AccountingUnit
==
user
.
Department
)?.
ToList
();
return
reserveds
;
}
}
}
performance/Performance.Services/ComputeService.cs
View file @
7a10fa1a
...
...
@@ -456,7 +456,7 @@ public List<ComputeResponse> AllCompute(int allotId)
foreach
(
var
item
in
result
)
{
var
temp
=
item
.
RealGiveFee
??
0
;
item
.
ReservedRatio
=
empDic
.
FirstOrDefault
(
w
=>
w
.
DoctorName
==
item
.
EmployeeName
&&
w
.
PersonnelNumber
==
item
.
JobNumber
)?.
ReservedRatio
??
0
;
item
.
ReservedRatio
=
empDic
?
.
FirstOrDefault
(
w
=>
w
.
DoctorName
==
item
.
EmployeeName
&&
w
.
PersonnelNumber
==
item
.
JobNumber
)?.
ReservedRatio
??
0
;
item
.
ReservedRatioFee
=
temp
*
item
.
ReservedRatio
;
item
.
RealGiveFee
=
temp
-
item
.
ReservedRatioFee
;
}
...
...
@@ -519,7 +519,7 @@ public List<ComputeResponse> AllManageCompute(int allotId)
foreach
(
var
item
in
result
)
{
var
temp
=
item
.
RealGiveFee
??
0
;
item
.
ReservedRatio
=
empDic
.
FirstOrDefault
(
w
=>
w
.
DoctorName
==
item
.
EmployeeName
&&
w
.
PersonnelNumber
==
item
.
JobNumber
)?.
ReservedRatio
??
0
;
item
.
ReservedRatio
=
empDic
?
.
FirstOrDefault
(
w
=>
w
.
DoctorName
==
item
.
EmployeeName
&&
w
.
PersonnelNumber
==
item
.
JobNumber
)?.
ReservedRatio
??
0
;
item
.
ReservedRatioFee
=
temp
*
item
.
ReservedRatio
;
item
.
RealGiveFee
=
temp
-
item
.
ReservedRatioFee
;
}
...
...
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