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
65134377
Commit
65134377
authored
Mar 15, 2021
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
全院核算绩效发放
parent
5bee29a3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
249 additions
and
99 deletions
+249
-99
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+1
-1
performance/Performance.DtoModels/Response/DeptResponse.cs
+1
-1
performance/Performance.Services/ComputeService.cs
+247
-97
No files found.
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
65134377
...
...
@@ -2968,7 +2968,7 @@
</member>
<member
name=
"P:Performance.DtoModels.DeptResponse.PerforTotal"
>
<summary>
绩效合计
考核前
绩效合计
</summary>
</member>
<member
name=
"P:Performance.DtoModels.DeptResponse.Avg"
>
...
...
performance/Performance.DtoModels/Response/DeptResponse.cs
View file @
65134377
...
...
@@ -129,7 +129,7 @@ public class DeptResponse
public
Nullable
<
decimal
>
WorkloadFee
{
get
;
set
;
}
/// <summary>
/// 绩效合计
///
考核前
绩效合计
/// </summary>
public
Nullable
<
decimal
>
PerforTotal
{
get
;
set
;
}
...
...
performance/Performance.Services/ComputeService.cs
View file @
65134377
...
...
@@ -311,6 +311,154 @@ public List<DeptResponse> GetOfficePerformance(int allotId)
return
other
;
}
///// <summary>
///// 返回院领导、中层、工勤组绩效
///// </summary>
///// <param name="allotId">绩效ID</param>
///// <returns></returns>
//public List<DeptResponse> GetAdminPerformance(int allotId)
//{
// var result = new List<DeptResponse>();
// var resData = perforResaccountRepository.GetEntities(t => t.AllotID == allotId);
// if (resData != null && resData.Any())
// {
// result.AddRange(Mapper.Map<List<DeptResponse>>(resData));
// result.ForEach(t =>
// {
// t.UnitName = ((UnitType)t.UnitType).ToString();
// t.AssessLaterPerforTotal = Math.Round((t.PerforTotal * t.ScoringAverage + (t.MedicineExtra ?? 0) + (t.MaterialsExtra ?? 0) + (t.Extra ?? 0) + (t.AssessLaterOtherFee ?? 0)) ?? 0);
// });
// result = result.OrderBy(t => t.UnitType).ThenBy(t => t.AccountingUnit).ToList();
// }
// var list = _perforRescomputeRepository.GetEntities(t => t.AllotID == allotId);
// if (list == null || !list.Any()) return result;
// var isShowManage = IsShowManage(allotId);
// Dictionary<string, string> dict = new Dictionary<string, string>
// {
// { "科主任", "医生组" },
// { "护士长", "护理组" },
// { AccountUnitType.行政高层.ToString(), AccountUnitType.行政高层.ToString() },
// { AccountUnitType.行政中层.ToString(), AccountUnitType.行政中层.ToString() },
// { AccountUnitType.行政工勤.ToString(), AccountUnitType.行政工勤.ToString() }
// };
// var doctors = new string[] { "医生组", "护理组", "医技组" };
// List<DeptResponse> adminPerfor = list.GroupBy(t => new { t.AccountingUnit, t.AccountType, t.UnitType }).Select(t =>
// {
// string unitName = !string.IsNullOrEmpty(t.Key.UnitType) ? t.Key.UnitType : result.Where(w => !dict.Values.Contains(w.UnitName)).FirstOrDefault(w => w.AccountingUnit == t.Key.AccountingUnit)?.UnitName ?? "";
// var data = new DeptResponse
// {
// UnitName = !dict.Values.Contains(unitName) && !string.IsNullOrEmpty(unitName) ? unitName : dict.ContainsKey(t.Key.AccountType) ? dict[t.Key.AccountType] : "未知",
// AccountingUnit = t.Key.AccountingUnit,
// Department = t.Key.AccountingUnit,
// Number = t.Count(),
// };
// if (doctors.Contains(data.UnitName))
// {
// data.AssessLaterManagementFee = isShowManage == 1
// ? t.Sum(group => group.RealGiveFee ?? 0) + t.Sum(group => group.OtherPerfor ?? 0) //实发绩效
// : Math.Round((t.Max(m => m.ShouldGiveFee) * t.Max(m => m.ScoreAverageRate) * t.Max(m => m.Attendance) ?? 0.0M) + t.Max(m => m.Punishment ?? 0.0M)); //考核后管理绩效
// }
// return data;
// }).ToList();
// result.AddRange(adminPerfor);
// var aprAmounts = perapramountRepository.GetEntities(t => t.AllotId == allotId && t.Status == 3) ?? new List<per_apr_amount>();
// var employees = perforPeremployeeRepository.GetEntities(t => t.AllotId == allotId) ?? new List<per_employee>();
// var otherPerformances = aprAmounts.Join(employees,
// outer => new { outer.AccountingUnit, outer.PersonnelNumber },
// inner => new { inner.AccountingUnit, inner.PersonnelNumber },
// (outer, inner) => new
// {
// AccountingUnit = outer.AccountingUnit,
// UnitType = inner.UnitType,
// PersonnelNumber = inner.PersonnelNumber,
// PersonnelName = outer.DoctorName,
// Amount = outer.Amount
// })?.GroupBy(t => new { t.AccountingUnit, t.UnitType }).Select(t => new
// {
// AccountingUnit = t.Key.AccountingUnit,
// UnitType = t.Key.UnitType,
// Amount = t.Sum(s => s.Amount)
// });
// result = result.GroupBy(t => new { t.AccountingUnit, t.UnitName }).Select(t => new DeptResponse
// {
// UnitName = t.Key.UnitName,
// AccountingUnit = t.Key.AccountingUnit,
// Department = t.Key.AccountingUnit,
// PerforFee = t.Sum(group => group.PerforFee),
// WorkloadFee = t.Sum(group => group.WorkloadFee),
// AssessBeforeOtherFee = t.Sum(group => group.AssessBeforeOtherFee),
// ScoringAverage = t.Sum(group => group.ScoringAverage),
// MedicineExtra = t.Sum(group => group.MedicineExtra),
// Extra = t.Sum(group => group.Extra),
// AssessLaterOtherFee = t.Sum(group => group.AssessLaterOtherFee),
// AdjustFactor = t.Max(group => group.AdjustFactor),
// AdjustLaterOtherFee = t.Sum(group => group.AdjustLaterOtherFee),
// PerforTotal = t.Sum(group => group.PerforTotal),
// AssessLaterPerforTotal = t.Sum(group => group.AssessLaterPerforTotal),
// AssessLaterManagementFee = t.Sum(group => group.AssessLaterManagementFee),
// AprPerforAmount = otherPerformances?.FirstOrDefault(w => w.AccountingUnit == t.Key.AccountingUnit && w.UnitType == t.Key.UnitName)?.Amount ?? 0,
// RealGiveFee = t.Sum(group => group.RealGiveFee) + t.Sum(group => group.AssessLaterManagementFee)
// + (otherPerformances?.FirstOrDefault(w => w.AccountingUnit == t.Key.AccountingUnit && w.UnitType == t.Key.UnitName)?.Amount ?? 0),
// }).ToList();
// var specialData = _perforResspecialunitRepository.GetEntities(t => t.AllotID == allotId);
// if (specialData != null && specialData.Any())
// {
// result.AddRange(specialData.GroupBy(t => new { t.AccountingUnit, t.Department }).Select(t =>
// {
// var data = new DeptResponse
// {
// UnitName = "特殊核算组",
// AccountingUnit = t.Key.AccountingUnit,
// Department = t.Key.Department,
// PerforFee = t.Max(max => max.GiveFee),
// WorkloadFee = 0,
// AssessBeforeOtherFee = t.Max(max => max.AssessBeforeOtherFee),
// PerforTotal = t.Max(max => max.PerforTotal),
// ScoringAverage = t.Max(max => max.ScoringAverage),
// MedicineExtra = t.Max(max => max.MedicineExtra),
// MaterialsExtra = t.Max(max => max.MaterialsExtra),
// Extra = 0,
// AssessLaterOtherFee = t.Max(max => max.AssessLaterOtherFee),
// AdjustFactor = t.Max(max => max.Adjust),
// AdjustLaterOtherFee = t.Max(max => max.AdjustLaterOtherFee),
// AssessLaterManagementFee = 0,
// AprPerforAmount = 0,
// RealGiveFee = t.Max(max => max.RealGiveFee),
// };
// data.AssessLaterPerforTotal = Math.Round(((data.PerforTotal * data.ScoringAverage) ?? 0) + (data.MedicineExtra ?? 0) + (data.MaterialsExtra ?? 0) + (data.AssessLaterOtherFee ?? 0));
// return data;
// }));
// }
// var enumItems = EnumHelper.GetItems<AccountUnitType>();
// result = result.OrderBy(t => enumItems.FirstOrDefault(e => e.Name == t.UnitName)?.Value)/*.ThenBy(t => t.AccountingUnit)*/.ToList();
// return result;
//}
/// <summary>
/// 返回院领导、中层、工勤组绩效
/// </summary>
...
...
@@ -319,58 +467,10 @@ public List<DeptResponse> GetOfficePerformance(int allotId)
public
List
<
DeptResponse
>
GetAdminPerformance
(
int
allotId
)
{
var
result
=
new
List
<
DeptResponse
>();
//var types = new[] { (int)UnitType.行政高层, (int)UnitType.行政中层 };
//var resData = perforResaccountRepository.GetEntities(t => t.AllotID == allotId && !types.Contains(t.UnitType ?? 0));
var
resData
=
perforResaccountRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
if
(
resData
!=
null
&&
resData
.
Any
())
{
result
.
AddRange
(
Mapper
.
Map
<
List
<
DeptResponse
>>(
resData
));
result
.
ForEach
(
t
=>
{
t
.
UnitName
=
((
UnitType
)
t
.
UnitType
).
ToString
();
t
.
AssessLaterPerforTotal
=
Math
.
Round
((
t
.
PerforTotal
*
t
.
ScoringAverage
+
(
t
.
MedicineExtra
??
0
)
+
(
t
.
MaterialsExtra
??
0
)
+
(
t
.
Extra
??
0
)
+
(
t
.
AssessLaterOtherFee
??
0
))
??
0
);
});
result
=
result
.
OrderBy
(
t
=>
t
.
UnitType
).
ThenBy
(
t
=>
t
.
AccountingUnit
).
ToList
();
}
var
list
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
if
(
list
==
null
||
!
list
.
Any
())
return
result
;
var
isShowManage
=
IsShowManage
(
allotId
);
Dictionary
<
string
,
string
>
dict
=
new
Dictionary
<
string
,
string
>
{
{
"科主任"
,
"医生组"
},
{
"护士长"
,
"护理组"
},
{
AccountUnitType
.
行政高层
.
ToString
(),
AccountUnitType
.
行政高层
.
ToString
()
},
{
AccountUnitType
.
行政中层
.
ToString
(),
AccountUnitType
.
行政中层
.
ToString
()
},
{
AccountUnitType
.
行政工勤
.
ToString
(),
AccountUnitType
.
行政工勤
.
ToString
()
}
};
var
doctors
=
new
string
[]
{
"医生组"
,
"护理组"
,
"医技组"
};
List
<
DeptResponse
>
adminPerfor
=
list
.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
AccountType
}).
Select
(
t
=>
{
string
unitName
=
result
.
Where
(
w
=>
!
dict
.
Values
.
Contains
(
w
.
UnitName
)).
FirstOrDefault
(
w
=>
w
.
AccountingUnit
==
t
.
Key
.
AccountingUnit
)?.
UnitName
??
""
;
var
data
=
new
DeptResponse
{
UnitName
=
!
dict
.
Values
.
Contains
(
unitName
)
&&
!
string
.
IsNullOrEmpty
(
unitName
)
?
unitName
:
dict
.
ContainsKey
(
t
.
Key
.
AccountType
)
?
dict
[
t
.
Key
.
AccountType
]
:
"未知"
,
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
Department
=
t
.
Key
.
AccountingUnit
,
Number
=
t
.
Count
(),
};
if
(
doctors
.
Contains
(
data
.
UnitName
))
{
data
.
AssessLaterManagementFee
=
isShowManage
==
1
?
t
.
Sum
(
group
=>
group
.
RealGiveFee
??
0
)
+
t
.
Sum
(
group
=>
group
.
OtherPerfor
??
0
)
//实发绩效
:
Math
.
Round
((
t
.
Max
(
m
=>
m
.
ShouldGiveFee
)
*
t
.
Max
(
m
=>
m
.
ScoreAverageRate
)
*
t
.
Max
(
m
=>
m
.
Attendance
)
??
0.0
M
)
+
t
.
Max
(
m
=>
m
.
Punishment
??
0.0
M
));
//考核后管理绩效
}
return
data
;
}).
ToList
();
result
.
AddRange
(
adminPerfor
);
var
aprAmounts
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Status
==
3
)
??
new
List
<
per_apr_amount
>();
var
amounts
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Status
==
3
)
??
new
List
<
per_apr_amount
>();
var
employees
=
perforPeremployeeRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
)
??
new
List
<
per_employee
>();
var
otherPerformances
=
a
prA
mounts
.
Join
(
employees
,
// 获取各科室 医院其他绩效
var
otherPerformances
=
amounts
.
Join
(
employees
,
outer
=>
new
{
outer
.
AccountingUnit
,
outer
.
PersonnelNumber
},
inner
=>
new
{
inner
.
AccountingUnit
,
inner
.
PersonnelNumber
},
(
outer
,
inner
)
=>
new
...
...
@@ -387,64 +487,114 @@ public List<DeptResponse> GetAdminPerformance(int allotId)
Amount
=
t
.
Sum
(
s
=>
s
.
Amount
)
});
result
=
result
.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
UnitName
}).
Select
(
t
=>
new
DeptResponse
var
clinicalTypes
=
new
UnitType
[]
{
UnitType
.
医生组
,
UnitType
.
其他医生组
,
UnitType
.
医技组
,
UnitType
.
其他医技组
,
UnitType
.
护理组
,
UnitType
.
其他护理组
};
var
clinicalTypesString
=
clinicalTypes
.
Select
(
w
=>
w
.
ToString
()).
ToList
();
var
clinicalTypesInt
=
clinicalTypes
.
Select
(
w
=>
(
int
)
w
).
ToList
();
var
clinicalComputes
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
clinicalTypesString
.
Contains
(
t
.
UnitType
))
??
new
List
<
res_compute
>();
var
clinicalEmployees
=
_perforImemployeeclinicRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
clinicalTypesString
.
Contains
(
t
.
UnitType
));
var
isShowManage
=
IsShowManage
(
allotId
);
// 计算 科主任/护士长 管理绩效
clinicalComputes
?.
ForEach
(
t
=>
{
if
(
isShowManage
==
2
)
{
var
employee
=
clinicalEmployees
.
FirstOrDefault
(
e
=>
e
.
PersonnelNumber
==
t
.
JobNumber
&&
e
.
AccountingUnit
==
t
.
AccountingUnit
);
var
scoreAverageRate
=
t
.
ScoreAverageRate
??
employee
.
ScoreAverageRate
??
1
;
var
attendance
=
t
.
Attendance
??
employee
.
Attendance
??
0
;
t
.
GiveFee
=
(
t
.
ShouldGiveFee
??
0
)
*
scoreAverageRate
*
attendance
+
(
t
.
OtherPerfor
??
0
)
+
(
t
.
Punishment
??
0
)
+
(
t
.
AssessLaterOtherFee
??
0
);
t
.
RealGiveFee
=
t
.
GiveFee
*
(
t
.
Adjust
??
1
m
)
+
(
t
.
AdjustLaterOtherFee
??
0
);
}
});
// 临床科室
var
accounts
=
perforResaccountRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
clinicalTypesInt
.
Contains
(
t
.
UnitType
.
Value
))
??
new
List
<
res_account
>();
var
clinicalResult
=
accounts
.
Select
(
t
=>
new
DeptResponse
{
UnitName
=
t
.
Key
.
UnitName
,
UnitName
=
((
UnitType
)
t
.
UnitType
).
ToString
(),
AccountingUnit
=
t
.
AccountingUnit
,
Department
=
t
.
AccountingUnit
,
PerforFee
=
t
.
PerforFee
,
WorkloadFee
=
t
.
WorkloadFee
,
AssessBeforeOtherFee
=
t
.
AssessBeforeOtherFee
,
PerforTotal
=
t
.
PerforTotal
,
ScoringAverage
=
t
.
ScoringAverage
,
Extra
=
t
.
Extra
,
MedicineExtra
=
t
.
MedicineExtra
,
MaterialsExtra
=
t
.
MaterialsExtra
,
AssessLaterOtherFee
=
t
.
AssessLaterOtherFee
,
AssessLaterPerforTotal
=
t
.
AssessLaterPerforTotal
,
AdjustFactor
=
t
.
AdjustFactor
,
AdjustLaterOtherFee
=
t
.
AdjustLaterOtherFee
,
AssessLaterManagementFee
=
clinicalComputes
?.
FirstOrDefault
(
w
=>
w
.
AccountingUnit
==
t
.
AccountingUnit
&&
w
.
UnitType
==
((
UnitType
)
t
.
UnitType
).
ToString
())?.
RealGiveFee
,
RealGiveFee
=
t
.
RealGiveFee
,
});
result
.
AddRange
(
clinicalResult
);
// 特殊核算组科室
var
specialunits
=
_perforResspecialunitRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
new
List
<
res_specialunit
>();
var
specialResult
=
specialunits
.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
}).
Select
(
t
=>
new
DeptResponse
{
UnitName
=
UnitType
.
特殊核算组
.
ToString
(),
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
Department
=
t
.
Key
.
AccountingUnit
,
PerforFee
=
t
.
Sum
(
group
=>
group
.
PerforFee
),
WorkloadFee
=
t
.
Sum
(
group
=>
group
.
WorkloadFee
),
AssessBeforeOtherFee
=
t
.
Sum
(
group
=>
group
.
AssessBeforeOtherFee
),
ScoringAverage
=
t
.
Sum
(
group
=>
group
.
ScoringAverage
),
MedicineExtra
=
t
.
Sum
(
group
=>
group
.
MedicineExtra
),
Extra
=
t
.
Sum
(
group
=>
group
.
Extra
),
AssessLaterOtherFee
=
t
.
Sum
(
group
=>
group
.
AssessLaterOtherFee
),
AdjustFactor
=
t
.
Max
(
group
=>
group
.
AdjustFactor
),
AdjustLaterOtherFee
=
t
.
Sum
(
group
=>
group
.
AdjustLaterOtherFee
),
PerforTotal
=
t
.
Sum
(
group
=>
group
.
PerforTotal
),
AssessLaterPerforTotal
=
t
.
Sum
(
group
=>
group
.
AssessLaterPerforTotal
),
AssessLaterManagementFee
=
t
.
Sum
(
group
=>
group
.
AssessLaterManagementFee
),
AprPerforAmount
=
otherPerformances
?.
FirstOrDefault
(
w
=>
w
.
AccountingUnit
==
t
.
Key
.
AccountingUnit
&&
w
.
UnitType
==
t
.
Key
.
UnitName
)?.
Amount
??
0
,
RealGiveFee
=
t
.
Sum
(
group
=>
group
.
RealGiveFee
)
+
t
.
Sum
(
group
=>
group
.
AssessLaterManagementFee
)
+
(
otherPerformances
?.
FirstOrDefault
(
w
=>
w
.
AccountingUnit
==
t
.
Key
.
AccountingUnit
&&
w
.
UnitType
==
t
.
Key
.
UnitName
)?.
Amount
??
0
),
}).
ToList
();
var
specialData
=
_perforResspecialunitRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
if
(
specialData
!=
null
&&
specialData
.
Any
())
PerforFee
=
t
.
Max
(
w
=>
w
.
ResultsTotalFee
),
WorkloadFee
=
0
,
AssessBeforeOtherFee
=
t
.
Max
(
w
=>
w
.
AssessBeforeOtherFee
),
PerforTotal
=
t
.
Max
(
w
=>
w
.
PerforTotal
),
ScoringAverage
=
t
.
Max
(
w
=>
w
.
ScoringAverage
),
Extra
=
t
.
Max
(
w
=>
w
.
Punishment
),
MedicineExtra
=
t
.
Max
(
w
=>
w
.
MedicineExtra
),
MaterialsExtra
=
t
.
Max
(
w
=>
w
.
MaterialsExtra
),
AssessLaterOtherFee
=
t
.
Max
(
w
=>
w
.
AssessLaterOtherFee
),
AssessLaterPerforTotal
=
Math
.
Round
((
t
.
Max
(
w
=>
w
.
PerforTotal
)
*
t
.
Max
(
w
=>
w
.
ScoringAverage
)
+
t
.
Max
(
w
=>
w
.
MedicineExtra
)
+
t
.
Max
(
w
=>
w
.
MaterialsExtra
)
+
t
.
Max
(
w
=>
w
.
Punishment
)
+
t
.
Max
(
w
=>
w
.
AssessLaterOtherFee
))
??
0
),
AdjustFactor
=
t
.
Max
(
w
=>
w
.
Adjust
),
AdjustLaterOtherFee
=
t
.
Max
(
w
=>
w
.
AdjustLaterOtherFee
),
RealGiveFee
=
t
.
Max
(
w
=>
w
.
RealGiveFee
),
}).
Distinct
();
result
.
AddRange
(
specialResult
);
var
officeTypes
=
new
List
<
string
>
{
"行政工勤"
,
"行政高层"
,
"行政中层"
};
var
computes
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
officeTypes
.
Contains
(
t
.
AccountType
))
??
new
List
<
res_compute
>();
var
officeResult
=
computes
.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
AccountType
,
t
.
UnitType
}).
Select
(
t
=>
new
DeptResponse
{
result
.
AddRange
(
specialData
.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
Department
}).
Select
(
t
=>
UnitName
=
t
.
Key
.
AccountType
==
"行政工勤"
?
"行政后勤"
:
t
.
Key
.
AccountType
,
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
Department
=
t
.
Key
.
AccountingUnit
,
PerforFee
=
0
,
WorkloadFee
=
0
,
AssessBeforeOtherFee
=
0
,
PerforTotal
=
t
.
Sum
(
w
=>
w
.
PerforTotal
),
ScoringAverage
=
1
,
Extra
=
0
,
MedicineExtra
=
0
,
MaterialsExtra
=
0
,
AssessLaterOtherFee
=
0
,
AssessLaterPerforTotal
=
t
.
Sum
(
w
=>
w
.
GiveFee
),
AdjustFactor
=
t
.
FirstOrDefault
()?.
Adjust
??
1
,
AdjustLaterOtherFee
=
t
.
Sum
(
w
=>
w
.
AdjustLaterOtherFee
),
RealGiveFee
=
t
.
Sum
(
w
=>
w
.
RealGiveFee
),
});
;
result
.
AddRange
(
officeResult
);
foreach
(
var
item
in
result
)
{
item
.
AprPerforAmount
=
otherPerformances
?.
Where
(
w
=>
w
.
AccountingUnit
==
item
.
AccountingUnit
&&
w
.
UnitType
==
item
.
UnitName
)?.
Sum
(
w
=>
w
.
Amount
)
??
0
;
item
.
AssessLaterManagementFee
=
item
.
AssessLaterManagementFee
??
0
;
item
.
RealGiveFee
=
(
item
.
RealGiveFee
??
0
)
+
item
.
AssessLaterManagementFee
+
item
.
AprPerforAmount
;
if
(
item
.
RealGiveFee
<=
0
)
{
var
data
=
new
DeptResponse
{
UnitName
=
"特殊核算组"
,
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
Department
=
t
.
Key
.
Department
,
PerforFee
=
t
.
Max
(
max
=>
max
.
GiveFee
),
WorkloadFee
=
0
,
AssessBeforeOtherFee
=
t
.
Max
(
max
=>
max
.
AssessBeforeOtherFee
),
PerforTotal
=
t
.
Max
(
max
=>
max
.
PerforTotal
),
ScoringAverage
=
t
.
Max
(
max
=>
max
.
ScoringAverage
),
MedicineExtra
=
t
.
Max
(
max
=>
max
.
MedicineExtra
),
MaterialsExtra
=
t
.
Max
(
max
=>
max
.
MaterialsExtra
),
Extra
=
0
,
AssessLaterOtherFee
=
t
.
Max
(
max
=>
max
.
AssessLaterOtherFee
),
AdjustFactor
=
t
.
Max
(
max
=>
max
.
Adjust
),
AdjustLaterOtherFee
=
t
.
Max
(
max
=>
max
.
AdjustLaterOtherFee
),
AssessLaterManagementFee
=
0
,
AprPerforAmount
=
0
,
RealGiveFee
=
t
.
Max
(
max
=>
max
.
RealGiveFee
),
};
data
.
AssessLaterPerforTotal
=
Math
.
Round
(((
data
.
PerforTotal
*
data
.
ScoringAverage
)
??
0
)
+
(
data
.
MedicineExtra
??
0
)
+
(
data
.
MaterialsExtra
??
0
)
+
(
data
.
AssessLaterOtherFee
??
0
));
return
data
;
}));
}
}
var
enumItems
=
EnumHelper
.
GetItems
<
AccountUnitType
>();
result
=
result
.
OrderBy
(
t
=>
enumItems
.
FirstOrDefault
(
e
=>
e
.
Name
==
t
.
UnitName
)?.
Value
)
/*.ThenBy(t => t.AccountingUnit)*/
.
ToList
();
return
result
;
}
/// <summary>
/// 查看科室绩效
/// </summary>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment