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
056d7873
Commit
056d7873
authored
Jun 25, 2021
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
年资职称绩效占比与工作量绩效占比异常值验证
parent
33a5c19d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
6 deletions
+28
-6
performance/Performance.Api/Controllers/SecondAllotController.cs
+18
-6
performance/Performance.Services/UnitTypeUtil.cs
+10
-0
No files found.
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
056d7873
...
...
@@ -602,11 +602,17 @@ public ApiResponse RedistributionCheck([FromBody] SecondComputeDto request)
if
((
ComputeMode
)
request
.
ComputeMode
!=
ComputeMode
.
NotCalculate
)
{
var
workloadGroups
=
_redistributionService
.
GetTopWorkloadBodyGroups
(
loads
);
var
workloadRatio
=
workloadGroups
.
Select
(
w
=>
request
.
Head
.
GetValue
(
$"Workload_Ratio_
{
w
.
Name
}
"
,
0
m
));
if
(
workloadRatio
.
Any
(
w
=>
w
>
1
||
w
<
0
))
throw
new
PerformanceException
(
"工作量绩效占比存在异常值!"
);
var
seniorityTitlesAccountedPerformance
=
request
.
Head
.
GetValue
(
nameof
(
ag_headsource
.
SeniorityTitlesAccountedPerformance
),
0
m
);
var
workloadRatio
=
workloadGroups
.
Sum
(
w
=>
request
.
Head
.
GetValue
(
$"Workload_Ratio_
{
w
.
Name
}
"
,
0
m
));
if
(
seniorityTitlesAccountedPerformance
+
workloadRatio
>
1
)
if
(
seniorityTitlesAccountedPerformance
>
1
||
seniorityTitlesAccountedPerformance
<
0
)
throw
new
PerformanceException
(
"年资职称绩效占比值异常!"
);
if
(
seniorityTitlesAccountedPerformance
+
workloadRatio
.
Sum
()
>
1
)
throw
new
PerformanceException
(
"年资职称绩效占比与工作量绩效占比总和,超过100%!"
);
else
if
(
seniorityTitlesAccountedPerformance
+
workloadRatio
<
1
)
else
if
(
seniorityTitlesAccountedPerformance
+
workloadRatio
.
Sum
()
<
1
)
throw
new
PerformanceException
(
"年资职称绩效占比与工作量绩效占比总和,不足100%!"
);
}
// 二次分配人员信息 校验
...
...
@@ -653,11 +659,17 @@ public ApiResponse RedistributionCompute([FromBody] SecondComputeDto request)
if
((
ComputeMode
)
request
.
ComputeMode
!=
ComputeMode
.
NotCalculate
)
{
var
workloadRatio
=
workloadGroups
.
Select
(
w
=>
request
.
Head
.
GetValue
(
$"Workload_Ratio_
{
w
.
Name
}
"
,
0
m
));
if
(
workloadRatio
.
Any
(
w
=>
w
>
1
||
w
<
0
))
throw
new
PerformanceException
(
"工作量绩效占比存在异常值!"
);
var
seniorityTitlesAccountedPerformance
=
request
.
Head
.
GetValue
(
nameof
(
ag_headsource
.
SeniorityTitlesAccountedPerformance
),
0
m
);
var
workloadRatio
=
workloadGroups
.
Sum
(
w
=>
request
.
Head
.
GetValue
(
$"Workload_Ratio_
{
w
.
Name
}
"
,
0
m
));
if
(
seniorityTitlesAccountedPerformance
+
workloadRatio
>
1
)
if
(
seniorityTitlesAccountedPerformance
>
1
||
seniorityTitlesAccountedPerformance
<
0
)
throw
new
PerformanceException
(
"年资职称绩效占比值异常!"
);
if
(
seniorityTitlesAccountedPerformance
+
workloadRatio
.
Sum
()
>
1
)
throw
new
PerformanceException
(
"年资职称绩效占比与工作量绩效占比总和,超过100%!"
);
else
if
(
seniorityTitlesAccountedPerformance
+
workloadRatio
<
1
)
else
if
(
seniorityTitlesAccountedPerformance
+
workloadRatio
.
Sum
()
<
1
)
throw
new
PerformanceException
(
"年资职称绩效占比与工作量绩效占比总和,不足100%!"
);
}
...
...
performance/Performance.Services/UnitTypeUtil.cs
View file @
056d7873
...
...
@@ -25,5 +25,15 @@ public static bool IsOffice(string unit)
{
return
!
string
.
IsNullOrEmpty
(
unit
)
&&
(
unit
==
"行政后勤"
||
unit
==
"行政工勤"
);
}
/// <summary>
/// 核算单元类型是否相同
/// </summary>
/// <param name="left"></param>
/// <returns></returns>
public
static
bool
IsEqualsUnitType
(
string
left
,
string
right
)
{
return
left
?.
Replace
(
"行政后勤"
,
"行政工勤"
)
==
right
?.
Replace
(
"行政后勤"
,
"行政工勤"
);
}
}
}
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