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
08772e62
Commit
08772e62
authored
Sep 08, 2020
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次绩效BUG修复
parent
3421cb68
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
96 additions
and
26 deletions
+96
-26
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+17
-2
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+5
-0
performance/Performance.DtoModels/PerExcel/PerDataClinicEmployee.cs
+5
-0
performance/Performance.DtoModels/Response/ComputeResponse.cs
+13
-5
performance/Performance.EntityModels/Entity/ag_compute.cs
+5
-0
performance/Performance.Services/ComputeService.cs
+39
-15
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
+4
-1
performance/Performance.Services/PerExcelService/ExcelReadConfig.cs
+1
-0
performance/Performance.Services/SecondAllotService.cs
+7
-3
No files found.
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
08772e62
...
...
@@ -907,6 +907,11 @@
职务分类
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataClinicEmployee.FitPeopleValue"
>
<summary>
实际人均绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataClinicEmployee.Basics"
>
<summary>
基础绩效系数
...
...
@@ -2358,7 +2363,17 @@
</member>
<member
name=
"P:Performance.DtoModels.ComputeResponse.PerforSumFee"
>
<summary>
绩效合计
业绩绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.ComputeResponse.PerforManagementFee"
>
<summary>
管理绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.ComputeResponse.ShouldGiveFee"
>
<summary>
应发小计
</summary>
</member>
<member
name=
"P:Performance.DtoModels.ComputeResponse.OthePerfor"
>
...
...
@@ -2368,7 +2383,7 @@
</member>
<member
name=
"P:Performance.DtoModels.ComputeResponse.NightWorkPerfor"
>
<summary>
实发绩效工资金额
夜班费
</summary>
</member>
<member
name=
"P:Performance.DtoModels.ComputeResponse.RealGiveFee"
>
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
08772e62
...
...
@@ -362,6 +362,11 @@
人员名称
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_compute.PerforSumFee"
>
<summary>
可分配绩效
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_compute.OthePerfor"
>
<summary>
医院其他绩效
...
...
performance/Performance.DtoModels/PerExcel/PerDataClinicEmployee.cs
View file @
08772e62
...
...
@@ -37,6 +37,11 @@ public class PerDataClinicEmployee : IPerData
public
string
JobTitle
{
get
;
set
;
}
/// <summary>
/// 实际人均绩效
/// </summary>
public
Nullable
<
decimal
>
FitPeopleValue
{
get
;
set
;
}
/// <summary>
/// 基础绩效系数
/// </summary>
public
Nullable
<
decimal
>
Basics
{
get
;
set
;
}
...
...
performance/Performance.DtoModels/Response/ComputeResponse.cs
View file @
08772e62
...
...
@@ -8,15 +8,13 @@ public class ComputeResponse
{
public
ComputeResponse
()
{
}
public
ComputeResponse
(
string
source
,
string
accountingUnit
,
string
employeeName
,
string
jobNumber
,
string
jobTitle
,
decimal
?
perforSumFee
)
public
ComputeResponse
(
string
source
,
string
accountingUnit
,
string
employeeName
,
string
jobNumber
,
string
jobTitle
)
{
Source
=
source
;
AccountingUnit
=
accountingUnit
;
EmployeeName
=
employeeName
;
JobNumber
=
jobNumber
;
JobTitle
=
jobTitle
;
PerforSumFee
=
perforSumFee
;
}
/// <summary>
...
...
@@ -47,17 +45,27 @@ public class ComputeResponse
public
string
JobTitle
{
get
;
set
;
}
/// <summary>
///
绩效合计
///
业绩绩效
/// </summary>
public
Nullable
<
decimal
>
PerforSumFee
{
get
;
set
;
}
/// <summary>
/// 管理绩效
/// </summary>
public
Nullable
<
decimal
>
PerforManagementFee
{
get
;
set
;
}
/// <summary>
/// 应发小计
/// </summary>
public
Nullable
<
decimal
>
ShouldGiveFee
{
get
;
set
;
}
/// <summary>
/// 医院其他绩效
/// </summary>
public
Nullable
<
decimal
>
OthePerfor
{
get
;
set
;
}
/// <summary>
///
实发绩效工资金额
///
夜班费
/// </summary>
public
Nullable
<
decimal
>
NightWorkPerfor
{
get
;
set
;
}
...
...
performance/Performance.EntityModels/Entity/ag_compute.cs
View file @
08772e62
...
...
@@ -52,6 +52,11 @@ public class ag_compute
public
string
PersonName
{
get
;
set
;
}
/// <summary>
/// 可分配绩效
/// </summary>
public
Nullable
<
decimal
>
PerforSumFee
{
get
;
set
;
}
/// <summary>
/// 医院其他绩效
/// </summary>
public
Nullable
<
decimal
>
OthePerfor
{
get
;
set
;
}
...
...
performance/Performance.Services/ComputeService.cs
View file @
08772e62
...
...
@@ -422,22 +422,13 @@ public DeptDetailResponse GetDepartmentDetail(int allotId, int accountId, int ty
/// <returns></returns>
public
List
<
ComputeResponse
>
AllCompute
(
int
allotId
,
int
isShowManage
)
{
var
list
=
new
List
<
ComputeResponse
>();
var
mTypes
=
new
[]
{
AccountUnitType
.
护士长
.
ToString
(),
AccountUnitType
.
科主任
.
ToString
(),
AccountUnitType
.
行政中层
.
ToString
(),
AccountUnitType
.
行政高层
.
ToString
()
};
var
types
=
new
List
<
string
>
{
AccountUnitType
.
护士长
.
ToString
(),
AccountUnitType
.
科主任
.
ToString
()
};
// 一次绩效 获取特定人员绩效结果
var
allot
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
mTypes
.
Contains
(
t
.
AccountType
))?.
OrderByDescending
(
t
=>
t
.
AccountingUnit
);
list
=
allot
?.
Select
(
t
=>
{
// 仅显示管理绩效
var
fee
=
isShowManage
==
1
&&
types
.
Contains
(
t
.
AccountType
)
?
t
.
ShouldGiveFee
:
t
.
RealGiveFee
;
return
new
ComputeResponse
(
"一次绩效"
,
t
.
AccountingUnit
,
t
.
EmployeeName
,
t
.
JobNumber
,
t
.
JobTitle
,
fee
);
}).
ToList
();
// 获取一次次绩效结果
var
list
=
GetAllotPerformance
(
allotId
,
isShowManage
);
// 获取二次绩效结果
var
seconds
=
GetSecondPerformance
(
allotId
);
if
(
seconds
!=
null
)
list
?.
AddRange
(
seconds
);
// 补充医院其他绩效
var
result
=
AddAprAmount
(
allotId
,
list
);
...
...
@@ -447,10 +438,12 @@ public List<ComputeResponse> AllCompute(int allotId, int isShowManage)
var
empDic
=
perforPeremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
allotId
);
foreach
(
var
item
in
result
)
{
var
temp
=
item
.
PerforSumFee
??
0
;
var
temp
=
item
.
PerforSumFee
??
0
+
item
.
PerforManagementFee
??
0
;
item
.
ShouldGiveFee
=
item
.
PerforSumFee
??
0
+
item
.
PerforManagementFee
??
0
+
item
.
OthePerfor
??
0
+
item
.
NightWorkPerfor
??
0
;
item
.
ReservedRatio
=
empDic
?.
FirstOrDefault
(
w
=>
w
.
DoctorName
==
item
.
EmployeeName
&&
w
.
PersonnelNumber
==
item
.
JobNumber
)?.
ReservedRatio
??
0
;
item
.
ReservedRatioFee
=
temp
*
item
.
ReservedRatio
;
item
.
RealGiveFee
=
temp
*
(
1
-
item
.
ReservedRatio
)
+
(
item
.
OthePerfor
??
0
)
+
(
item
.
NightWorkPerfor
??
0
);
item
.
RealGiveFee
=
item
.
ShouldGiveFee
-
(
item
.
ReservedRatioFee
??
0
);
}
}
...
...
@@ -458,6 +451,36 @@ public List<ComputeResponse> AllCompute(int allotId, int isShowManage)
}
/// <summary>
/// 获取一次次绩效结果
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
private
List
<
ComputeResponse
>
GetAllotPerformance
(
int
allotId
,
int
isShowManage
)
{
var
mTypes
=
new
[]
{
AccountUnitType
.
护士长
.
ToString
(),
AccountUnitType
.
科主任
.
ToString
(),
AccountUnitType
.
行政中层
.
ToString
(),
AccountUnitType
.
行政高层
.
ToString
()
};
var
types
=
new
List
<
string
>
{
AccountUnitType
.
护士长
.
ToString
(),
AccountUnitType
.
科主任
.
ToString
()
};
// 一次绩效 获取特定人员绩效结果
var
allot
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
mTypes
.
Contains
(
t
.
AccountType
))?.
OrderByDescending
(
t
=>
t
.
AccountingUnit
);
return
allot
?.
Select
(
t
=>
{
var
comp
=
new
ComputeResponse
(
"一次绩效"
,
t
.
AccountingUnit
,
t
.
EmployeeName
,
t
.
JobNumber
,
t
.
JobTitle
);
// 仅显示管理绩效
if
(
isShowManage
==
1
&&
types
.
Contains
(
t
.
AccountType
))
{
comp
.
PerforManagementFee
=
(
t
.
ShouldGiveFee
??
0
)
+
(
t
.
OtherPerfor
??
0
)
+
(
t
.
Punishment
??
0
);
comp
.
PerforSumFee
=
0
;
}
else
{
comp
.
PerforManagementFee
=
t
.
RealGiveFee
;
comp
.
PerforSumFee
=
t
.
Avg
;
}
return
comp
;
}).
ToList
();
}
/// <summary>
/// 获取二次绩效结果
/// </summary>
/// <param name="allotId"></param>
...
...
@@ -471,7 +494,8 @@ private List<ComputeResponse> GetSecondPerformance(int allotId)
.
GroupBy
(
t
=>
new
{
t
.
Department
,
t
.
WorkPost
,
t
.
JobNumber
,
t
.
PersonName
})
.
Select
(
t
=>
{
var
comp
=
new
ComputeResponse
(
"二次绩效"
,
t
.
Key
.
Department
,
t
.
Key
.
PersonName
,
t
.
Key
.
JobNumber
,
t
.
Key
.
WorkPost
,
t
.
Sum
(
g
=>
g
.
RealGiveFee
));
var
comp
=
new
ComputeResponse
(
"二次绩效"
,
t
.
Key
.
Department
,
t
.
Key
.
PersonName
,
t
.
Key
.
JobNumber
,
t
.
Key
.
WorkPost
);
comp
.
PerforSumFee
=
t
.
Sum
(
g
=>
g
.
PerforSumFee
);
comp
.
NightWorkPerfor
=
t
.
Sum
(
g
=>
g
.
NightWorkPerfor
);
return
comp
;
});
...
...
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
View file @
08772e62
...
...
@@ -358,7 +358,10 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<PerS
var
basicRule
=
basicRuleList
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
(
UnitType
)
resAccount
.
UnitType
);
if
(
basicRule
==
null
)
continue
;
var
avg
=
(
resAccount
.
ManagerNumber
+
resAccount
.
Number
)
==
0
?
0
:
resAccount
.
PerforTotal
/
(
resAccount
.
ManagerNumber
+
resAccount
.
Number
);
// 优先取 实际人均绩效
var
avg
=
(
empolyee
.
FitPeopleValue
.
HasValue
&&
empolyee
.
FitPeopleValue
>
0
)
?
empolyee
.
FitPeopleValue
:
(
resAccount
.
ManagerNumber
+
resAccount
.
Number
)
==
0
?
0
:
resAccount
.
PerforTotal
/
(
resAccount
.
ManagerNumber
+
resAccount
.
Number
);
var
effAvg
=
empolyee
.
PermanentStaff
==
0
?
0
:
resAccount
.
PerforTotal
/
empolyee
.
PermanentStaff
;
//var efficiency = avg * (empolyee.Efficiency ?? 1);
...
...
performance/Performance.Services/PerExcelService/ExcelReadConfig.cs
View file @
08772e62
...
...
@@ -34,6 +34,7 @@ public class ExcelReadConfig
new
ColumnInfo
(
nameof
(
PerDataClinicEmployee
.
DoctorName
),
"医生姓名"
),
new
ColumnInfo
(
nameof
(
PerDataClinicEmployee
.
JobTitle
),
"职务分类"
),
new
ColumnInfo
(
nameof
(
PerDataClinicEmployee
.
Basics
),
"基础绩效系数"
,
true
),
new
ColumnInfo
(
nameof
(
PerDataClinicEmployee
.
FitPeopleValue
),
"实际人均绩效"
,
true
),
new
ColumnInfo
(
nameof
(
PerDataClinicEmployee
.
PermanentStaff
),
"效率绩效人数"
,
true
),
new
ColumnInfo
(
nameof
(
PerDataClinicEmployee
.
Efficiency
),
"效率绩效系数"
,
true
),
new
ColumnInfo
(
nameof
(
PerDataClinicEmployee
.
Scale
),
"规模绩效系数"
,
true
),
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
08772e62
...
...
@@ -376,13 +376,13 @@ private List<BodyItem> GetEmployees(int allotId, int userId, List<HeadItem> head
if
(
employees
==
null
||
!
employees
.
Any
())
return
list
;
if
(!
string
.
IsNullOrEmpty
(
empName
))
employees
=
employees
?.
Where
(
w
=>
w
.
DoctorName
==
empName
).
ToList
();
employees
=
employees
?.
Where
(
w
=>
w
.
DoctorName
.
Trim
()
==
empName
.
Trim
()
).
ToList
();
if
(!
string
.
IsNullOrEmpty
(
jobNumber
))
employees
=
employees
?.
Where
(
w
=>
w
.
PersonnelNumber
==
jobNumber
).
ToList
();
employees
=
employees
?.
Where
(
w
=>
w
.
PersonnelNumber
.
Trim
()
==
jobNumber
.
Trim
()
).
ToList
();
var
perapramounts
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
);
Func
<
per_employee
,
decimal
?>
getAprAmount
=
(
t
)
=>
perapramounts
?.
Where
(
w
=>
w
.
DoctorName
==
t
.
DoctorName
&&
w
.
PersonnelNumber
==
t
.
PersonnelNumber
)
?.
Where
(
w
=>
w
.
DoctorName
.
Trim
()
==
t
.
DoctorName
.
Trim
()
&&
w
.
PersonnelNumber
.
Trim
()
==
t
.
PersonnelNumber
.
Trim
()
)
?.
Sum
(
w
=>
w
.
Amount
);
Dictionary
<(
string
,
string
),
Func
<
per_employee
,
object
>>
dict
=
new
Dictionary
<(
string
,
string
),
Func
<
per_employee
,
object
>>
...
...
@@ -1231,6 +1231,7 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request)
JobNumber
=
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"人员工号"
)?.
ItemValue
,
WorkPost
=
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"岗位"
)?.
ItemValue
,
PersonName
=
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"姓名"
)?.
ItemValue
,
PerforSumFee
=
ConvertHelper
.
TryDecimal
(
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"可分配绩效"
)?.
ItemValue
,
0
),
OthePerfor
=
ConvertHelper
.
TryDecimal
(
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"医院其他绩效"
)?.
ItemValue
,
0
),
NightWorkPerfor
=
ConvertHelper
.
TryDecimal
(
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"夜班工作量绩效"
)?.
ItemValue
,
0
),
RealGiveFee
=
ConvertHelper
.
TryDecimal
(
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"实发绩效工资金额"
)?.
ItemValue
,
0
),
...
...
@@ -1254,6 +1255,9 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request)
WorkPost
=
item
.
WorkPost
,
JobNumber
=
item
.
WorkNumber
,
PersonName
=
item
.
Name
,
PerforSumFee
=
item
.
DistPerformance
,
OthePerfor
=
item
.
OtherPerformance
,
NightWorkPerfor
=
item
.
NightWorkPerformance
,
RealGiveFee
=
item
.
RealAmount
,
});
}
...
...
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