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
6354b693
Commit
6354b693
authored
Mar 18, 2021
by
hzc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增综合下限,改善下限
parent
84eb110e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
IndScorecard.java
...obile/indicators/model/entity/scorecard/IndScorecard.java
+5
-0
IndScorecardService.java
...ile/indicators/service/hytobacco/IndScorecardService.java
+15
-1
No files found.
src/main/java/com/keymobile/indicators/model/entity/scorecard/IndScorecard.java
View file @
6354b693
...
@@ -64,4 +64,9 @@ public class IndScorecard {
...
@@ -64,4 +64,9 @@ public class IndScorecard {
private
String
sectionFormula
;
//区间公式表达式
private
String
sectionFormula
;
//区间公式表达式
private
Double
compLimitFloorScore
;
//综合评价下限
private
Double
limitFloorScore
;
//改善提升下限
}
}
src/main/java/com/keymobile/indicators/service/hytobacco/IndScorecardService.java
View file @
6354b693
...
@@ -278,6 +278,7 @@ public class IndScorecardService {
...
@@ -278,6 +278,7 @@ public class IndScorecardService {
}
}
}
}
if
(
StringUtils
.
isNotBlank
(
scoreCard
.
getOtherCalFormula
()))
{
if
(
StringUtils
.
isNotBlank
(
scoreCard
.
getOtherCalFormula
()))
{
scoreCard
.
setOtherCalFormula
(
scoreCard
.
getOtherCalFormula
().
replace
(
"F(x)"
,
"X"
));
baseScoreValue
=
this
.
getValueFromFormula
(
baseScoreValue
=
this
.
getValueFromFormula
(
scoreCard
.
getOtherCalFormula
(),
currentValue
,
scoreCard
.
getOtherCalFormula
(),
currentValue
,
sectionScores
,
acsType
);
sectionScores
,
acsType
);
...
@@ -290,6 +291,12 @@ public class IndScorecardService {
...
@@ -290,6 +291,12 @@ public class IndScorecardService {
baseScoreValue
=
scoreCard
.
getCompLimitScore
();
baseScoreValue
=
scoreCard
.
getCompLimitScore
();
}
}
}
}
//判断是否有设置综合评分分数下限,有的话判断下限分和实际分
if
(
scoreCard
.
getCompLimitFloorScore
()!=
null
&&
scoreCard
.
getCompLimitFloorScore
()!=
0
){
if
(
baseScoreValue
<
scoreCard
.
getCompLimitFloorScore
()){
baseScoreValue
=
scoreCard
.
getCompLimitFloorScore
();
}
}
}
}
}
}
//改善提升
//改善提升
...
@@ -315,11 +322,18 @@ public class IndScorecardService {
...
@@ -315,11 +322,18 @@ public class IndScorecardService {
if
(
improveBaseScore
!=
null
&&
improveBaseScore
!=
0
){
if
(
improveBaseScore
!=
null
&&
improveBaseScore
!=
0
){
improveScore
+=
improveBaseScore
;
improveScore
+=
improveBaseScore
;
}
}
//改善上限
if
(
scoreCard
.
getLimitScore
()!=
null
)
{
if
(
scoreCard
.
getLimitScore
()!=
null
)
{
if
(
improveScore
>
scoreCard
.
getLimitScore
())
{
if
(
improveScore
>
scoreCard
.
getLimitScore
())
{
improveScore
=
scoreCard
.
getLimitScore
();
improveScore
=
scoreCard
.
getLimitScore
();
}
}
}
}
//改善下限
if
(
scoreCard
.
getLimitFloorScore
()!=
null
&&
scoreCard
.
getLimitFloorScore
()!=
0
){
if
(
improveScore
<
scoreCard
.
getLimitFloorScore
())
{
improveScore
=
scoreCard
.
getLimitFloorScore
();
}
}
indImproveScoreValue
=
String
.
format
(
"%.8f"
,
new
BigDecimal
(
improveScore
));
indImproveScoreValue
=
String
.
format
(
"%.8f"
,
new
BigDecimal
(
improveScore
));
result
.
put
(
"improveScore"
,
indImproveScoreValue
);
result
.
put
(
"improveScore"
,
indImproveScoreValue
);
}
else
{
}
else
{
...
@@ -384,7 +398,7 @@ public class IndScorecardService {
...
@@ -384,7 +398,7 @@ public class IndScorecardService {
double
value
=
Double
.
parseDouble
(
valueTmp
);
double
value
=
Double
.
parseDouble
(
valueTmp
);
double
returnValue
=
0
;
double
returnValue
=
0
;
for
(
String
sectionTmp
:
sections
)
{
for
(
String
sectionTmp
:
sections
)
{
section
=
sectionTmp
.
split
(
"
,
"
);
section
=
sectionTmp
.
split
(
"
:
"
);
start
=
Double
.
parseDouble
(
section
[
0
]);
start
=
Double
.
parseDouble
(
section
[
0
]);
startEq
=
"1"
.
equals
(
section
[
1
])?
true
:
false
;
startEq
=
"1"
.
equals
(
section
[
1
])?
true
:
false
;
end
=
Double
.
parseDouble
(
section
[
3
]);
end
=
Double
.
parseDouble
(
section
[
3
]);
...
...
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