Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
indicators
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangkb
indicators
Commits
b738861d
Commit
b738861d
authored
Aug 03, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单位评分规则添加指标总数计算逻辑
parent
0d97c453
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
9 deletions
+22
-9
ScoreRule.java
...obile/indicators/model/entity/objscorerule/ScoreRule.java
+1
-1
ScoreRuleService.java
...mobile/indicators/service/hytobacco/ScoreRuleService.java
+21
-8
No files found.
src/main/java/com/keymobile/indicators/model/entity/objscorerule/ScoreRule.java
View file @
b738861d
...
...
@@ -24,7 +24,7 @@ public class ScoreRule {
private
String
ruleName
;
//规则名称
private
String
scoreType
;
//得分类型:0 指标值直接参与计算 1 指标得分分数参与计算(综合评分和改善提升分开算) 2指标得分分数参与计算(指标分数=综合+改善)
private
String
calType
;
//计算类型:0 计算组内所有考核指标平均数 1 根据目录类别分类算平均分后根据权重计算考核指标 2单个指标权重计算
private
String
calType
;
//计算类型:0 计算组内所有考核指标平均数 1 根据目录类别分类算平均分后根据权重计算考核指标 2单个指标权重计算
3指标总得分
private
String
indTypeWeightsJson
;
private
List
<
IndTypeWeight
>
indTypeWeights
=
new
ArrayList
<>();
//目录类别权重数据
...
...
src/main/java/com/keymobile/indicators/service/hytobacco/ScoreRuleService.java
View file @
b738861d
...
...
@@ -121,9 +121,9 @@ public class ScoreRuleService {
}
}
//计算组内考核指标平均值
private
ObjScoreCalResult
calGroupIndAverage
(
ObjScoreCalResult
objResult
,
ScoreRule
scoreRule
,
List
<
String
>
indIds
,
String
compareObj
,
int
date
){
//计算组内考核指标平均值
或者总和 type:0 计算组内所有考核指标平均数 3指标总得分
private
ObjScoreCalResult
calGroupIndAverage
OrSum
(
ObjScoreCalResult
objResult
,
ScoreRule
scoreRule
,
List
<
String
>
indIds
,
String
compareObj
,
int
date
,
String
type
){
objResult
.
setCompareObj
(
compareObj
);
objResult
.
setScoreValue
(
"0.0"
);
objResult
.
setImproveValue
(
"0.0"
);
...
...
@@ -175,12 +175,22 @@ public class ScoreRuleService {
}
}
}
//计算平均值
String
averageValue
=
CalculateUtils
.
averageValue
(
values
,
1
);
String
averageValue
=
"0.0"
;
String
averageImproveValue
=
"0.0"
;
if
(
"0"
.
equals
(
type
))
{
//计算平均值
averageValue
=
CalculateUtils
.
averageValue
(
values
,
1
);
}
if
(
"3"
.
equals
(
type
)){
//计算总和
averageValue
=
CalculateUtils
.
sumValue
(
values
);
}
if
(!
improveValues
.
isEmpty
())
{
if
(
"0"
.
equals
(
type
))
{
averageImproveValue
=
CalculateUtils
.
averageValue
(
improveValues
,
1
);
}
if
(
"3"
.
equals
(
type
)){
averageImproveValue
=
CalculateUtils
.
sumValue
(
improveValues
);
}
}
objResult
.
setScoreValue
(
averageValue
);
objResult
.
setImproveValue
(
averageImproveValue
);
}
...
...
@@ -376,14 +386,17 @@ public class ScoreRuleService {
}
//计算类型:0 计算组内所有考核指标平均数
if
(
"0"
.
equals
(
scoreRule
.
getCalType
()))
{
objScoreCalResult
=
this
.
calGroupIndAverage
(
objScoreCalResult
,
scoreRule
,
indIds
,
compareObj
,
date
);
objScoreCalResult
=
this
.
calGroupIndAverage
OrSum
(
objScoreCalResult
,
scoreRule
,
indIds
,
compareObj
,
date
,
scoreRule
.
getCalType
()
);
}
else
if
(
"1"
.
equals
(
scoreRule
.
getCalType
()))
{
//1 根据目录类别分类算平均分后根据权重计算考核指标
objScoreCalResult
=
this
.
calIndCatalogTypeAverage
(
objScoreCalResult
,
scoreRule
,
compareObj
,
date
);
}
else
{
//2单个指标权重计算
}
else
if
(
"2"
.
equals
(
scoreRule
.
getCalType
()))
{
//2单个指标权重计算
objScoreCalResult
=
this
.
calSingleIndWeight
(
objScoreCalResult
,
scoreRule
,
compareObj
,
date
);
}
else
{
//3:指标总得分
objScoreCalResult
=
this
.
calGroupIndAverageOrSum
(
objScoreCalResult
,
scoreRule
,
indIds
,
compareObj
,
date
,
scoreRule
.
getCalType
());
}
objScoreCalResult
.
setCompareId
(
compareId
);
...
...
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