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
1038ba8a
Commit
1038ba8a
authored
Aug 10, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
指标评分规则公式综合评分添加平均值函数计算和综合评分分数上限属性
parent
a368df76
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
IndScorecard.java
...obile/indicators/model/entity/scorecard/IndScorecard.java
+3
-0
IndScorecardService.java
...ile/indicators/service/hytobacco/IndScorecardService.java
+14
-1
No files found.
src/main/java/com/keymobile/indicators/model/entity/scorecard/IndScorecard.java
View file @
1038ba8a
...
@@ -24,6 +24,9 @@ public class IndScorecard {
...
@@ -24,6 +24,9 @@ public class IndScorecard {
private
String
cardName
;
private
String
cardName
;
private
String
cardDesc
;
private
String
cardDesc
;
//author:zhangkb time:2020-8-10 desc:综合评价添加上限分数
private
Double
compLimitScore
;
private
String
scoreType
;
//综合评分类型 0:定义 1:公式
private
String
scoreType
;
//综合评分类型 0:定义 1:公式
//定义综合评价
//定义综合评价
private
Double
indBaseScore
;
//基础分
private
Double
indBaseScore
;
//基础分
...
...
src/main/java/com/keymobile/indicators/service/hytobacco/IndScorecardService.java
View file @
1038ba8a
...
@@ -244,6 +244,12 @@ public class IndScorecardService {
...
@@ -244,6 +244,12 @@ public class IndScorecardService {
}
}
}
}
}
}
//判断是否有设置综合评分分数上限,有的话判断上限分和实际分
if
(
scoreCard
.
getCompLimitScore
()!=
null
)
{
if
(
baseScoreValue
>
scoreCard
.
getCompLimitScore
())
{
baseScoreValue
=
scoreCard
.
getCompLimitScore
();
}
}
}
}
}
}
//改善提升
//改善提升
...
@@ -368,7 +374,7 @@ public class IndScorecardService {
...
@@ -368,7 +374,7 @@ public class IndScorecardService {
List
<
DriveIndCalResultDef
>
currentDriveResult
,
String
acsType
)
{
List
<
DriveIndCalResultDef
>
currentDriveResult
,
String
acsType
)
{
double
value
=
0
;
double
value
=
0
;
Map
<
String
,
Object
>
env
=
Maps
.
newHashMap
();
Map
<
String
,
Object
>
env
=
Maps
.
newHashMap
();
//解析X,MIN,MAX
//解析X,MIN,MAX
,AVG
if
(
formula
.
indexOf
(
"X"
)>=
0
)
{
if
(
formula
.
indexOf
(
"X"
)>=
0
)
{
//获取指标值
//获取指标值
double
x
=
Double
.
valueOf
(
resultObject
.
getValue
());
double
x
=
Double
.
valueOf
(
resultObject
.
getValue
());
...
@@ -394,6 +400,13 @@ public class IndScorecardService {
...
@@ -394,6 +400,13 @@ public class IndScorecardService {
}
}
env
.
put
(
"MAX"
,
max
);
env
.
put
(
"MAX"
,
max
);
}
}
if
(
formula
.
indexOf
(
"AVG"
)>=
0
)
{
//获取组内平均值
double
avg
=
0
;
if
(!
currentDriveResult
.
isEmpty
())
{
avg
=
Double
.
valueOf
(
currentDriveResult
.
get
(
0
).
getAverage
());
}
env
.
put
(
"AVG"
,
avg
);
}
if
(!
env
.
isEmpty
())
{
if
(!
env
.
isEmpty
())
{
value
=
(
Double
)
AviatorEvaluator
.
execute
(
formula
,
env
);
value
=
(
Double
)
AviatorEvaluator
.
execute
(
formula
,
env
);
}
}
...
...
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