Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
a720beb5
Commit
a720beb5
authored
Dec 29, 2021
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改并行stream引起数据丢失问题(list.add非原子操作)
parent
b86478b9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+2
-2
LatentDangerServiceImpl.java
...danger/business/service/impl/LatentDangerServiceImpl.java
+2
-1
LatentDangerServiceImpl.java
...patrol/business/service/impl/LatentDangerServiceImpl.java
+2
-1
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/OrgUsrServiceImpl.java
View file @
a720beb5
...
...
@@ -1403,7 +1403,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
Map
<
Long
,
CheckObjectDto
>
map
=
new
HashMap
<>(
companyList
.
size
());
companyList
.
forEach
(
e
->
map
.
put
(
e
.
getSequenceNbr
(),
e
));
Set
<?
extends
Map
.
Entry
<
Long
,
?
extends
CheckObjectDto
>>
entries
=
map
.
entrySet
();
entries
.
parallelS
tream
().
forEach
(
entry
->
{
entries
.
s
tream
().
forEach
(
entry
->
{
CheckObjectDto
value
=
entry
.
getValue
();
if
(!
ObjectUtils
.
isEmpty
(
value
))
{
Long
parent
=
ObjectUtils
.
isEmpty
(
value
.
getParentId
())
?
0L
:
Long
.
parseLong
(
value
.
getParentId
());
...
...
@@ -1412,7 +1412,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
int
num
=
orgUsrTreeDto
.
getNum
()
+
value
.
getNum
();
orgUsrTreeDto
.
setNum
(
num
);
}
else
{
if
(
value
.
getBizOrgType
().
equals
(
OrgPersonEnum
.
公司
.
getKey
()))
{
if
(
value
.
getBizOrgType
().
equals
(
OrgPersonEnum
.
公司
.
getKey
())
&&
null
==
value
.
getParentId
()
)
{
list
.
add
(
value
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/service/impl/LatentDangerServiceImpl.java
View file @
a720beb5
...
...
@@ -1938,7 +1938,8 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
}
}
catch
(
Exception
e
)
{
}
Map
<
String
,
Object
>
finalBuildingAbsolutePositionMap
=
buildingAbsolutePositionMap
;
Map
<
String
,
Object
>
finalBuildingAbsolutePositionMap
=
ValidationUtil
.
isEmpty
(
buildingAbsolutePositionMap
)
?
new
HashMap
<>()
:
buildingAbsolutePositionMap
;
iPage
.
getRecords
().
forEach
(
danger
->
{
if
(!
ValidationUtil
.
isEmpty
(
danger
.
getStructureId
())
&&
!
ValidationUtil
.
isEmpty
(
finalBuildingAbsolutePositionMap
.
get
(
danger
.
getStructureId
().
toString
())))
{
danger
.
setStructureName
(
finalBuildingAbsolutePositionMap
.
get
(
danger
.
getStructureId
().
toString
()).
toString
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/LatentDangerServiceImpl.java
View file @
a720beb5
...
...
@@ -1270,7 +1270,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
if
(
executeTypeEnum
.
equals
(
LatentDangerExcuteTypeEnum
.
隐患评审通过
))
{
latentDangerBo
.
setReformLimitDate
(
DateUtil
.
str2Date
(
executeParam
.
getReformLimitDate
(),
DateUtil
.
DATETIME_DEFAULT_FORMAT
));
latentDangerBo
.
setDangerLevel
(
executeParam
.
getDangerLevel
().
toString
());
JSONObject
reformJsonObject
=
JSONObject
.
parseObject
(
latentDangerBo
.
getReformJson
());
// JSONObject reformJsonObject = JSONObject.parseObject(latentDangerBo.getReformJson());
JSONObject
reformJsonObject
=
executeParam
.
getFlowJson
();
if
(
ValidationUtil
.
isEmpty
(
reformJsonObject
))
{
reformJsonObject
=
new
JSONObject
();
}
...
...
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