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
5e533241
Commit
5e533241
authored
Aug 24, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改批量新增和修改报表3数据接口返回值
parent
a1207e3f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
ReportThreeMapper.java
...ile/indicators/model/mapper/report/ReportThreeMapper.java
+2
-2
IndicatorsReportService.java
...le/indicators/service/report/IndicatorsReportService.java
+8
-3
No files found.
src/main/java/com/keymobile/indicators/model/mapper/report/ReportThreeMapper.java
View file @
5e533241
...
...
@@ -14,7 +14,7 @@ public interface ReportThreeMapper extends BaseMapper<IndicatorsReportThree>{
public
IndicatorsReportThree
getByParam
(
@Param
(
"compareObj"
)
String
compareObj
,
@Param
(
"date"
)
Integer
date
,
@Param
(
"type"
)
String
type
);
public
void
batchSave
(
@Param
(
"datas"
)
List
<
IndicatorsReportThree
>
datas
);
public
List
<
IndicatorsReportThree
>
batchSave
(
@Param
(
"datas"
)
List
<
IndicatorsReportThree
>
datas
);
public
void
batchUpdate
(
@Param
(
"datas"
)
List
<
IndicatorsReportThree
>
datas
);
public
List
<
IndicatorsReportThree
>
batchUpdate
(
@Param
(
"datas"
)
List
<
IndicatorsReportThree
>
datas
);
}
src/main/java/com/keymobile/indicators/service/report/IndicatorsReportService.java
View file @
5e533241
...
...
@@ -59,9 +59,10 @@ public class IndicatorsReportService {
return
reportTwoData
.
getId
();
}
public
void
batchSaveOrUpdateReportThree
(
List
<
IndicatorsReportThree
>
reportThreeDatas
)
{
public
List
<
IndicatorsReportThree
>
batchSaveOrUpdateReportThree
(
List
<
IndicatorsReportThree
>
reportThreeDatas
)
{
List
<
IndicatorsReportThree
>
addList
=
new
ArrayList
<>();
List
<
IndicatorsReportThree
>
updateList
=
new
ArrayList
<>();
List
<
IndicatorsReportThree
>
result
=
new
ArrayList
<>();
for
(
IndicatorsReportThree
reportThreeData
:
reportThreeDatas
)
{
if
(
reportThreeData
.
getId
()==
null
)
{
addList
.
add
(
reportThreeData
);
...
...
@@ -70,11 +71,14 @@ public class IndicatorsReportService {
}
}
if
(!
addList
.
isEmpty
())
{
reportThreeMapper
.
batchSave
(
addList
);
addList
=
reportThreeMapper
.
batchSave
(
addList
);
}
if
(!
updateList
.
isEmpty
())
{
reportThreeMapper
.
batchUpdate
(
updateList
);
updateList
=
reportThreeMapper
.
batchUpdate
(
updateList
);
}
result
.
addAll
(
addList
);
result
.
addAll
(
updateList
);
return
result
;
}
public
void
batchSaveOrUpdateReportTwo
(
List
<
IndicatorsReportTwo
>
reportTwoDatas
)
{
...
...
@@ -208,6 +212,7 @@ public class IndicatorsReportService {
//加入list中
dataList
.
add
(
indReportData
);
}
dataList
=
this
.
batchSaveOrUpdateReportThree
(
dataList
);
}
//算提升前三末三指标个数
if
(!
improveValue
.
isEmpty
())
{
...
...
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