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
af0bcaa0
Commit
af0bcaa0
authored
Feb 02, 2021
by
hzc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
过滤条件0.0000换0.00000000
parent
e7034c99
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
11 deletions
+11
-11
IndScorecardService.java
...ile/indicators/service/hytobacco/IndScorecardService.java
+1
-1
IndicatorsValueService.java
.../indicators/service/hytobacco/IndicatorsValueService.java
+3
-3
ShortboardRuleService.java
...e/indicators/service/hytobacco/ShortboardRuleService.java
+5
-5
IndexReportService.java
...ymobile/indicators/service/report/IndexReportService.java
+1
-1
CalculateUtils.java
...n/java/com/keymobile/indicators/utils/CalculateUtils.java
+1
-1
No files found.
src/main/java/com/keymobile/indicators/service/hytobacco/IndScorecardService.java
View file @
af0bcaa0
...
@@ -400,7 +400,7 @@ public class IndScorecardService {
...
@@ -400,7 +400,7 @@ public class IndScorecardService {
}
else
{
}
else
{
//获取单位同期比率
//获取单位同期比率
String
rate
=
CalculateUtils
.
calGowth
(
current
.
getValue
(),
same
.
getValue
(),
"0"
);
//growCalType
String
rate
=
CalculateUtils
.
calGowth
(
current
.
getValue
(),
same
.
getValue
(),
"0"
);
//growCalType
if
(
StringUtils
.
isNotBlank
(
rate
)&&!
"0.0000"
.
equals
(
rate
)&&!
"NaN"
.
equals
(
rate
)&&!
"Infinite"
.
equals
(
rate
))
{
if
(
StringUtils
.
isNotBlank
(
rate
)&&!
"0.0000
0000
"
.
equals
(
rate
)&&!
"NaN"
.
equals
(
rate
)&&!
"Infinite"
.
equals
(
rate
))
{
if
(
"0"
.
equals
(
acsType
))
{
if
(
"0"
.
equals
(
acsType
))
{
if
(
Double
.
valueOf
(
rate
)>
0
)
{
//同比趋好
if
(
Double
.
valueOf
(
rate
)>
0
)
{
//同比趋好
//加减分操作 0:加分 1:减分
//加减分操作 0:加分 1:减分
...
...
src/main/java/com/keymobile/indicators/service/hytobacco/IndicatorsValueService.java
View file @
af0bcaa0
...
@@ -512,7 +512,7 @@ public class IndicatorsValueService {
...
@@ -512,7 +512,7 @@ public class IndicatorsValueService {
row
.
getCell
(
5
).
setCellValue
(
rate
);
row
.
getCell
(
5
).
setCellValue
(
rate
);
String
acsType
=
driveIndDef
.
getIndRule
();
String
acsType
=
driveIndDef
.
getIndRule
();
if
(
StringUtils
.
isNotBlank
(
rateTmp
)&&!
rateTmp
.
equals
(
"0.0000"
)){
if
(
StringUtils
.
isNotBlank
(
rateTmp
)&&!
rateTmp
.
equals
(
"0.0000
0000
"
)){
if
(
"0"
.
equals
(
acsType
))
{
if
(
"0"
.
equals
(
acsType
))
{
if
(
Double
.
valueOf
(
rateTmp
)>
0
)
{
if
(
Double
.
valueOf
(
rateTmp
)>
0
)
{
row
.
getCell
(
6
).
setCellValue
(
"同比趋好"
);
row
.
getCell
(
6
).
setCellValue
(
"同比趋好"
);
...
@@ -806,7 +806,7 @@ public class IndicatorsValueService {
...
@@ -806,7 +806,7 @@ public class IndicatorsValueService {
while
(
it
.
hasNext
()){
while
(
it
.
hasNext
()){
DriveIndCalResultDef
driveCalResult
=
it
.
next
();
DriveIndCalResultDef
driveCalResult
=
it
.
next
();
if
(
"NaN"
.
equals
(
driveCalResult
.
getValue
())
||
"Infinite"
.
equals
(
driveCalResult
.
getValue
())
if
(
"NaN"
.
equals
(
driveCalResult
.
getValue
())
||
"Infinite"
.
equals
(
driveCalResult
.
getValue
())
||
"0.0000"
.
equals
(
driveCalResult
.
getValue
())||
"0"
.
equals
(
driveCalResult
.
getValue
())){
||
"0.0000
0000
"
.
equals
(
driveCalResult
.
getValue
())||
"0"
.
equals
(
driveCalResult
.
getValue
())){
it
.
remove
();
it
.
remove
();
}
}
}
}
...
@@ -832,7 +832,7 @@ public class IndicatorsValueService {
...
@@ -832,7 +832,7 @@ public class IndicatorsValueService {
while
(
sit
.
hasNext
()){
while
(
sit
.
hasNext
()){
DriveIndCalResultDef
driveCalResult
=
sit
.
next
();
DriveIndCalResultDef
driveCalResult
=
sit
.
next
();
if
(
"NaN"
.
equals
(
driveCalResult
.
getValue
())
||
"Infinite"
.
equals
(
driveCalResult
.
getValue
())
if
(
"NaN"
.
equals
(
driveCalResult
.
getValue
())
||
"Infinite"
.
equals
(
driveCalResult
.
getValue
())
||
"0.0000"
.
equals
(
driveCalResult
.
getValue
())||
"0"
.
equals
(
driveCalResult
.
getValue
())){
||
"0.0000
0000
"
.
equals
(
driveCalResult
.
getValue
())||
"0"
.
equals
(
driveCalResult
.
getValue
())){
sit
.
remove
();
sit
.
remove
();
}
}
}
}
...
...
src/main/java/com/keymobile/indicators/service/hytobacco/ShortboardRuleService.java
View file @
af0bcaa0
...
@@ -267,7 +267,7 @@ public class ShortboardRuleService {
...
@@ -267,7 +267,7 @@ public class ShortboardRuleService {
//判断规则选择是大于还是小于
//判断规则选择是大于还是小于
if
(
"0"
.
equals
(
shortboardItem
.
getCalType
()))
{
//大于
if
(
"0"
.
equals
(
shortboardItem
.
getCalType
()))
{
//大于
if
(!
"NaN"
.
equals
(
calResult
.
getValue
())
&&
!
"Infinite"
.
equals
(
calResult
.
getValue
())
if
(!
"NaN"
.
equals
(
calResult
.
getValue
())
&&
!
"Infinite"
.
equals
(
calResult
.
getValue
())
&&
!
"0.0000"
.
equals
(
calResult
.
getValue
())
&&
!
"0"
.
equals
(
calResult
.
getValue
()))
{
&&
!
"0.0000
0000
"
.
equals
(
calResult
.
getValue
())
&&
!
"0"
.
equals
(
calResult
.
getValue
()))
{
//判断有没有实际的平均值
//判断有没有实际的平均值
if
(
calResult
.
getActualAverage
()!=
null
&&!
"0.0"
.
equals
(
calResult
.
getActualAverage
()))
{
if
(
calResult
.
getActualAverage
()!=
null
&&!
"0.0"
.
equals
(
calResult
.
getActualAverage
()))
{
...
@@ -284,7 +284,7 @@ public class ShortboardRuleService {
...
@@ -284,7 +284,7 @@ public class ShortboardRuleService {
}
}
}
else
{
//小于
}
else
{
//小于
if
(!
"NaN"
.
equals
(
calResult
.
getValue
())
&&
!
"Infinite"
.
equals
(
calResult
.
getValue
())
if
(!
"NaN"
.
equals
(
calResult
.
getValue
())
&&
!
"Infinite"
.
equals
(
calResult
.
getValue
())
&&
!
"0.0000"
.
equals
(
calResult
.
getValue
())
&&
!
"0"
.
equals
(
calResult
.
getValue
()))
{
&&
!
"0.0000
0000
"
.
equals
(
calResult
.
getValue
())
&&
!
"0"
.
equals
(
calResult
.
getValue
()))
{
//判断有没有实际的平均值
//判断有没有实际的平均值
if
(
calResult
.
getActualAverage
()!=
null
&&!
"0.0"
.
equals
(
calResult
.
getActualAverage
()))
{
if
(
calResult
.
getActualAverage
()!=
null
&&!
"0.0"
.
equals
(
calResult
.
getActualAverage
()))
{
if
(
Double
.
parseDouble
(
calResult
.
getValue
())
<
if
(
Double
.
parseDouble
(
calResult
.
getValue
())
<
...
@@ -376,7 +376,7 @@ public class ShortboardRuleService {
...
@@ -376,7 +376,7 @@ public class ShortboardRuleService {
if
(
maxValue
!=
null
&&
StringUtils
.
isNotBlank
(
shortboardItem
.
getValue
()))
{
if
(
maxValue
!=
null
&&
StringUtils
.
isNotBlank
(
shortboardItem
.
getValue
()))
{
for
(
DriveIndCalResultDef
calResult
:
calResults
)
{
for
(
DriveIndCalResultDef
calResult
:
calResults
)
{
if
(!
"NaN"
.
equals
(
calResult
.
getValue
())
&&
!
"Infinite"
.
equals
(
calResult
.
getValue
())
if
(!
"NaN"
.
equals
(
calResult
.
getValue
())
&&
!
"Infinite"
.
equals
(
calResult
.
getValue
())
&&
!
"0.0000"
.
equals
(
calResult
.
getValue
())
&&
!
"0"
.
equals
(
calResult
.
getValue
()))
{
&&
!
"0.0000
0000
"
.
equals
(
calResult
.
getValue
())
&&
!
"0"
.
equals
(
calResult
.
getValue
()))
{
if
(
StringUtils
.
isNotBlank
(
shortboardItem
.
getValue
()))
{
if
(
StringUtils
.
isNotBlank
(
shortboardItem
.
getValue
()))
{
//判断是比较差还是百分比
//判断是比较差还是百分比
if
(
"0"
.
equals
(
shortboardItem
.
getAnalysisType
()))
{
//绝对值
if
(
"0"
.
equals
(
shortboardItem
.
getAnalysisType
()))
{
//绝对值
...
@@ -432,7 +432,7 @@ public class ShortboardRuleService {
...
@@ -432,7 +432,7 @@ public class ShortboardRuleService {
if
(
minValue
!=
null
&&
StringUtils
.
isNotBlank
(
shortboardItem
.
getValue
()))
{
if
(
minValue
!=
null
&&
StringUtils
.
isNotBlank
(
shortboardItem
.
getValue
()))
{
for
(
DriveIndCalResultDef
calResult
:
calResults
)
{
for
(
DriveIndCalResultDef
calResult
:
calResults
)
{
if
(!
"NaN"
.
equals
(
calResult
.
getValue
())
&&
!
"Infinite"
.
equals
(
calResult
.
getValue
())
if
(!
"NaN"
.
equals
(
calResult
.
getValue
())
&&
!
"Infinite"
.
equals
(
calResult
.
getValue
())
&&
!
"0.0000"
.
equals
(
calResult
.
getValue
())
&&
!
"0"
.
equals
(
calResult
.
getValue
()))
{
&&
!
"0.0000
0000
"
.
equals
(
calResult
.
getValue
())
&&
!
"0"
.
equals
(
calResult
.
getValue
()))
{
if
(
StringUtils
.
isNotBlank
(
shortboardItem
.
getValue
()))
{
if
(
StringUtils
.
isNotBlank
(
shortboardItem
.
getValue
()))
{
//判断是比较差还是百分比
//判断是比较差还是百分比
if
(
"0"
.
equals
(
shortboardItem
.
getAnalysisType
()))
{
//绝对值
if
(
"0"
.
equals
(
shortboardItem
.
getAnalysisType
()))
{
//绝对值
...
@@ -475,7 +475,7 @@ public class ShortboardRuleService {
...
@@ -475,7 +475,7 @@ public class ShortboardRuleService {
if
(!
calResults
.
isEmpty
())
{
if
(!
calResults
.
isEmpty
())
{
for
(
DriveIndCalResultDef
calResult
:
calResults
)
{
for
(
DriveIndCalResultDef
calResult
:
calResults
)
{
if
(!
"NaN"
.
equals
(
calResult
.
getValue
())
&&
!
"Infinite"
.
equals
(
calResult
.
getValue
())
if
(!
"NaN"
.
equals
(
calResult
.
getValue
())
&&
!
"Infinite"
.
equals
(
calResult
.
getValue
())
&&
!
"0.0000"
.
equals
(
calResult
.
getValue
())
&&
!
"0"
.
equals
(
calResult
.
getValue
()))
{
&&
!
"0.0000
0000
"
.
equals
(
calResult
.
getValue
())
&&
!
"0"
.
equals
(
calResult
.
getValue
()))
{
filterCalResults
.
add
(
calResult
);
filterCalResults
.
add
(
calResult
);
}
}
}
}
...
...
src/main/java/com/keymobile/indicators/service/report/IndexReportService.java
View file @
af0bcaa0
...
@@ -66,7 +66,7 @@ public class IndexReportService {
...
@@ -66,7 +66,7 @@ public class IndexReportService {
if
(!
"0"
.
equals
(
growCalType
)){
if
(!
"0"
.
equals
(
growCalType
)){
rateTmp
=
CalculateUtils
.
calGowth
(
calResults
.
get
(
0
).
getValue
(),
sameResult
.
getValue
(),
"0"
);
rateTmp
=
CalculateUtils
.
calGowth
(
calResults
.
get
(
0
).
getValue
(),
sameResult
.
getValue
(),
"0"
);
}
}
if
(
StringUtils
.
isNotBlank
(
indRule
)
&&
StringUtils
.
isNotBlank
(
rateTmp
)&&!
"0.0000"
.
equals
(
rateTmp
))
{
if
(
StringUtils
.
isNotBlank
(
indRule
)
&&
StringUtils
.
isNotBlank
(
rateTmp
)&&!
"0.0000
0000
"
.
equals
(
rateTmp
))
{
if
(
"0"
.
equals
(
indRule
))
{
//正向
if
(
"0"
.
equals
(
indRule
))
{
//正向
if
(
Double
.
parseDouble
(
rate
)>
0
)
{
if
(
Double
.
parseDouble
(
rate
)>
0
)
{
indMap
.
put
(
"trend"
,
"1"
);
//趋好
indMap
.
put
(
"trend"
,
"1"
);
//趋好
...
...
src/main/java/com/keymobile/indicators/utils/CalculateUtils.java
View file @
af0bcaa0
...
@@ -163,7 +163,7 @@ public class CalculateUtils {
...
@@ -163,7 +163,7 @@ public class CalculateUtils {
for
(
int
i
=
0
;
i
<
values
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
values
.
size
();
i
++)
{
if
(
type
==
0
)
{
if
(
type
==
0
)
{
if
(
"NaN"
.
equals
(
values
.
get
(
i
))
||
"Infinite"
.
equals
(
values
.
get
(
i
))
if
(
"NaN"
.
equals
(
values
.
get
(
i
))
||
"Infinite"
.
equals
(
values
.
get
(
i
))
||
"0.0000"
.
equals
(
values
.
get
(
i
))
||
"0"
.
equals
(
values
.
get
(
i
))
||
"0.0000
0000
"
.
equals
(
values
.
get
(
i
))
||
"0"
.
equals
(
values
.
get
(
i
))
||
StringUtils
.
isBlank
(
values
.
get
(
i
)))
{
||
StringUtils
.
isBlank
(
values
.
get
(
i
)))
{
size
-=
1
;
size
-=
1
;
continue
;
continue
;
...
...
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