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
0a9f49ee
Commit
0a9f49ee
authored
Jan 29, 2021
by
hzc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改趋好趋坏的运算逻辑(全部换本期-同期
parent
a02be52e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
19 deletions
+32
-19
IndScorecardService.java
...ile/indicators/service/hytobacco/IndScorecardService.java
+3
-3
IndicatorsValueService.java
.../indicators/service/hytobacco/IndicatorsValueService.java
+21
-13
IndexReportService.java
...ymobile/indicators/service/report/IndexReportService.java
+5
-1
IndicatorsReportService.java
...le/indicators/service/report/IndicatorsReportService.java
+3
-2
No files found.
src/main/java/com/keymobile/indicators/service/hytobacco/IndScorecardService.java
View file @
0a9f49ee
...
@@ -199,13 +199,13 @@ public class IndScorecardService {
...
@@ -199,13 +199,13 @@ public class IndScorecardService {
//如果是反向指标(越小越好)
//如果是反向指标(越小越好)
if
(
"1"
.
equals
(
acsType
))
{
if
(
"1"
.
equals
(
acsType
))
{
if
(
Double
.
valueOf
(
value
)<
Double
.
valueOf
(
average
))
{
//大于组内平均分
if
(
Double
.
valueOf
(
value
)<
=
Double
.
valueOf
(
average
))
{
//大于组内平均分
baseScoreValue
+=
scoreCard
.
getMoreAverage
();
baseScoreValue
+=
scoreCard
.
getMoreAverage
();
}
else
{
}
else
{
baseScoreValue
-=
scoreCard
.
getLessAverage
();
baseScoreValue
-=
scoreCard
.
getLessAverage
();
}
}
}
else
{
//正向指标,越大越好
}
else
{
//正向指标,越大越好
if
(
Double
.
valueOf
(
value
)>
Double
.
valueOf
(
average
))
{
//大于组内平均分
if
(
Double
.
valueOf
(
value
)>
=
Double
.
valueOf
(
average
))
{
//大于组内平均分
baseScoreValue
+=
scoreCard
.
getMoreAverage
();
baseScoreValue
+=
scoreCard
.
getMoreAverage
();
}
else
{
}
else
{
baseScoreValue
-=
scoreCard
.
getLessAverage
();
baseScoreValue
-=
scoreCard
.
getLessAverage
();
...
@@ -366,7 +366,7 @@ public class IndScorecardService {
...
@@ -366,7 +366,7 @@ public class IndScorecardService {
}
}
}
else
{
}
else
{
//获取单位同期比率
//获取单位同期比率
String
rate
=
CalculateUtils
.
calGowth
(
current
.
getValue
(),
same
.
getValue
(),
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"
.
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
)
{
//同比趋好
...
...
src/main/java/com/keymobile/indicators/service/hytobacco/IndicatorsValueService.java
View file @
0a9f49ee
...
@@ -500,28 +500,36 @@ public class IndicatorsValueService {
...
@@ -500,28 +500,36 @@ public class IndicatorsValueService {
DriveIndDef
driveIndDef
=
driveIndDefService
.
getById
(
indId
);
DriveIndDef
driveIndDef
=
driveIndDefService
.
getById
(
indId
);
rate
=
CalculateUtils
.
calGowth
(
currentValue
,
rate
=
CalculateUtils
.
calGowth
(
currentValue
,
sameValue
,
driveIndDef
.
getGrowCalType
());
sameValue
,
driveIndDef
.
getGrowCalType
());
String
rateTmp
=
rate
;
if
(!
"0"
.
equals
(
driveIndDef
.
getGrowCalType
())){
rateTmp
=
CalculateUtils
.
calGowth
(
currentValue
,
sameValue
,
"0"
);
}
XSSFRow
row
=
excelSheet
.
getRow
(
rowMap
.
get
(
indId
));
XSSFRow
row
=
excelSheet
.
getRow
(
rowMap
.
get
(
indId
));
row
.
getCell
(
3
).
setCellValue
(
currentValue
);
row
.
getCell
(
3
).
setCellValue
(
currentValue
);
row
.
getCell
(
4
).
setCellValue
(
sameValue
);
row
.
getCell
(
4
).
setCellValue
(
sameValue
);
row
.
getCell
(
5
).
setCellValue
(
rate
);
row
.
getCell
(
5
).
setCellValue
(
rate
);
String
acsType
=
driveIndDef
.
getIndRule
();
String
acsType
=
driveIndDef
.
getIndRule
();
if
(
"0"
.
equals
(
acsType
))
{
if
(
StringUtils
.
isNotBlank
(
rateTmp
)&&!
rateTmp
.
equals
(
"0.0000"
)){
if
(
Double
.
valueOf
(
rate
)>
0
)
{
if
(
"0"
.
equals
(
acsType
))
{
row
.
getCell
(
6
).
setCellValue
(
"同比趋好"
);
if
(
Double
.
valueOf
(
rateTmp
)>
0
)
{
}
else
{
row
.
getCell
(
6
).
setCellValue
(
"同比趋好"
);
row
.
getCell
(
6
).
setCellStyle
(
cellStyle
);
}
else
{
row
.
getCell
(
6
).
setCellValue
(
"同比趋差"
);
row
.
getCell
(
6
).
setCellStyle
(
cellStyle
);
}
row
.
getCell
(
6
).
setCellValue
(
"同比趋差"
);
}
else
{
}
if
(
Double
.
valueOf
(
rate
)>
0
)
{
row
.
getCell
(
6
).
setCellStyle
(
cellStyle
);
row
.
getCell
(
6
).
setCellValue
(
"同比趋差"
);
}
else
{
}
else
{
row
.
getCell
(
6
).
setCellValue
(
"同比趋好"
);
if
(
Double
.
valueOf
(
rateTmp
)>
0
)
{
row
.
getCell
(
6
).
setCellStyle
(
cellStyle
);
row
.
getCell
(
6
).
setCellValue
(
"同比趋差"
);
}
else
{
row
.
getCell
(
6
).
setCellValue
(
"同比趋好"
);
}
}
}
}
}
}
}
FileOutputStream
out
=
new
FileOutputStream
(
"D://indicatorsFile/file3.xlsx"
);
FileOutputStream
out
=
new
FileOutputStream
(
"D://indicatorsFile/file3.xlsx"
);
out
.
flush
();
out
.
flush
();
...
...
src/main/java/com/keymobile/indicators/service/report/IndexReportService.java
View file @
0a9f49ee
...
@@ -62,7 +62,11 @@ public class IndexReportService {
...
@@ -62,7 +62,11 @@ public class IndexReportService {
String
rate
=
CalculateUtils
.
calGowth
(
calResults
.
get
(
0
).
getValue
(),
String
rate
=
CalculateUtils
.
calGowth
(
calResults
.
get
(
0
).
getValue
(),
sameResult
.
getValue
(),
growCalType
);
sameResult
.
getValue
(),
growCalType
);
indMap
.
put
(
"rate"
,
rate
);
indMap
.
put
(
"rate"
,
rate
);
if
(
StringUtils
.
isNotBlank
(
indRule
)
&&
StringUtils
.
isNotBlank
(
rate
))
{
String
rateTmp
=
rate
;
if
(!
"0"
.
equals
(
growCalType
)){
rateTmp
=
CalculateUtils
.
calGowth
(
calResults
.
get
(
0
).
getValue
(),
sameResult
.
getValue
(),
"0"
);
}
if
(
StringUtils
.
isNotBlank
(
indRule
)
&&
StringUtils
.
isNotBlank
(
rateTmp
)&&!
"0.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/service/report/IndicatorsReportService.java
View file @
0a9f49ee
...
@@ -815,14 +815,15 @@ public class IndicatorsReportService {
...
@@ -815,14 +815,15 @@ public class IndicatorsReportService {
if
(
Double
.
parseDouble
(
currentActualAverage
.
getValue
())>
if
(
Double
.
parseDouble
(
currentActualAverage
.
getValue
())>
Double
.
parseDouble
(
sameActualAverage
.
getValue
()))
{
Double
.
parseDouble
(
sameActualAverage
.
getValue
()))
{
indReportData
.
setTrend
(
"1"
);
//趋差
indReportData
.
setTrend
(
"1"
);
//趋差
}
else
{
}
else
if
(
Double
.
parseDouble
(
currentActualAverage
.
getValue
())<
Double
.
parseDouble
(
sameActualAverage
.
getValue
()))
{
indReportData
.
setTrend
(
"0"
);
indReportData
.
setTrend
(
"0"
);
}
}
}
else
{
//其他当正向处理
}
else
{
//其他当正向处理
if
(
Double
.
parseDouble
(
currentActualAverage
.
getValue
())>
if
(
Double
.
parseDouble
(
currentActualAverage
.
getValue
())>
Double
.
parseDouble
(
sameActualAverage
.
getValue
()))
{
Double
.
parseDouble
(
sameActualAverage
.
getValue
()))
{
indReportData
.
setTrend
(
"0"
);
//趋好
indReportData
.
setTrend
(
"0"
);
//趋好
}
else
{
}
else
if
(
Double
.
parseDouble
(
currentActualAverage
.
getValue
())<
Double
.
parseDouble
(
sameActualAverage
.
getValue
())){
indReportData
.
setTrend
(
"1"
);
indReportData
.
setTrend
(
"1"
);
}
}
}
}
...
...
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