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