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
6a8a333f
Commit
6a8a333f
authored
Jul 21, 2021
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/一次分配精度问题' into develop
parents
b20935a5
c39525c8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
23 deletions
+23
-23
performance/Performance.Services/AllotCompute/ProcessComputService.cs
+4
-4
performance/Performance.Services/AllotCompute/ResultComputeService.cs
+9
-9
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
+10
-10
No files found.
performance/Performance.Services/AllotCompute/ProcessComputService.cs
View file @
6a8a333f
...
...
@@ -324,7 +324,7 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, per_allot
dept
.
PerforFee
=
dept
.
Income
*
dept
.
BasicFactor
;
//dept.PerforTotal = Math.Round((dept.PerforFee + dept.WorkloadFee + dept.OtherPerfor1 + dept.AssessBeforeOtherFee) ?? 0);
dept
.
PerforTotal
=
Math
.
Round
((
dept
.
PerforFee
+
dept
.
WorkloadFee
+
dept
.
AssessBeforeOtherFee
)
??
0
);
dept
.
PerforTotal
=
Math
.
Round
((
dept
.
PerforFee
+
dept
.
WorkloadFee
+
dept
.
AssessBeforeOtherFee
)
??
0
,
MidpointRounding
.
AwayFromZero
);
dept
.
AssessLaterPerforTotal
=
Math
.
Round
((
dept
.
PerforTotal
*
dept
.
ScoringAverage
+
dept
.
MedicineExtra
+
dept
.
MaterialsExtra
+
dept
.
Extra
+
dept
.
AssessLaterOtherFee
)
??
0
,
MidpointRounding
.
AwayFromZero
);
dept
.
RealGiveFee
=
Math
.
Round
((
dept
.
AssessLaterPerforTotal
*
dept
.
AdjustFactor
+
dept
.
AdjustLaterOtherFee
)
??
0
,
MidpointRounding
.
AwayFromZero
);
//dept.Avg = dept.ManagerNumber + dept.Number == 0 ? 0 : dept.PerforTotal / (dept.ManagerNumber + dept.Number);
...
...
@@ -418,9 +418,9 @@ public void ComputeOffice(per_allot allot, PerExcel excel)
dept
.
PerforFee
=
empolyees
.
Sum
(
w
=>
w
.
PerforTotal
??
0
);
dept
.
PerforTotal
=
Math
.
Round
(
empolyees
.
Sum
(
w
=>
w
.
GiveFee
??
0
));
dept
.
AssessLaterPerforTotal
=
Math
.
Round
((
dept
.
PerforTotal
*
dept
.
ScoringAverage
+
dept
.
MedicineExtra
+
dept
.
MaterialsExtra
+
dept
.
Extra
)
??
0
);
dept
.
RealGiveFee
=
Math
.
Round
((
dept
.
AssessLaterPerforTotal
*
dept
.
AdjustFactor
+
dept
.
AdjustLaterOtherFee
)
??
0
);
dept
.
PerforTotal
=
Math
.
Round
(
empolyees
.
Sum
(
w
=>
w
.
GiveFee
??
0
)
,
MidpointRounding
.
AwayFromZero
);
dept
.
AssessLaterPerforTotal
=
Math
.
Round
((
dept
.
PerforTotal
*
dept
.
ScoringAverage
+
dept
.
MedicineExtra
+
dept
.
MaterialsExtra
+
dept
.
Extra
)
??
0
,
MidpointRounding
.
AwayFromZero
);
dept
.
RealGiveFee
=
Math
.
Round
((
dept
.
AssessLaterPerforTotal
*
dept
.
AdjustFactor
+
dept
.
AdjustLaterOtherFee
)
??
0
,
MidpointRounding
.
AwayFromZero
);
//dept.Avg = dept.ManagerNumber + dept.Number == 0 ? 0 : dept.PerforTotal / (dept.ManagerNumber + dept.Number);
dept
.
Avg
=
dept
.
Number
==
0
?
0
:
dept
.
PerforTotal
/
dept
.
Number
;
...
...
performance/Performance.Services/AllotCompute/ResultComputeService.cs
View file @
6a8a333f
...
...
@@ -219,11 +219,11 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
NightShiftWorkPerforFee
=
nightShift
,
};
logger
.
LogInformation
(
$"特殊核算组-
{
group
.
AccountingUnit
}
,sumValue:
{
sumValue
}
,预算比例:
{
dept
?.
BasicFactor
??
-
100
}
"
);
res
.
ResultsTotalFee
=
Math
.
Round
((
sumValue
*
(
dept
?.
BasicFactor
??
1
m
))
??
0
);
res
.
ResultsTotalFee
=
Math
.
Round
((
sumValue
*
(
dept
?.
BasicFactor
??
1
m
))
??
0
,
MidpointRounding
.
AwayFromZero
);
res
.
PerforTotal
=
res
.
ResultsTotalFee
+
res
.
AssessBeforeOtherFee
;
res
.
GiveFee
=
Math
.
Round
((
res
.
PerforTotal
*
res
.
ScoringAverage
+
res
.
MedicineExtra
+
res
.
MaterialsExtra
+
res
.
Punishment
+
res
.
AssessLaterOtherFee
)
??
0
);
res
.
RealGiveFee
=
Math
.
Round
(
res
.
GiveFee
*
res
.
Adjust
+
res
.
AdjustLaterOtherFee
??
0
);
res
.
Avg
=
Math
.
Round
((
res
.
Number
!=
0
?
res
.
PerforTotal
/
res
.
Number
:
null
)
??
0
);
res
.
GiveFee
=
Math
.
Round
((
res
.
PerforTotal
*
res
.
ScoringAverage
+
res
.
MedicineExtra
+
res
.
MaterialsExtra
+
res
.
Punishment
+
res
.
AssessLaterOtherFee
)
??
0
,
MidpointRounding
.
AwayFromZero
);
res
.
RealGiveFee
=
Math
.
Round
(
res
.
GiveFee
*
res
.
Adjust
+
res
.
AdjustLaterOtherFee
??
0
,
MidpointRounding
.
AwayFromZero
);
res
.
Avg
=
Math
.
Round
((
res
.
Number
!=
0
?
res
.
PerforTotal
/
res
.
Number
:
null
)
??
0
,
MidpointRounding
.
AwayFromZero
);
resDataList
.
Add
(
res
);
...
...
@@ -276,17 +276,17 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
compute
.
Avg
=
avg
*
(
empolyee
.
Basics
??
0
)
*
compute
.
Attendance
;
// 考核前管理绩效
compute
.
ShouldGiveFee
=
Math
.
Round
((
compute
.
Efficiency
+
compute
.
Scale
)
*
compute
.
Grant
+
compute
.
OtherManagePerfor
??
0
);
compute
.
ShouldGiveFee
=
Math
.
Round
((
compute
.
Efficiency
+
compute
.
Scale
)
*
compute
.
Grant
+
compute
.
OtherManagePerfor
??
0
,
MidpointRounding
.
AwayFromZero
);
// 考核后管理绩效
compute
.
AssessLaterManagementFee
=
Math
.
Round
(
compute
.
ShouldGiveFee
*
compute
.
ScoreAverageRate
*
compute
.
Attendance
+
compute
.
Punishment
??
0
);
compute
.
AssessLaterManagementFee
=
Math
.
Round
(
compute
.
ShouldGiveFee
*
compute
.
ScoreAverageRate
*
compute
.
Attendance
+
compute
.
Punishment
??
0
,
MidpointRounding
.
AwayFromZero
);
// 考核前绩效
compute
.
PerforSumFee
=
compute
.
Attendance
==
0
?
Math
.
Round
(
compute
.
ShouldGiveFee
??
0
)
:
Math
.
Round
(
compute
.
Avg
/
compute
.
Attendance
+
compute
.
ShouldGiveFee
??
0
);
compute
.
PerforSumFee
=
compute
.
Attendance
==
0
?
Math
.
Round
(
compute
.
ShouldGiveFee
??
0
,
MidpointRounding
.
AwayFromZero
)
:
Math
.
Round
(
compute
.
Avg
/
compute
.
Attendance
+
compute
.
ShouldGiveFee
??
0
,
MidpointRounding
.
AwayFromZero
);
// 考核后绩效
compute
.
GiveFee
=
Math
.
Round
(
compute
.
Avg
+
compute
.
AssessLaterManagementFee
??
0
);
compute
.
GiveFee
=
Math
.
Round
(
compute
.
Avg
+
compute
.
AssessLaterManagementFee
??
0
,
MidpointRounding
.
AwayFromZero
);
// 参考基数专用绩效合计
compute
.
BaiscNormPerforTotal
=
compute
.
PerforSumFee
;
// 实发绩效
compute
.
RealGiveFee
=
Math
.
Round
((
compute
.
Avg
+
compute
.
AssessLaterManagementFee
)
*
compute
.
Adjust
+
compute
.
AdjustLaterOtherFee
??
0
);
compute
.
RealGiveFee
=
Math
.
Round
((
compute
.
Avg
+
compute
.
AssessLaterManagementFee
)
*
compute
.
Adjust
+
compute
.
AdjustLaterOtherFee
??
0
,
MidpointRounding
.
AwayFromZero
);
//compute.Efficiency = compute.Avg * (empolyee.Efficiency ?? 1);
//compute.Scale = compute.PerforTotal * (empolyee.Scale ?? 1);
...
...
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
View file @
6a8a333f
...
...
@@ -407,17 +407,17 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<PerS
compute
.
Avg
=
avg
*
(
empolyee
.
Basics
??
0
)
*
compute
.
Attendance
;
compute
.
Punishment
=
(
empolyee
?.
Punishment
??
0
);
// 考核前管理绩效
compute
.
ShouldGiveFee
=
Math
.
Round
((
compute
.
Efficiency
+
compute
.
Scale
)
*
compute
.
Grant
+
compute
.
OtherManagePerfor
??
0
);
compute
.
ShouldGiveFee
=
Math
.
Round
((
compute
.
Efficiency
+
compute
.
Scale
)
*
compute
.
Grant
+
compute
.
OtherManagePerfor
??
0
,
MidpointRounding
.
AwayFromZero
);
// 考核后管理绩效
compute
.
AssessLaterManagementFee
=
Math
.
Round
(
compute
.
ShouldGiveFee
*
compute
.
ScoreAverageRate
*
compute
.
Attendance
+
compute
.
Punishment
??
0
);
compute
.
AssessLaterManagementFee
=
Math
.
Round
(
compute
.
ShouldGiveFee
*
compute
.
ScoreAverageRate
*
compute
.
Attendance
+
compute
.
Punishment
??
0
,
MidpointRounding
.
AwayFromZero
);
// 考核前绩效
compute
.
PerforSumFee
=
compute
.
Attendance
==
0
?
Math
.
Round
(
compute
.
ShouldGiveFee
??
0
)
:
Math
.
Round
(
compute
.
Avg
/
compute
.
Attendance
+
compute
.
ShouldGiveFee
??
0
);
compute
.
PerforSumFee
=
compute
.
Attendance
==
0
?
Math
.
Round
(
compute
.
ShouldGiveFee
??
0
,
MidpointRounding
.
AwayFromZero
)
:
Math
.
Round
(
compute
.
Avg
/
compute
.
Attendance
+
compute
.
ShouldGiveFee
??
0
,
MidpointRounding
.
AwayFromZero
);
// 考核后绩效
compute
.
GiveFee
=
Math
.
Round
((
compute
.
Avg
??
0
)
+
(
compute
.
AssessLaterManagementFee
??
0
));
compute
.
GiveFee
=
Math
.
Round
((
compute
.
Avg
??
0
)
+
(
compute
.
AssessLaterManagementFee
??
0
)
,
MidpointRounding
.
AwayFromZero
);
// 参考基数专用绩效合计
compute
.
BaiscNormPerforTotal
=
compute
.
PerforSumFee
;
// 实发绩效
compute
.
RealGiveFee
=
Math
.
Round
(((
compute
.
Avg
??
0
)
+
(
compute
.
AssessLaterManagementFee
??
0
))
*
compute
.
Adjust
+
(
compute
.
AdjustLaterOtherFee
??
0
)
??
0
);
compute
.
RealGiveFee
=
Math
.
Round
(((
compute
.
Avg
??
0
)
+
(
compute
.
AssessLaterManagementFee
??
0
))
*
compute
.
Adjust
+
(
compute
.
AdjustLaterOtherFee
??
0
)
??
0
,
MidpointRounding
.
AwayFromZero
);
////绩效合计
//compute.PerforSumFee = Math.Round((compute.Avg * (empolyee.Basics ?? 0)) + compute.ShouldGiveFee + compute.AssessBeforeOtherFee ?? 0);
...
...
@@ -514,11 +514,11 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot
// 行政高层 行政中层 夜班费
compute
.
NightWorkPerfor
=
item
.
NightWorkPerfor
;
//考核前绩效
compute
.
PerforTotal
=
Math
.
Round
(
compute
.
BaiscNormValue
*
compute
.
PostCoefficient
*
compute
.
Attendance
+
compute
.
AssessBeforeOtherFee
??
0
);
compute
.
PerforTotal
=
Math
.
Round
(
compute
.
BaiscNormValue
*
compute
.
PostCoefficient
*
compute
.
Attendance
+
compute
.
AssessBeforeOtherFee
??
0
,
MidpointRounding
.
AwayFromZero
);
//考核后绩效
compute
.
GiveFee
=
Math
.
Round
(
compute
.
PerforTotal
*
compute
.
ScoreAverageRate
+
compute
.
Punishment
??
0
);
compute
.
GiveFee
=
Math
.
Round
(
compute
.
PerforTotal
*
compute
.
ScoreAverageRate
+
compute
.
Punishment
??
0
,
MidpointRounding
.
AwayFromZero
);
//实发绩效
compute
.
RealGiveFee
=
Math
.
Round
((
compute
.
GiveFee
*
compute
.
Adjust
+
compute
.
AdjustLaterOtherFee
)
??
0
);
compute
.
RealGiveFee
=
Math
.
Round
((
compute
.
GiveFee
*
compute
.
Adjust
+
compute
.
AdjustLaterOtherFee
)
??
0
,
MidpointRounding
.
AwayFromZero
);
}
else
if
(
AccountUnitType
.
行政工勤
.
ToString
()
==
involve
)
{
...
...
@@ -534,11 +534,11 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot
}
#
endregion
//考核前绩效
compute
.
PerforTotal
=
Math
.
Round
(
compute
.
BaiscNormValue
*
compute
.
PostCoefficient
*
compute
.
Attendance
+
compute
.
OtherPerfor
??
0
);
compute
.
PerforTotal
=
Math
.
Round
(
compute
.
BaiscNormValue
*
compute
.
PostCoefficient
*
compute
.
Attendance
+
compute
.
OtherPerfor
??
0
,
MidpointRounding
.
AwayFromZero
);
//考核后绩效 更加开关来控制显示
compute
.
GiveFee
=
compute
.
PerforTotal
*
compute
.
ScoreAverageRate
;
//实发绩效 更加开关来控制显示
compute
.
RealGiveFee
=
Math
.
Round
(
compute
.
GiveFee
*
compute
.
Adjust
??
0
);
compute
.
RealGiveFee
=
Math
.
Round
(
compute
.
GiveFee
*
compute
.
Adjust
??
0
,
MidpointRounding
.
AwayFromZero
);
}
computeList
.
Add
(
compute
);
//// 行政高层 行政中层 夜班费
...
...
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