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
54eb478d
Commit
54eb478d
authored
Dec 18, 2020
by
hzc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报表四加入同期值
parent
fcb82cf9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
7 deletions
+13
-7
IndicatorsReportFour.java
.../indicators/model/entity/report/IndicatorsReportFour.java
+5
-0
IndicatorsReportService.java
...le/indicators/service/report/IndicatorsReportService.java
+6
-5
IndicatorsReportFourMapper.xml
.../resources/mybatis/mapping/IndicatorsReportFourMapper.xml
+2
-2
No files found.
src/main/java/com/keymobile/indicators/model/entity/report/IndicatorsReportFour.java
View file @
54eb478d
...
@@ -78,6 +78,11 @@ public class IndicatorsReportFour implements Serializable {
...
@@ -78,6 +78,11 @@ public class IndicatorsReportFour implements Serializable {
private
String
value
;
private
String
value
;
/**
/**
* 同期值
*/
@Column
(
name
=
"same_value"
)
private
String
sameValue
;
/**
* 平均值
* 平均值
*/
*/
@Column
(
name
=
"average"
)
@Column
(
name
=
"average"
)
...
...
src/main/java/com/keymobile/indicators/service/report/IndicatorsReportService.java
View file @
54eb478d
...
@@ -252,7 +252,8 @@ public class IndicatorsReportService {
...
@@ -252,7 +252,8 @@ public class IndicatorsReportService {
indReportData
.
setEffectiveIndCount
(
indReportData
.
setEffectiveIndCount
(
indReportData
.
getEffectiveIndCount
()+
1
);
indReportData
.
getEffectiveIndCount
()+
1
);
}
}
//保存同期值
indicatorsReportFour
.
setSameValue
(
sameCalResult
.
getValue
());
//算增幅
//算增幅
if
(!
"NaN"
.
equals
(
sameCalResult
.
getValue
())
if
(!
"NaN"
.
equals
(
sameCalResult
.
getValue
())
&&
!
"Infinite"
.
equals
(
sameCalResult
.
getValue
())
&&
!
"Infinite"
.
equals
(
sameCalResult
.
getValue
())
...
@@ -267,7 +268,7 @@ public class IndicatorsReportService {
...
@@ -267,7 +268,7 @@ public class IndicatorsReportService {
Double
.
parseDouble
(
sameCalResult
.
getValue
())
>
0
)
{
Double
.
parseDouble
(
sameCalResult
.
getValue
())
>
0
)
{
if
(
"0"
.
equals
(
indRule
))
{
//正向
if
(
"0"
.
equals
(
indRule
))
{
//正向
//报表四记录同比趋向
//报表四记录同比趋向
indicatorsReportFour
.
setTrend
(
1
);
indicatorsReportFour
.
setTrend
(
0
);
//填充指标提升个数
//填充指标提升个数
if
(
indReportData
.
getIndImproveCount
()==
null
)
{
if
(
indReportData
.
getIndImproveCount
()==
null
)
{
indReportData
.
setIndImproveCount
(
1
);
indReportData
.
setIndImproveCount
(
1
);
...
@@ -277,7 +278,7 @@ public class IndicatorsReportService {
...
@@ -277,7 +278,7 @@ public class IndicatorsReportService {
}
}
}
else
{
//反向
}
else
{
//反向
//报表四记录同比趋向
//报表四记录同比趋向
indicatorsReportFour
.
setTrend
(
0
);
indicatorsReportFour
.
setTrend
(
1
);
//填充指标降低个数
//填充指标降低个数
if
(
indReportData
.
getIndReduceCount
()==
null
)
{
if
(
indReportData
.
getIndReduceCount
()==
null
)
{
indReportData
.
setIndReduceCount
(
1
);
indReportData
.
setIndReduceCount
(
1
);
...
@@ -291,7 +292,7 @@ public class IndicatorsReportService {
...
@@ -291,7 +292,7 @@ public class IndicatorsReportService {
Double
.
parseDouble
(
sameCalResult
.
getValue
())
<
0
)
{
Double
.
parseDouble
(
sameCalResult
.
getValue
())
<
0
)
{
if
(
"1"
.
equals
(
indRule
))
{
//反向
if
(
"1"
.
equals
(
indRule
))
{
//反向
//报表四记录同比趋向
//报表四记录同比趋向
indicatorsReportFour
.
setTrend
(
1
);
indicatorsReportFour
.
setTrend
(
0
);
//填充指标提升个数
//填充指标提升个数
if
(
indReportData
.
getIndImproveCount
()==
null
)
{
if
(
indReportData
.
getIndImproveCount
()==
null
)
{
indReportData
.
setIndImproveCount
(
1
);
indReportData
.
setIndImproveCount
(
1
);
...
@@ -301,7 +302,7 @@ public class IndicatorsReportService {
...
@@ -301,7 +302,7 @@ public class IndicatorsReportService {
}
}
}
else
{
//正向
}
else
{
//正向
//报表四记录同比趋向
//报表四记录同比趋向
indicatorsReportFour
.
setTrend
(
0
);
indicatorsReportFour
.
setTrend
(
1
);
//填充指标降低个数
//填充指标降低个数
if
(
indReportData
.
getIndReduceCount
()==
null
)
{
if
(
indReportData
.
getIndReduceCount
()==
null
)
{
indReportData
.
setIndReduceCount
(
1
);
indReportData
.
setIndReduceCount
(
1
);
...
...
src/main/resources/mybatis/mapping/IndicatorsReportFourMapper.xml
View file @
54eb478d
...
@@ -5,13 +5,13 @@
...
@@ -5,13 +5,13 @@
<insert
id=
"batchInsert"
parameterType=
"java.util.List"
>
<insert
id=
"batchInsert"
parameterType=
"java.util.List"
>
insert into indicators_report_four(
insert into indicators_report_four(
result_id,compare_id,ind_id,ind_name,compare_obj,compare_obj_desc,ind_rule,compare_date,`value`,average,code,
result_id,compare_id,ind_id,ind_name,compare_obj,compare_obj_desc,ind_rule,compare_date,`value`,
same_value,
average,code,
trend,rank_mark_before,rank_mark_after,compare_avg,compare_catalog)
trend,rank_mark_before,rank_mark_after,compare_avg,compare_catalog)
values
values
<foreach
collection=
"indicatorsReportFours"
item=
"val"
separator=
","
>
<foreach
collection=
"indicatorsReportFours"
item=
"val"
separator=
","
>
(
(
#{val.resultId},#{val.compareId},#{val.indId},#{val.indName},#{val.compareObj},#{val.compareObjDesc},#{val.indRule},
#{val.resultId},#{val.compareId},#{val.indId},#{val.indName},#{val.compareObj},#{val.compareObjDesc},#{val.indRule},
#{val.compareDate},#{val.value},#{val.average},#{val.code},#{val.trend},#{val.rankMarkBefore},#{val.rankMarkAfter},
#{val.compareDate},#{val.value},#{val.
sameValue},#{val.
average},#{val.code},#{val.trend},#{val.rankMarkBefore},#{val.rankMarkAfter},
#{val.compareAvg},#{val.compareCatalog}
#{val.compareAvg},#{val.compareCatalog}
)
)
</foreach>
</foreach>
...
...
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