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
cfddeca9
Commit
cfddeca9
authored
Feb 19, 2021
by
lcx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v20201230yubei' into v2020morge
parents
d874732a
38e7014a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
118 additions
and
39 deletions
+118
-39
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+21
-6
performance/Performance.DtoModels/Response/DeptResponse.cs
+20
-3
performance/Performance.Services/AllotCompute/ResultComputeService.cs
+5
-6
performance/Performance.Services/ComputeService.cs
+70
-22
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadPersonExtra.cs
+2
-2
No files found.
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
cfddeca9
...
...
@@ -2820,19 +2820,19 @@
</summary>
</member>
<member
name=
"P:Performance.DtoModels.DeptResponse.ID"
>
<summary>
<summary>
</summary>
</summary>
</member>
<member
name=
"P:Performance.DtoModels.DeptResponse.AllotID"
>
<summary>
<summary>
</summary>
</summary>
</member>
<member
name=
"P:Performance.DtoModels.DeptResponse.SheetID"
>
<summary>
<summary>
</summary>
</summary>
</member>
<member
name=
"P:Performance.DtoModels.DeptResponse.UnitName"
>
<summary>
...
...
@@ -2974,6 +2974,21 @@
调节后其他绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.DeptResponse.AssessLaterPerforTotal"
>
<summary>
考核后绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.DeptResponse.AssessLaterManagementFee"
>
<summary>
考核后管理绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.DeptResponse.AprPerforAmount"
>
<summary>
其他绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.DirectorResponse.TypeName"
>
<summary>
绩效类型
...
...
performance/Performance.DtoModels/Response/DeptResponse.cs
View file @
cfddeca9
...
...
@@ -7,17 +7,17 @@ namespace Performance.DtoModels
public
class
DeptResponse
{
/// <summary>
///
///
/// </summary>
public
int
ID
{
get
;
set
;
}
/// <summary>
///
///
/// </summary>
public
Nullable
<
int
>
AllotID
{
get
;
set
;
}
/// <summary>
///
///
/// </summary>
public
Nullable
<
int
>
SheetID
{
get
;
set
;
}
...
...
@@ -152,13 +152,30 @@ public class DeptResponse
/// 考核前其他绩效
/// </summary>
public
Nullable
<
decimal
>
AssessBeforeOtherFee
{
get
;
set
;
}
/// <summary>
/// 考核后其他绩效
/// </summary>
public
Nullable
<
decimal
>
AssessLaterOtherFee
{
get
;
set
;
}
/// <summary>
/// 调节后其他绩效
/// </summary>
public
Nullable
<
decimal
>
AdjustLaterOtherFee
{
get
;
set
;
}
/// <summary>
/// 考核后绩效
/// </summary>
public
Nullable
<
decimal
>
AssessLaterPerforTotal
{
get
;
set
;
}
/// <summary>
/// 考核后管理绩效
/// </summary>
public
Nullable
<
decimal
>
AssessLaterManagementFee
{
get
;
set
;
}
/// <summary>
/// 其他绩效
/// </summary>
public
Nullable
<
decimal
>
AprPerforAmount
{
get
;
set
;
}
}
}
performance/Performance.Services/AllotCompute/ResultComputeService.cs
View file @
cfddeca9
...
...
@@ -78,7 +78,7 @@ public class ResultComputeService : IAutoInjection
/// <param name="excel"></param>
public
List
<
res_baiscnorm
>
Compute
(
per_allot
allot
,
List
<
PerSheet
>
accountSheet
)
{
//取出人员信息
//取出人员信息
var
empolyeeList
=
perforImemployeeclinicRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
var
accountbasicList
=
perforImaccountbasicRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
...
...
@@ -118,7 +118,6 @@ public List<res_baiscnorm> Compute(per_allot allot, List<PerSheet> accountSheet)
return
baiscnormList
;
}
/// <summary>
/// 特殊科室绩效计算
/// </summary>
...
...
@@ -166,7 +165,6 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
return
t
.
Quantity
*
t
.
QuantitativeIndicatorsValue
*
headcount
;
});
foreach
(
var
item
in
accountDataList
)
{
//科室奖罚汇总结果
...
...
@@ -194,7 +192,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
Quantity
=
item
.
Quantity
,
QuantitativeIndicatorsValue
=
item
.
QuantitativeIndicatorsValue
,
QuantitativeFee
=
item
.
Quantity
*
item
.
QuantitativeIndicatorsValue
*
headcount
,
//ScoringAverage = scoreAverage.HasValue ? scoreAverage : dept?.ScoringAverage,
//ScoringAverage = scoreAverage.HasValue ? scoreAverage : dept?.ScoringAverage,
ScoringAverage
=
dept
?.
ScoringAverage
??
1
,
//OtherPerfor = dept?.OtherPerfor1,
//Punishment = (extra ?? 0),
...
...
@@ -250,7 +248,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
JobTitle
=
empolyee
.
JobTitle
,
JobNumber
=
empolyee
.
JobNumber
,
ScoreAverageRate
=
empolyee
.
ScoreAverageRate
,
Punishment
=
0
,
Punishment
=
empolyee
.
Punishment
??
0
,
//OtherPerfor = empolyee.OtherPerfor,
OtherManagePerfor
=
empolyee
?.
OtherManagePerfor
??
0
,
Number
=
group
.
Number
,
...
...
@@ -503,7 +501,8 @@ private void ChangeRealGiveFee(res_reserved reserved, per_allot allot, decimal r
reserved
.
DecRatio
=
ratio
;
}
}
#
endregion
#
endregion
预留金额
/// <summary>
/// 创建科室二次分配
...
...
performance/Performance.Services/ComputeService.cs
View file @
cfddeca9
...
...
@@ -316,36 +316,84 @@ public List<DeptResponse> GetAdminPerformance(int allotId)
result
.
ForEach
(
t
=>
{
t
.
UnitName
=
((
UnitType
)
t
.
UnitType
).
ToString
();
t
.
ScoringPerfor
=
t
.
PerforFee
*
(
t
.
ScoringAverage
??
0
);
t
.
AssessLaterPerforTotal
=
Math
.
Round
((
t
.
PerforTotal
*
t
.
ScoringAverage
+
t
.
MedicineExtra
+
t
.
MaterialsExtra
+
t
.
Extra
+
t
.
AssessLaterOtherFee
)
??
0
);
});
result
=
result
.
OrderBy
(
t
=>
t
.
UnitType
).
ThenBy
(
t
=>
t
.
AccountingUnit
).
ToList
();
}
var
accountType
=
new
List
<
AccountUnitType
>
{
AccountUnitType
.
行政高层
,
AccountUnitType
.
行政中层
,
AccountUnitType
.
行政工勤
};
var
list
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
accountType
.
Select
(
a
=>
a
.
ToString
()).
Contains
(
t
.
AccountType
));
var
list
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
if
(
list
==
null
||
!
list
.
Any
())
return
result
;
List
<
DeptResponse
>
adminPerfor
=
list
.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
AccountType
})
.
Select
(
t
=>
new
DeptResponse
{
UnitName
=
t
.
Key
.
AccountType
,
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
Department
=
t
.
Key
.
AccountingUnit
,
Number
=
t
.
Count
(),
//Extra = t.FirstOrDefault(group => group.Punishment > 0)?.Punishment, // 医院奖罚
//ScoringAverage = t.FirstOrDefault(group => group.ScoreAverageRate > 0)?.ScoreAverageRate, //考核得分率
//AdjustFactor = t.FirstOrDefault(group => group.Adjust > 0)?.Adjust, //调节系数
//WorkloadFee = t.Sum(group => group.Workload), //工作量绩效
//PerforTotal = t.Sum(group => group.RealGiveFee), //绩效合计
//ScoringPerfor = t.Sum(group => group.RealGiveFee) * (t.FirstOrDefault(group => group.ScoreAverageRate > 0)?.ScoreAverageRate ?? 0),
Avg
=
t
.
Sum
(
group
=>
group
.
RealGiveFee
)
/
t
.
Count
(),
//人均绩效
OtherPerfor1
=
t
.
Sum
(
group
=>
group
.
OtherPerfor
),
RealGiveFee
=
t
.
Sum
(
group
=>
group
.
RealGiveFee
)
+
t
.
Sum
(
group
=>
group
.
OtherPerfor
),
//实发绩效
}).
ToList
();
var
enumItems
=
EnumHelper
.
GetItems
<
AccountUnitType
>();
adminPerfor
=
adminPerfor
.
OrderBy
(
t
=>
enumItems
.
FirstOrDefault
(
e
=>
e
.
Name
==
t
.
UnitName
).
Value
).
ThenBy
(
t
=>
t
.
AccountingUnit
).
ToList
();
var
isShowManage
=
IsShowManage
(
allotId
);
Dictionary
<
string
,
string
>
dict
=
new
Dictionary
<
string
,
string
>
{
{
"科主任"
,
"医生组"
},
{
"护士长"
,
"护理组"
},
{
AccountUnitType
.
行政高层
.
ToString
(),
AccountUnitType
.
行政高层
.
ToString
()
},
{
AccountUnitType
.
行政中层
.
ToString
(),
AccountUnitType
.
行政中层
.
ToString
()
},
{
AccountUnitType
.
行政工勤
.
ToString
(),
AccountUnitType
.
行政工勤
.
ToString
()
}
};
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
??
""
;
return
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
(),
// OtherPerfor1 = t.Sum(group => group.OtherPerfor),
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
))
//考核后管理绩效
};
}).
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
=
outer
.
PersonnelNumber
,
PersonnelName
=
inner
.
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
.
Sum
(
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
enumItems
=
EnumHelper
.
GetItems
<
AccountUnitType
>();
result
=
result
.
OrderBy
(
t
=>
enumItems
.
FirstOrDefault
(
e
=>
e
.
Name
==
t
.
UnitName
)?.
Value
)
/*.ThenBy(t => t.AccountingUnit)*/
.
ToList
();
return
result
;
}
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadPersonExtra.cs
View file @
cfddeca9
...
...
@@ -19,6 +19,7 @@ public class PerSheetDataReadPersonExtra : IPerSheetDataRead
HeaderLastRowNum
=
1
,
HeaderFirstCellNum
=
0
,
DataFirstRowNum
=
2
,
DataFirstCellNum
=
4
,
TotalCellNum
=
0
,
AccountingUnit
=
new
List
<
AccountingUnit
>
{
...
...
@@ -45,7 +46,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
var
row
=
sheet
.
GetRow
(
r
);
if
(
row
==
null
)
continue
;
for
(
int
c
=
0
;
c
<
vhead
.
Count
();
c
++)
for
(
int
c
=
Point
.
DataFirstCellNum
.
Value
;
c
<
vhead
.
Count
();
c
++)
{
var
athead
=
vhead
.
ElementAt
(
c
);
//var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell));
...
...
@@ -74,7 +75,6 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
if
(
unit
.
JobCellNum
.
HasValue
)
data
.
JobNumber
=
row
.
GetCell
(
unit
.
JobCellNum
.
Value
).
GetValue
();
if
(
string
.
IsNullOrEmpty
(
data
.
AccountingUnit
)
&&
string
.
IsNullOrEmpty
(
data
.
Department
))
continue
;
dataList
.
Add
(
data
);
...
...
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