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
782dcfae
Commit
782dcfae
authored
Mar 15, 2021
by
lcx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v20201230yubei' into v2020morge
parents
c561c247
388ed038
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
245 additions
and
98 deletions
+245
-98
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+1
-1
performance/Performance.DtoModels/Response/DeptResponse.cs
+1
-1
performance/Performance.Services/ComputeService.cs
+243
-96
No files found.
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
782dcfae
...
@@ -2986,7 +2986,7 @@
...
@@ -2986,7 +2986,7 @@
</member>
</member>
<member
name=
"P:Performance.DtoModels.DeptResponse.PerforTotal"
>
<member
name=
"P:Performance.DtoModels.DeptResponse.PerforTotal"
>
<summary>
<summary>
绩效合计
考核前
绩效合计
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.DeptResponse.Avg"
>
<member
name=
"P:Performance.DtoModels.DeptResponse.Avg"
>
...
...
performance/Performance.DtoModels/Response/DeptResponse.cs
View file @
782dcfae
...
@@ -129,7 +129,7 @@ public class DeptResponse
...
@@ -129,7 +129,7 @@ public class DeptResponse
public
Nullable
<
decimal
>
WorkloadFee
{
get
;
set
;
}
public
Nullable
<
decimal
>
WorkloadFee
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 绩效合计
///
考核前
绩效合计
/// </summary>
/// </summary>
public
Nullable
<
decimal
>
PerforTotal
{
get
;
set
;
}
public
Nullable
<
decimal
>
PerforTotal
{
get
;
set
;
}
...
...
performance/Performance.Services/ComputeService.cs
View file @
782dcfae
...
@@ -311,6 +311,154 @@ public List<DeptResponse> GetOfficePerformance(int allotId)
...
@@ -311,6 +311,154 @@ public List<DeptResponse> GetOfficePerformance(int allotId)
return
other
;
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>
/// 返回院领导、中层、工勤组绩效
/// 返回院领导、中层、工勤组绩效
/// </summary>
/// </summary>
...
@@ -319,58 +467,10 @@ public List<DeptResponse> GetOfficePerformance(int allotId)
...
@@ -319,58 +467,10 @@ public List<DeptResponse> GetOfficePerformance(int allotId)
public
List
<
DeptResponse
>
GetAdminPerformance
(
int
allotId
)
public
List
<
DeptResponse
>
GetAdminPerformance
(
int
allotId
)
{
{
var
result
=
new
List
<
DeptResponse
>();
var
result
=
new
List
<
DeptResponse
>();
//var types = new[] { (int)UnitType.行政高层, (int)UnitType.行政中层 };
var
amounts
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Status
==
3
)
??
new
List
<
per_apr_amount
>();
//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
employees
=
perforPeremployeeRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
)
??
new
List
<
per_employee
>();
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
},
outer
=>
new
{
outer
.
AccountingUnit
,
outer
.
PersonnelNumber
},
inner
=>
new
{
inner
.
AccountingUnit
,
inner
.
PersonnelNumber
},
inner
=>
new
{
inner
.
AccountingUnit
,
inner
.
PersonnelNumber
},
(
outer
,
inner
)
=>
new
(
outer
,
inner
)
=>
new
...
@@ -387,64 +487,111 @@ public List<DeptResponse> GetAdminPerformance(int allotId)
...
@@ -387,64 +487,111 @@ public List<DeptResponse> GetAdminPerformance(int allotId)
Amount
=
t
.
Sum
(
s
=>
s
.
Amount
)
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
.
其他护理组
,
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
=>
{
{
UnitName
=
t
.
Key
.
UnitName
,
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
=
((
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
?.
Where
(
w
=>
w
.
AccountingUnit
==
t
.
AccountingUnit
&&
w
.
UnitType
==
((
UnitType
)
t
.
UnitType
).
ToString
())?.
Sum
(
c
=>
c
.
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
,
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
Department
=
t
.
Key
.
AccountingUnit
,
Department
=
t
.
Key
.
AccountingUnit
,
PerforFee
=
t
.
Sum
(
group
=>
group
.
Perfor
Fee
),
PerforFee
=
t
.
Max
(
w
=>
w
.
ResultsTotal
Fee
),
WorkloadFee
=
t
.
Sum
(
group
=>
group
.
WorkloadFee
)
,
WorkloadFee
=
0
,
AssessBeforeOtherFee
=
t
.
Sum
(
group
=>
group
.
AssessBeforeOtherFee
),
AssessBeforeOtherFee
=
t
.
Max
(
w
=>
w
.
AssessBeforeOtherFee
),
ScoringAverage
=
t
.
Sum
(
group
=>
group
.
ScoringAverage
),
PerforTotal
=
t
.
Max
(
w
=>
w
.
PerforTotal
),
MedicineExtra
=
t
.
Sum
(
group
=>
group
.
MedicineExtra
),
ScoringAverage
=
t
.
Max
(
w
=>
w
.
ScoringAverage
),
Extra
=
t
.
Sum
(
group
=>
group
.
Extra
),
Extra
=
t
.
Max
(
w
=>
w
.
Punishment
),
AssessLaterOtherFee
=
t
.
Sum
(
group
=>
group
.
AssessLaterOtherFee
),
MedicineExtra
=
t
.
Max
(
w
=>
w
.
MedicineExtra
),
AdjustFactor
=
t
.
Max
(
group
=>
group
.
AdjustFactor
),
MaterialsExtra
=
t
.
Max
(
w
=>
w
.
MaterialsExtra
),
A
djustLaterOtherFee
=
t
.
Sum
(
group
=>
group
.
Adjust
LaterOtherFee
),
A
ssessLaterOtherFee
=
t
.
Max
(
w
=>
w
.
Assess
LaterOtherFee
),
PerforTotal
=
t
.
Sum
(
group
=>
group
.
PerforTotal
),
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
),
A
ssessLaterPerforTotal
=
t
.
Sum
(
group
=>
group
.
AssessLaterPerforTotal
),
A
djustFactor
=
t
.
Max
(
w
=>
w
.
Adjust
),
A
ssessLaterManagementFee
=
t
.
Sum
(
group
=>
group
.
AssessLaterManagement
Fee
),
A
djustLaterOtherFee
=
t
.
Max
(
w
=>
w
.
AdjustLaterOther
Fee
),
A
prPerforAmount
=
otherPerformances
?.
FirstOrDefault
(
w
=>
w
.
AccountingUnit
==
t
.
Key
.
AccountingUnit
&&
w
.
UnitType
==
t
.
Key
.
UnitName
)?.
Amount
??
0
,
A
ssessLaterManagementFee
=
clinicalComputes
?.
Where
(
w
=>
w
.
AccountingUnit
==
t
.
Key
.
AccountingUnit
&&
w
.
UnitType
==
UnitType
.
特殊核算组
.
ToString
())?.
Sum
(
c
=>
c
.
RealGiveFee
)
,
RealGiveFee
=
t
.
Sum
(
group
=>
group
.
RealGiveFee
)
+
t
.
Sum
(
group
=>
group
.
AssessLaterManagementFee
)
RealGiveFee
=
t
.
Max
(
w
=>
w
.
RealGiveFee
),
+
(
otherPerformances
?.
FirstOrDefault
(
w
=>
w
.
AccountingUnit
==
t
.
Key
.
AccountingUnit
&&
w
.
UnitType
==
t
.
Key
.
UnitName
)?.
Amount
??
0
),
}).
Distinct
();
}).
ToList
(
);
result
.
AddRange
(
specialResult
);
var
specialData
=
_perforResspecialunitRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
var
officeTypes
=
new
List
<
string
>
{
"行政工勤"
,
"行政高层"
,
"行政中层"
};
if
(
specialData
!=
null
&&
specialData
.
Any
())
var
computes
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
officeTypes
.
Contains
(
t
.
AccountType
))
??
new
List
<
res_compute
>();
{
result
.
AddRange
(
specialData
.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
Department
}).
Select
(
t
=>
var
officeResult
=
computes
.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
AccountType
,
t
.
UnitType
}).
Select
(
t
=>
new
DeptResponse
{
var
data
=
new
DeptResponse
{
{
UnitName
=
"特殊核算组"
,
UnitName
=
t
.
Key
.
AccountType
==
"行政后勤"
?
"行政工勤"
:
t
.
Key
.
AccountType
,
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
Department
=
t
.
Key
.
Departmen
t
,
Department
=
t
.
Key
.
AccountingUni
t
,
PerforFee
=
t
.
Max
(
max
=>
max
.
GiveFee
)
,
PerforFee
=
0
,
WorkloadFee
=
0
,
WorkloadFee
=
0
,
AssessBeforeOtherFee
=
t
.
Max
(
max
=>
max
.
AssessBeforeOtherFee
),
AssessBeforeOtherFee
=
0
,
PerforTotal
=
t
.
Max
(
max
=>
max
.
PerforTotal
),
PerforTotal
=
t
.
Sum
(
w
=>
w
.
PerforTotal
),
ScoringAverage
=
t
.
Max
(
max
=>
max
.
ScoringAverage
),
ScoringAverage
=
1
,
MedicineExtra
=
t
.
Max
(
max
=>
max
.
MedicineExtra
),
MaterialsExtra
=
t
.
Max
(
max
=>
max
.
MaterialsExtra
),
Extra
=
0
,
Extra
=
0
,
AssessLaterOtherFee
=
t
.
Max
(
max
=>
max
.
AssessLaterOtherFee
),
MedicineExtra
=
0
,
AdjustFactor
=
t
.
Max
(
max
=>
max
.
Adjust
),
MaterialsExtra
=
0
,
AdjustLaterOtherFee
=
t
.
Max
(
max
=>
max
.
AdjustLaterOtherFee
),
AssessLaterOtherFee
=
0
,
AssessLaterManagementFee
=
0
,
AssessLaterPerforTotal
=
t
.
Sum
(
w
=>
w
.
GiveFee
),
AprPerforAmount
=
0
,
AdjustFactor
=
t
.
FirstOrDefault
()?.
Adjust
??
1
,
RealGiveFee
=
t
.
Max
(
max
=>
max
.
RealGiveFee
),
AdjustLaterOtherFee
=
t
.
Sum
(
w
=>
w
.
AdjustLaterOtherFee
),
};
RealGiveFee
=
t
.
Sum
(
w
=>
w
.
RealGiveFee
),
data
.
AssessLaterPerforTotal
=
Math
.
Round
(((
data
.
PerforTotal
*
data
.
ScoringAverage
)
??
0
)
+
(
data
.
MedicineExtra
??
0
)
+
(
data
.
MaterialsExtra
??
0
)
+
(
data
.
AssessLaterOtherFee
??
0
));
});
;
return
data
;
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
;
}
}
var
enumItems
=
EnumHelper
.
GetItems
<
AccountUnitType
>();
var
enumItems
=
EnumHelper
.
GetItems
<
AccountUnitType
>();
result
=
result
.
OrderBy
(
t
=>
enumItems
.
FirstOrDefault
(
e
=>
e
.
Name
==
t
.
UnitName
)?.
Value
)
/*.ThenBy(t => t.AccountingUnit)*/
.
ToList
();
result
=
result
.
OrderBy
(
t
=>
enumItems
.
FirstOrDefault
(
e
=>
e
.
Name
==
t
.
UnitName
)?.
Value
)
/*.ThenBy(t => t.AccountingUnit)*/
.
ToList
();
return
result
;
return
result
;
}
}
/// <summary>
/// <summary>
/// 查看科室绩效
/// 查看科室绩效
/// </summary>
/// </summary>
...
@@ -607,7 +754,7 @@ private List<ComputeResponse> GetAllotPerformance(int allotId, int hospitalId, i
...
@@ -607,7 +754,7 @@ private List<ComputeResponse> GetAllotPerformance(int allotId, int hospitalId, i
//// 业务中层人员信息
//// 业务中层人员信息
//var empolyeeList = _perforImemployeeclinicRepository.GetEntities(t => t.AllotID == allotId);
//var empolyeeList = _perforImemployeeclinicRepository.GetEntities(t => t.AllotID == allotId);
// 一次绩效 获取特定人员绩效结果
// 一次绩效 获取特定人员绩效结果
var
allot
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
mTypes
.
Contains
(
t
.
AccountType
))?.
OrderByDescending
(
t
=>
t
.
AccountingUnit
);
var
allot
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
mTypes
.
Contains
(
t
.
AccountType
)
&&
t
.
NeedSecondAllot
==
"否"
)?.
OrderByDescending
(
t
=>
t
.
AccountingUnit
);
//var apramounts = perapramountRepository.GetEntities(t => t.AllotId == allotId);
//var apramounts = perapramountRepository.GetEntities(t => t.AllotId == allotId);
return
allot
?.
Select
(
t
=>
return
allot
?.
Select
(
t
=>
...
@@ -993,7 +1140,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
...
@@ -993,7 +1140,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
if
(
pairs
.
Contains
((
SheetType
)
sheet
.
SheetType
))
if
(
pairs
.
Contains
((
SheetType
)
sheet
.
SheetType
))
{
{
sheettype
=
5
;
sheettype
=
5
;
amount
=
basicData
.
Where
(
t
=>
t
.
SheetID
==
sheet
.
ID
&&
t
.
UnitType
==
(
int
)
type
&&
t
.
IsTotal
==
1
)?.
FirstOrDefault
()?.
CellValue
??
0
;
amount
=
basicData
?
.
Where
(
t
=>
t
.
SheetID
==
sheet
.
ID
&&
t
.
UnitType
==
(
int
)
type
&&
t
.
IsTotal
==
1
)?.
FirstOrDefault
()?.
CellValue
??
0
;
if
(
sheet
.
SheetType
!=
(
int
)
SheetType
.
BudgetRatio
)
if
(
sheet
.
SheetType
!=
(
int
)
SheetType
.
BudgetRatio
)
amount
=
Math
.
Round
(
amount
,
0
);
amount
=
Math
.
Round
(
amount
,
0
);
}
}
...
...
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