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
e75d6840
Commit
e75d6840
authored
Mar 03, 2020
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
东方医院11月核对修改完结
parent
6f9c6770
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
299 additions
and
149 deletions
+299
-149
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+15
-0
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+20
-0
performance/Performance.DtoModels/PerExcel/ComputeResult.cs
+2
-0
performance/Performance.DtoModels/PerExcel/PerDataAccountBaisc.cs
+5
-0
performance/Performance.EntityModels/Entity/im_accountbasic.cs
+6
-1
performance/Performance.EntityModels/Entity/res_account.cs
+5
-0
performance/Performance.Services/AllotCompute/BaiscNormService.cs
+9
-7
performance/Performance.Services/AllotCompute/ProcessComputService.cs
+3
-2
performance/Performance.Services/AllotCompute/ResultComputeService.cs
+46
-43
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
+187
-96
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadDeptAccounting.cs
+1
-0
No files found.
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
e75d6840
...
...
@@ -550,6 +550,11 @@
工号
</summary>
</member>
<member
name=
"P:Performance.DtoModels.ComputeResult.IncludeAvgCalculate"
>
<summary>
是否带入平均计算 是 否
</summary>
</member>
<member
name=
"T:Performance.DtoModels.UnitType"
>
<summary>
核算单元类型
</summary>
</member>
...
...
@@ -724,6 +729,16 @@
科室名称
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataAccountBaisc.IncludeAvgCalculate"
>
<summary>
是否带入平均计算 是 否
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataAccountBaisc.PermanentStaff"
>
<summary>
定科人数
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataAccountBaisc.ManagerNumber"
>
<summary>
科主任/护士长数量
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
e75d6840
...
...
@@ -1393,6 +1393,16 @@
科室
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_accountbasic.IncludeAvgCalculate"
>
<summary>
是否带入平均计算 是 否
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_accountbasic.PermanentStaff"
>
<summary>
定科人数
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_accountbasic.DoctorDirectorNumber"
>
<summary>
科主任数量
...
...
@@ -2508,6 +2518,16 @@
科室
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_account.IncludeAvgCalculate"
>
<summary>
是否带入平均计算 是 否
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_account.PermanentStaff"
>
<summary>
定科人数
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_account.ManagerNumber"
>
<summary>
科主任/护士长数量
...
...
performance/Performance.DtoModels/PerExcel/ComputeResult.cs
View file @
e75d6840
...
...
@@ -131,7 +131,9 @@ public class ComputeResult
public
decimal
?
Adjust
{
get
;
set
;
}
public
string
UnitType
{
get
;
set
;
}
public
string
Remark
{
get
;
set
;
}
/// <summary>
/// 工号
/// </summary>
...
...
performance/Performance.DtoModels/PerExcel/PerDataAccountBaisc.cs
View file @
e75d6840
...
...
@@ -34,6 +34,11 @@ public class PerDataAccountBaisc : IPerData
public
string
Department
{
get
;
set
;
}
/// <summary>
/// 定科人数
/// </summary>
public
decimal
PermanentStaff
{
get
;
set
;
}
/// <summary>
/// 科主任/护士长数量
/// </summary>
public
decimal
ManagerNumber
{
get
;
set
;
}
...
...
performance/Performance.EntityModels/Entity/im_accountbasic.cs
View file @
e75d6840
...
...
@@ -50,7 +50,12 @@ public class im_accountbasic
/// 科室
/// </summary>
public
string
Department
{
get
;
set
;
}
/// <summary>
/// 定科人数
/// </summary>
public
Nullable
<
decimal
>
PermanentStaff
{
get
;
set
;
}
/// <summary>
/// 科主任数量
/// </summary>
...
...
performance/Performance.EntityModels/Entity/res_account.cs
View file @
e75d6840
...
...
@@ -45,6 +45,11 @@ public class res_account
/// 科室
/// </summary>
public
string
Department
{
get
;
set
;
}
/// <summary>
/// 定科人数
/// </summary>
public
Nullable
<
decimal
>
PermanentStaff
{
get
;
set
;
}
/// <summary>
/// 科主任/护士长数量
...
...
performance/Performance.Services/AllotCompute/BaiscNormService.cs
View file @
e75d6840
...
...
@@ -89,16 +89,18 @@ public List<res_baiscnorm> ComputeOtherAvg(List<res_baiscnorm> baiscnormList, Li
decimal
?
result
=
null
;
if
(
type
==
PerforType
.
临床主任护士长平均
)
{
var
lczrValue
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
EnumHelper
.
GetDescription
(
PerforType
.
临床主任
))?.
AvgValue
;
var
hszValue
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
EnumHelper
.
GetDescription
(
PerforType
.
护士长
))?.
AvgValue
;
result
=
((
lczrValue
??
0
)
+
(
hszValue
??
0
))
/
2
;
var
lczrValue
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
EnumHelper
.
GetDescription
(
PerforType
.
临床主任
));
var
hszValue
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
EnumHelper
.
GetDescription
(
PerforType
.
护士长
));
var
total
=
((
lczrValue
?.
TotelNumber
??
0
)
+
(
hszValue
?.
TotelNumber
??
0
));
result
=
total
==
0
?
0
:
((
lczrValue
?.
TotelValue
??
0
)
+
(
hszValue
?.
TotelValue
??
0
))
/
total
;
}
else
if
(
type
==
PerforType
.
临床主任医技主任护士长平均
)
{
var
lczrValue
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
EnumHelper
.
GetDescription
(
PerforType
.
临床主任
))?.
AvgValue
;
var
yjzrValue
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
EnumHelper
.
GetDescription
(
PerforType
.
医技主任
))?.
AvgValue
;
var
hszValue
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
EnumHelper
.
GetDescription
(
PerforType
.
护士长
))?.
AvgValue
;
result
=
((
lczrValue
??
0
)
+
(
yjzrValue
??
0
)
+
(
hszValue
??
0
))
/
3
;
var
lczrValue
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
EnumHelper
.
GetDescription
(
PerforType
.
临床主任
));
var
yjzrValue
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
EnumHelper
.
GetDescription
(
PerforType
.
医技主任
));
var
hszValue
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
EnumHelper
.
GetDescription
(
PerforType
.
护士长
));
var
total
=
((
lczrValue
?.
TotelNumber
??
0
)
+
(
yjzrValue
?.
TotelNumber
??
0
)
+
(
hszValue
?.
TotelNumber
??
0
));
result
=
total
==
0
?
0
:
((
lczrValue
?.
TotelValue
??
0
)
+
(
yjzrValue
?.
TotelValue
??
0
)
+
(
hszValue
?.
TotelValue
??
0
))
/
total
;
}
else
{
...
...
performance/Performance.Services/AllotCompute/ProcessComputService.cs
View file @
e75d6840
...
...
@@ -293,8 +293,9 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, List<res_
dept
.
ScoringAverage
=
dept
.
ScoringAverage
==
0
m
?
1
:
dept
.
ScoringAverage
;
dept
.
AdjustFactor
=
dept
.
AdjustFactor
==
0
m
?
1
:
dept
.
AdjustFactor
;
dept
.
WorkSlopeFactor
=
dept
.
WorkSlopeFactor
==
0
m
?
1
:
dept
.
WorkSlopeFactor
;
dept
.
Income
=
econDoctor
?.
CellValue
??
0
;
dept
.
WorkloadFee
=
workDoctor
?.
CellValue
??
0
;
dept
.
WorkloadFee
=
dept
.
WorkSlopeFactor
*
(
workDoctor
?.
CellValue
??
0
)
;
dept
.
PerforFee
=
dept
.
Income
*
(
dept
.
BasicFactor
+
dept
.
SlopeFactor
);
dept
.
PerforTotal
=
dept
.
PerforFee
+
dept
.
WorkloadFee
+
dept
.
OtherPerfor1
+
(
dept
.
MinimumFee
??
0
);
dept
.
RealGiveFee
=
(
dept
.
PerforTotal
*
dept
.
ScoringAverage
+
dept
.
Extra
+
dept
.
OtherPerfor2
)
*
dept
.
AdjustFactor
;
...
...
@@ -526,7 +527,7 @@ private List<CofDrugProp> GetDrugConfig(PerExcel excel, int allotid)
var
fvalue
=
cofList
.
FirstOrDefault
(
t
=>
prop
>
t
.
MinRange
&&
prop
<=
t
.
MaxRange
)?.
Value
??
0
;
cofs
.
Add
(
new
CofDrugProp
{
AccoutingUnit
=
unit
,
Factor
=
fvalue
,
Prop
=
prop
});
}
return
cofs
;
return
cofs
;
}
#
endregion
}
...
...
performance/Performance.Services/AllotCompute/ResultComputeService.cs
View file @
e75d6840
...
...
@@ -185,54 +185,57 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
}
var
empolyee
=
computeEmployees
.
FirstOrDefault
(
t
=>
t
.
AccountingUnit
==
group
.
AccountingUnit
);
if
(
empolyee
==
null
)
var
empolyee
s
=
computeEmployees
.
Where
(
t
=>
t
.
AccountingUnit
==
group
.
AccountingUnit
);
foreach
(
var
empolyee
in
empolyees
)
{
empolyee
=
new
ComputeEmployee
//if (empolyee == null)
//{
// empolyee = new ComputeEmployee
// {
// AccountType = AccountUnitType.科主任.ToString(),
// DoctorName = "人员信息缺失",
// FitPeople = "",
// ScoreAverageRate = 1,
// Punishment = 0,
// OtherPerfor = 0,
// Adjust = 1,
// };
//}
var
compute
=
new
ComputeResult
{
UnitType
=
UnitType
.
特殊核算组
.
ToString
(),
AccountingUnit
=
group
.
AccountingUnit
,
AccountType
=
AccountUnitType
.
科主任
.
ToString
(),
DoctorName
=
"人员信息缺失"
,
FitPeople
=
""
,
ScoreAverageRate
=
1
,
Punishment
=
0
,
OtherPerfor
=
0
,
Adjust
=
1
,
EmployeeName
=
empolyee
.
DoctorName
,
FitPeople
=
empolyee
.
FitPeople
,
JobTitle
=
empolyee
.
JobTitle
,
ScoreAverageRate
=
empolyee
.
ScoreAverageRate
,
Punishment
=
empolyee
.
Punishment
,
OtherPerfor
=
empolyee
.
OtherPerfor
,
Number
=
group
.
Number
,
PerforTotal
=
sumValue
,
Avg
=
group
.
Number
==
0
?
0
:
(
sumValue
/
group
.
Number
),
Adjust
=
empolyee
.
Adjust
};
compute
.
Efficiency
=
compute
.
Avg
*
(
empolyee
.
Efficiency
??
1
);
compute
.
Scale
=
compute
.
PerforTotal
*
(
empolyee
.
Scale
??
1
);
//应发管理绩效
compute
.
ShouldGiveFee
=
(
compute
.
Efficiency
+
compute
.
Scale
)
*
empolyee
.
Management
;
//绩效合计
compute
.
PerforSumFee
=
compute
.
Avg
+
compute
.
ShouldGiveFee
;
//应发绩效
compute
.
GiveFee
=
compute
.
PerforSumFee
;
//实发绩效
compute
.
RealGiveFee
=
(
compute
.
GiveFee
*
compute
.
ScoreAverageRate
+
(
compute
.
Punishment
??
0
)
+
(
compute
.
OtherPerfor
??
0
))
*
(
compute
.
Adjust
??
1
m
);
// 参考基数专用绩效合计
compute
.
BaiscNormPerforTotal
=
compute
.
RealGiveFee
;
computeList
.
Add
(
compute
);
}
var
compute
=
new
ComputeResult
{
UnitType
=
UnitType
.
特殊核算组
.
ToString
(),
AccountingUnit
=
group
.
AccountingUnit
,
AccountType
=
AccountUnitType
.
科主任
.
ToString
(),
EmployeeName
=
empolyee
.
DoctorName
,
FitPeople
=
empolyee
.
FitPeople
,
JobTitle
=
empolyee
.
JobTitle
,
ScoreAverageRate
=
empolyee
.
ScoreAverageRate
,
Punishment
=
empolyee
.
Punishment
,
OtherPerfor
=
empolyee
.
OtherPerfor
,
Number
=
group
.
Number
,
PerforTotal
=
sumValue
,
Avg
=
group
.
Number
==
0
?
0
:
(
sumValue
/
group
.
Number
),
Adjust
=
empolyee
.
Adjust
};
compute
.
Efficiency
=
compute
.
Avg
*
(
empolyee
.
Efficiency
??
1
);
compute
.
Scale
=
compute
.
PerforTotal
*
(
empolyee
.
Scale
??
1
);
//应发管理绩效
compute
.
ShouldGiveFee
=
(
compute
.
Efficiency
+
compute
.
Scale
)
*
empolyee
.
Management
;
//绩效合计
compute
.
PerforSumFee
=
compute
.
Avg
+
compute
.
ShouldGiveFee
;
//应发绩效
compute
.
GiveFee
=
compute
.
PerforSumFee
;
//实发绩效
compute
.
RealGiveFee
=
(
compute
.
GiveFee
*
compute
.
ScoreAverageRate
+
(
compute
.
Punishment
??
0
)
+
(
compute
.
OtherPerfor
??
0
))
*
(
compute
.
Adjust
??
1
m
);
// 参考基数专用绩效合计
compute
.
BaiscNormPerforTotal
=
compute
.
RealGiveFee
;
computeList
.
Add
(
compute
);
}
var
computes
=
Mapper
.
Map
<
List
<
res_compute
>>(
computeList
);
computes
.
ForEach
(
t
=>
t
.
AllotID
=
allot
.
ID
);
...
...
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
View file @
e75d6840
...
...
@@ -130,6 +130,145 @@ public class ComputeDirector : IAutoInjection
//}
#
endregion
#
region
北京东方模板改版注释
20200228
///// <summary>
///// 临床科室主任、临床科室副主任、临床科室护士长 计算
///// </summary>
///// <param name="empolyeeList"></param>
///// <param name="nurseList"></param>
///// <param name="directorList"></param>
///// <returns></returns>
//public List<ComputeResult> Compute2(List<ComputeEmployee> empolyeeList, List<im_accountbasic> accountbasicList, List<PerSheet> accountSheet, per_allot allot, bool isMinimum)
//{
// var basicRuleList = new[]
// {
// new { AccountUnitType = AccountUnitType.科主任, UnitType = UnitType.医生组 },
// new { AccountUnitType = AccountUnitType.护士长, UnitType = UnitType.护理组 },
// new { AccountUnitType = AccountUnitType.科主任, UnitType = UnitType.医技组 },
// };
// //取出科室
// List<res_account> dataList = new List<res_account>();
// foreach (var account in accountSheet)
// {
// dataList.AddRange(AutoMapper.Mapper.Map<List<res_account>>(account.PerData.Select(t => (PerDataAccountBaisc)t)));
// }
// var multi = accountbasicList.GroupBy(t => new { t.UnitType, t.DoctorAccountingUnit })
// .Select(t => new { t.Key.UnitType, t.Key.DoctorAccountingUnit, Count = t.Count(), })
// .Where(t => t.Count > 1);
// List<ComputeResult> computeList = new List<ComputeResult>();
// foreach (var accountbasic in accountbasicList)
// {
// if (!accountbasic.DoctorDirectorNumber.HasValue || accountbasic.DoctorDirectorNumber.Value == 0)
// continue;
// //if ((!accountbasic.DoctorDirectorNumber.HasValue && "皮肤科" != accountbasic.DoctorAccountingUnit) || (accountbasic.DoctorDirectorNumber.Value == 0 && "皮肤科" != accountbasic.DoctorAccountingUnit))
// // continue;
// //原不存在科主任则跳过科主任绩效计算20190920新都
// //是否共用核算单元
// var isShare = multi.Any(group => group.UnitType == accountbasic.UnitType && group.DoctorAccountingUnit == accountbasic.DoctorAccountingUnit);
// if (isShare
// && accountbasic.DoctorDirectorNumber.HasValue && accountbasic.DoctorDirectorNumber.Value < 1
// && accountbasic.Department != accountbasic.DoctorAccountingUnit)
// continue;
// //分别取出对应的 计算 人员 平均值等信息
// var resAccount = dataList.Where(t => t.UnitType == accountbasic.UnitType && t.AccountingUnit == accountbasic.DoctorAccountingUnit);
// var number = resAccount.OrderByDescending(t => t.ManagerNumber).Sum(t => t.ManagerNumber + t.Number);
// var perforTotal = resAccount.Sum(t => t.PerforTotal);
// //var avg = resAccount.Average(t => t.Avg);
// //绩效参考标准,不使用实发绩效
// //var realAvg = resAccount.Sum(t => (t.ManagerNumber + t.Number) == 0 ? 0 : t.RealGiveFee / (t.ManagerNumber + t.Number)) / resAccount.Count();
// //var realAvg = resAccount.Sum(t => t.Number + t.ManagerNumber) == 0 ? 0 : resAccount.Sum(t => t.RealGiveFee) / resAccount.Sum(t => t.Number + t.ManagerNumber);
// decimal? realAvg = 0, realAvg2 = 0;
// bool isAvg = true;
// //if ("内五科" == accountbasic.DoctorAccountingUnit && isShare)
// // realAvg = resAccount.Sum(r => r.Number + r.ManagerNumber) == 0 ? 0 : resAccount.Sum(r => r.RealGiveFee) / resAccount.Sum(r => r.Number);
// //else
// //{
// foreach (var item in resAccount)
// {
// if ((item.ManagerNumber + item.Number) == 0)
// {
// isAvg = false;
// realAvg = resAccount.Sum(r => r.Number + r.ManagerNumber) == 0 ? 0 : resAccount.Sum(r => r.RealGiveFee) / resAccount.Sum(r => r.Number + r.ManagerNumber);
// realAvg2 = resAccount.Sum(r => r.PermanentStaff) == 0 ? 0 : resAccount.Sum(r => r.RealGiveFee) / resAccount.Sum(r => r.PermanentStaff);
// break;
// }
// else
// {
// realAvg += item.RealGiveFee / (item.ManagerNumber + item.Number);
// realAvg2 += item.PermanentStaff == 0 ? 0 : item.RealGiveFee / item.PermanentStaff;
// }
// }
// if (isAvg)
// {
// realAvg = realAvg / resAccount.Count();
// realAvg2 = realAvg2 / resAccount.Count();
// }
// //}
// var realGiveFee = resAccount.Sum(t => t.RealGiveFee);
// var basicRule = basicRuleList.FirstOrDefault(t => t.UnitType == (UnitType)accountbasic.UnitType);
// if (basicRule == null) continue;
// var empolyees = empolyeeList.Where(t => t.UnitType == basicRule.UnitType.ToString() && t.AccountingUnit == accountbasic.DoctorAccountingUnit);
// foreach (var empolyee in empolyees)
// {
// //if (empolyee == null)
// //{
// // empolyee = new ComputeEmployee
// // {
// // AccountType = basicRule.AccountUnitType.ToString(),
// // DoctorName = "人员信息缺失",
// // FitPeople = "",
// // ScoreAverageRate = 1,
// // Punishment = 0,
// // OtherPerfor = 0,
// // Adjust = 1,
// // };
// //}
// var compute = new ComputeResult
// {
// UnitType = basicRule.UnitType.ToString(),
// AccountingUnit = accountbasic.DoctorAccountingUnit,
// AccountType = basicRule.AccountUnitType.ToString(),
// EmployeeName = empolyee.DoctorName,
// FitPeople = empolyee.FitPeople,
// JobTitle = empolyee.JobTitle,
// JobNumber = empolyee.JobNumber,
// ScoreAverageRate = empolyee.ScoreAverageRate,
// Punishment = empolyee.Punishment,
// OtherPerfor = empolyee.OtherPerfor,
// Number = number,
// PerforTotal = realGiveFee,
// Avg = realAvg,
// Efficiency = realAvg2 * (empolyee.Efficiency ?? 1),
// Scale = perforTotal * (empolyee.Scale ?? 1),
// Adjust = empolyee.Adjust,
// Remark = isShare ? "特殊科室主任,共用核算单元" : ""
// };
// //应发管理绩效
// compute.ShouldGiveFee = (compute.Efficiency + compute.Scale) * (empolyee.Management ?? 0);
// //绩效合计
// compute.PerforSumFee = compute.Avg + compute.ShouldGiveFee;
// //应发绩效
// compute.GiveFee = compute.PerforSumFee;
// //实发绩效
// compute.RealGiveFee = (compute.GiveFee * compute.ScoreAverageRate + (compute.Punishment ?? 0) + (compute.OtherPerfor ?? 0)) * (compute.Adjust ?? 1m);
// // 参考基数专用绩效合计
// compute.BaiscNormPerforTotal = compute.RealGiveFee;
// computeList.Add(compute);
// }
// }
// return computeList;
//}
#
endregion
/// <summary>
/// 临床科室主任、临床科室副主任、临床科室护士长 计算
/// </summary>
...
...
@@ -140,7 +279,7 @@ public class ComputeDirector : IAutoInjection
public
List
<
ComputeResult
>
Compute
(
List
<
ComputeEmployee
>
empolyeeList
,
List
<
im_accountbasic
>
accountbasicList
,
List
<
PerSheet
>
accountSheet
,
per_allot
allot
,
bool
isMinimum
)
{
var
basicRuleList
=
new
[]
{
{
new
{
AccountUnitType
=
AccountUnitType
.
科主任
,
UnitType
=
UnitType
.
医生组
},
new
{
AccountUnitType
=
AccountUnitType
.
护士长
,
UnitType
=
UnitType
.
护理组
},
new
{
AccountUnitType
=
AccountUnitType
.
科主任
,
UnitType
=
UnitType
.
医技组
},
...
...
@@ -151,114 +290,66 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
{
dataList
.
AddRange
(
AutoMapper
.
Mapper
.
Map
<
List
<
res_account
>>(
account
.
PerData
.
Select
(
t
=>
(
PerDataAccountBaisc
)
t
)));
}
var
multi
=
accountbasicList
.
GroupBy
(
t
=>
new
{
t
.
UnitType
,
t
.
DoctorAccountingUnit
})
.
Select
(
t
=>
new
{
t
.
Key
.
UnitType
,
t
.
Key
.
DoctorAccountingUnit
,
Count
=
t
.
Count
(),
})
.
Where
(
t
=>
t
.
Count
>
1
);
List
<
ComputeResult
>
computeList
=
new
List
<
ComputeResult
>();
foreach
(
var
accountbasic
in
accountbasicList
)
var
empDis
=
empolyeeList
.
Select
(
w
=>
new
{
w
.
DoctorName
,
w
.
JobNumber
}).
Distinct
();
foreach
(
var
emp
in
empDis
)
{
if
(!
accountbasic
.
DoctorDirectorNumber
.
HasValue
||
accountbasic
.
DoctorDirectorNumber
.
Value
==
0
)
continue
;
//if ((!accountbasic.DoctorDirectorNumber.HasValue && "皮肤科" != accountbasic.DoctorAccountingUnit) || (accountbasic.DoctorDirectorNumber.Value == 0 && "皮肤科" != accountbasic.DoctorAccountingUnit))
// continue;
//原不存在科主任则跳过科主任绩效计算20190920新都
//是否共用核算单元
var
isShare
=
multi
.
Any
(
group
=>
group
.
UnitType
==
accountbasic
.
UnitType
&&
group
.
DoctorAccountingUnit
==
accountbasic
.
DoctorAccountingUnit
);
if
(
isShare
&&
accountbasic
.
DoctorDirectorNumber
.
HasValue
&&
accountbasic
.
DoctorDirectorNumber
.
Value
<
1
&&
accountbasic
.
Department
!=
accountbasic
.
DoctorAccountingUnit
)
continue
;
//分别取出对应的 计算 人员 平均值等信息
var
resAccount
=
dataList
.
Where
(
t
=>
t
.
UnitType
==
accountbasic
.
UnitType
&&
t
.
AccountingUnit
==
accountbasic
.
DoctorAccountingUnit
);
var
number
=
resAccount
.
OrderByDescending
(
t
=>
t
.
ManagerNumber
).
Sum
(
t
=>
t
.
ManagerNumber
+
t
.
Number
);
var
perforTotal
=
resAccount
.
Sum
(
t
=>
t
.
PerforTotal
);
//var avg = resAccount.Average(t => t.Avg);
//绩效参考标准,不使用实发绩效
//var realAvg = resAccount.Sum(t => (t.ManagerNumber + t.Number) == 0 ? 0 : t.RealGiveFee / (t.ManagerNumber + t.Number)) / resAccount.Count();
//var realAvg = resAccount.Sum(t => t.Number + t.ManagerNumber) == 0 ? 0 : resAccount.Sum(t => t.RealGiveFee) / resAccount.Sum(t => t.Number + t.ManagerNumber);
decimal
?
realAvg
=
0
;
bool
isAvg
=
true
;
//if ("内五科" == accountbasic.DoctorAccountingUnit && isShare)
// realAvg = resAccount.Sum(r => r.Number + r.ManagerNumber) == 0 ? 0 : resAccount.Sum(r => r.RealGiveFee) / resAccount.Sum(r => r.Number);
//else
//{
foreach
(
var
item
in
resAccount
)
{
if
((
item
.
ManagerNumber
+
item
.
Number
)
==
0
)
{
isAvg
=
false
;
realAvg
=
resAccount
.
Sum
(
r
=>
r
.
Number
+
r
.
ManagerNumber
)
==
0
?
0
:
resAccount
.
Sum
(
r
=>
r
.
RealGiveFee
)
/
resAccount
.
Sum
(
r
=>
r
.
Number
+
r
.
ManagerNumber
);
break
;
}
else
{
realAvg
+=
item
.
RealGiveFee
/
(
item
.
ManagerNumber
+
item
.
Number
);
}
}
if
(
isAvg
)
realAvg
=
realAvg
/
resAccount
.
Count
();
//}
var
empolyees
=
empolyeeList
.
Where
(
w
=>
w
.
DoctorName
==
emp
.
DoctorName
&&
w
.
JobNumber
==
emp
.
JobNumber
);
foreach
(
var
empolyee
in
empolyees
)
{
var
resAccount
=
dataList
.
FirstOrDefault
(
t
=>
((
UnitType
)
t
.
UnitType
).
ToString
()
==
empolyee
.
UnitType
&&
t
.
AccountingUnit
==
empolyee
.
AccountingUnit
);
if
(
resAccount
==
null
)
continue
;
var
realGiveFee
=
resAccount
.
Sum
(
t
=>
t
.
RealGiveFee
);
var
basicRule
=
basicRuleList
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
(
UnitType
)
resAccount
.
UnitType
);
if
(
basicRule
==
null
)
continue
;
var
avg
=
(
resAccount
.
ManagerNumber
+
resAccount
.
Number
)
==
0
?
0
:
resAccount
.
RealGiveFee
/
(
resAccount
.
ManagerNumber
+
resAccount
.
Number
);
var
effAvg
=
resAccount
.
PermanentStaff
==
0
?
0
:
resAccount
.
RealGiveFee
/
resAccount
.
PermanentStaff
;
var
basicRule
=
basicRuleList
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
(
UnitType
)
accountbasic
.
UnitType
);
if
(
basicRule
==
null
)
continue
;
var
empolyee
=
empolyeeList
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
basicRule
.
UnitType
.
ToString
()
&&
t
.
AccountingUnit
==
accountbasic
.
DoctorAccountingUnit
);
var
efficiency
=
avg
*
(
empolyee
.
Efficiency
??
1
);
var
scale
=
resAccount
.
PerforTotal
*
(
empolyee
.
Scale
??
1
);
if
(
empolyee
==
null
)
{
empolyee
=
new
ComputeEmployee
var
compute
=
new
ComputeResult
{
UnitType
=
basicRule
.
UnitType
.
ToString
(),
AccountingUnit
=
empolyee
.
AccountingUnit
,
AccountType
=
basicRule
.
AccountUnitType
.
ToString
(),
DoctorName
=
"人员信息缺失"
,
FitPeople
=
""
,
ScoreAverageRate
=
1
,
Punishment
=
0
,
OtherPerfor
=
0
,
Adjust
=
1
,
EmployeeName
=
empolyee
.
DoctorName
,
FitPeople
=
empolyee
.
FitPeople
,
JobTitle
=
empolyee
.
JobTitle
,
JobNumber
=
empolyee
.
JobNumber
,
ScoreAverageRate
=
empolyee
.
ScoreAverageRate
,
Punishment
=
empolyee
.
Punishment
,
OtherPerfor
=
empolyee
.
OtherPerfor
,
Number
=
resAccount
.
ManagerNumber
+
resAccount
.
Number
,
PerforTotal
=
resAccount
.
RealGiveFee
,
Avg
=
avg
,
Efficiency
=
effAvg
*
(
empolyee
.
Efficiency
??
1
),
Scale
=
resAccount
.
PerforTotal
*
(
empolyee
.
Scale
??
1
),
Adjust
=
empolyee
.
Adjust
,
Remark
=
empolyees
.
Count
()
>
1
?
"特殊科室主任,共用核算单元"
:
""
};
}
var
compute
=
new
ComputeResult
{
UnitType
=
basicRule
.
UnitType
.
ToString
(),
AccountingUnit
=
accountbasic
.
DoctorAccountingUnit
,
AccountType
=
basicRule
.
AccountUnitType
.
ToString
(),
EmployeeName
=
empolyee
.
DoctorName
,
FitPeople
=
empolyee
.
FitPeople
,
JobTitle
=
empolyee
.
JobTitle
,
JobNumber
=
empolyee
.
JobNumber
,
ScoreAverageRate
=
empolyee
.
ScoreAverageRate
,
Punishment
=
empolyee
.
Punishment
,
OtherPerfor
=
empolyee
.
OtherPerfor
,
Number
=
number
,
PerforTotal
=
realGiveFee
,
Avg
=
realAvg
,
Efficiency
=
realAvg
*
(
empolyee
.
Efficiency
??
1
),
Scale
=
perforTotal
*
(
empolyee
.
Scale
??
1
),
Adjust
=
empolyee
.
Adjust
,
Remark
=
isShare
?
"特殊科室主任,共用核算单元"
:
""
};
//应发管理绩效
compute
.
ShouldGiveFee
=
(
compute
.
Efficiency
+
compute
.
Scale
)
*
(
empolyee
.
Management
??
0
);
//绩效合计
compute
.
PerforSumFee
=
compute
.
Avg
+
compute
.
ShouldGiveFee
;
//应发绩效
compute
.
GiveFee
=
compute
.
PerforSumFee
;
//实发绩效
compute
.
RealGiveFee
=
(
compute
.
GiveFee
*
compute
.
ScoreAverageRate
+
(
compute
.
Punishment
??
0
)
+
(
compute
.
OtherPerfor
??
0
))
*
(
compute
.
Adjust
??
1
m
);
// 参考基数专用绩效合计
compute
.
BaiscNormPerforTotal
=
compute
.
RealGiveFee
;
//应发管理绩效
compute
.
ShouldGiveFee
=
(
compute
.
Efficiency
+
compute
.
Scale
)
*
(
empolyee
.
Management
??
0
);
//绩效合计
compute
.
PerforSumFee
=
compute
.
Avg
+
compute
.
ShouldGiveFee
;
//应发绩效
compute
.
GiveFee
=
compute
.
PerforSumFee
;
//实发绩效
compute
.
RealGiveFee
=
(
compute
.
GiveFee
*
compute
.
ScoreAverageRate
+
(
compute
.
Punishment
??
0
)
+
(
compute
.
OtherPerfor
??
0
))
*
(
compute
.
Adjust
??
1
m
);
// 参考基数专用绩效合计
compute
.
BaiscNormPerforTotal
=
compute
.
RealGiveFee
;
computeList
.
Add
(
compute
);
computeList
.
Add
(
compute
);
}
}
return
computeList
;
}
/// <summary>
/// 院领导、业务中层、工勤人员 计算
/// </summary>
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadDeptAccounting.cs
View file @
e75d6840
...
...
@@ -35,6 +35,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
unifyUnit
.
UnitType
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"核算单元类型"
).
PointCell
)?.
StringCellValue
;
unifyUnit
.
AccountingUnit
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"核算单元"
).
PointCell
)?.
StringCellValue
;
unifyUnit
.
Department
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"科室名称"
).
PointCell
)?.
StringCellValue
;
unifyUnit
.
PermanentStaff
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"效率绩效人数"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
ManagerNumber
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"科主任/护士长人数"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
Number
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"核算单元人员数量"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
BasicFactor
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"预算比例"
).
PointCell
)?.
NumericCellValue
);
...
...
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