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
58565a04
Commit
58565a04
authored
Jul 31, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改单位计算方法精确4位小数
parent
392695b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
ScoreRuleService.java
...mobile/indicators/service/hytobacco/ScoreRuleService.java
+12
-5
No files found.
src/main/java/com/keymobile/indicators/service/hytobacco/ScoreRuleService.java
View file @
58565a04
package
com
.
keymobile
.
indicators
.
service
.
hytobacco
;
package
com
.
keymobile
.
indicators
.
service
.
hytobacco
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
...
@@ -254,11 +255,17 @@ public class ScoreRuleService {
...
@@ -254,11 +255,17 @@ public class ScoreRuleService {
//得分类型:0 指标值直接参与计算
//得分类型:0 指标值直接参与计算
if
(
"0"
.
equals
(
scoreRule
.
getScoreType
())
||
if
(
"0"
.
equals
(
scoreRule
.
getScoreType
())
||
"2"
.
equals
(
scoreRule
.
getScoreType
()))
{
"2"
.
equals
(
scoreRule
.
getScoreType
()))
{
objResult
.
setScoreValue
(
AviatorEvaluator
.
execute
(
calFormula
).
toString
());
String
scoreValue
=
String
.
format
(
"%.4f"
,
new
BigDecimal
((
Double
)
AviatorEvaluator
.
execute
(
calFormula
)));
objResult
.
setScoreValue
(
scoreValue
);
objResult
.
setImproveValue
(
"0.0"
);
objResult
.
setImproveValue
(
"0.0"
);
}
else
if
(
"1"
.
equals
(
scoreRule
.
getScoreType
()))
{
//1 指标得分分数参与计算(综合评分和改善提升分开算)
}
else
if
(
"1"
.
equals
(
scoreRule
.
getScoreType
()))
{
//1 指标得分分数参与计算(综合评分和改善提升分开算)
objResult
.
setScoreValue
(
AviatorEvaluator
.
execute
(
calFormula
).
toString
());
String
scoreValue
=
String
.
format
(
"%.4f"
,
objResult
.
setImproveValue
(
AviatorEvaluator
.
execute
(
improveCalFormula
).
toString
());
new
BigDecimal
((
Double
)
AviatorEvaluator
.
execute
(
calFormula
)));
String
improveValue
=
String
.
format
(
"%.4f"
,
new
BigDecimal
((
Double
)
AviatorEvaluator
.
execute
(
improveCalFormula
)));
objResult
.
setScoreValue
(
scoreValue
);
objResult
.
setImproveValue
(
improveValue
);
}
}
}
}
return
objResult
;
return
objResult
;
...
@@ -292,8 +299,8 @@ public class ScoreRuleService {
...
@@ -292,8 +299,8 @@ public class ScoreRuleService {
}
}
}
}
}
}
objResult
.
setScoreValue
(
String
.
valueOf
(
scoreValue
));
objResult
.
setScoreValue
(
String
.
format
(
"%.4f"
,
new
BigDecimal
(
scoreValue
)
));
objResult
.
setImproveValue
(
String
.
valueOf
(
improveValue
));
objResult
.
setImproveValue
(
String
.
format
(
"%.4f"
,
new
BigDecimal
(
improveValue
)
));
return
objResult
;
return
objResult
;
}
}
...
...
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