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
cdc30f16
Commit
cdc30f16
authored
Sep 11, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
计算报表3方法添加同步锁处理。
parent
61f16ac2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
IndicatorsReportService.java
...le/indicators/service/report/IndicatorsReportService.java
+1
-4
No files found.
src/main/java/com/keymobile/indicators/service/report/IndicatorsReportService.java
View file @
cdc30f16
...
@@ -132,7 +132,7 @@ public class IndicatorsReportService {
...
@@ -132,7 +132,7 @@ public class IndicatorsReportService {
reportThreeMapper
.
deleteByParam
(
paramMap
);
reportThreeMapper
.
deleteByParam
(
paramMap
);
}
}
public
void
dealDriveIndReportThreeData
(
String
compareId
,
List
<
String
>
indIds
,
public
synchronized
void
dealDriveIndReportThreeData
(
String
compareId
,
List
<
String
>
indIds
,
Integer
date
,
String
code
)
{
Integer
date
,
String
code
)
{
List
<
IndicatorsReportThree
>
dataList
=
new
ArrayList
<>();
List
<
IndicatorsReportThree
>
dataList
=
new
ArrayList
<>();
String
type
=
this
.
getCompareType
(
date
);
String
type
=
this
.
getCompareType
(
date
);
...
@@ -154,12 +154,9 @@ public class IndicatorsReportService {
...
@@ -154,12 +154,9 @@ public class IndicatorsReportService {
if
(!
calResults
.
isEmpty
())
{
if
(!
calResults
.
isEmpty
())
{
for
(
DriveIndCalResultDef
calResult
:
calResults
)
{
for
(
DriveIndCalResultDef
calResult
:
calResults
)
{
IndicatorsReportThree
indReportData
=
null
;
IndicatorsReportThree
indReportData
=
null
;
//多线程查询会导致重复数据插入问题
synchronized
(
this
){
//判断是否存在
//判断是否存在
indReportData
=
reportThreeMapper
.
getByParam
(
indReportData
=
reportThreeMapper
.
getByParam
(
calResult
.
getCompareObj
(),
date
,
type
,
code
);
calResult
.
getCompareObj
(),
date
,
type
,
code
);
}
if
(
indReportData
==
null
)
{
if
(
indReportData
==
null
)
{
indReportData
=
new
IndicatorsReportThree
();
indReportData
=
new
IndicatorsReportThree
();
}
}
...
...
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