Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
9c2109b8
Commit
9c2109b8
authored
Jun 21, 2024
by
朱晨阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
经销商系统设置-单位管理-区域信息编辑数据丢失
parent
59ab010a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
9 deletions
+27
-9
UnitInfoServiceImpl.java
...oot/module/hygf/biz/service/impl/UnitInfoServiceImpl.java
+27
-9
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/UnitInfoServiceImpl.java
View file @
9c2109b8
...
...
@@ -909,26 +909,44 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
//区域公司
LambdaQueryWrapper
<
RegionalCompanies
>
qu
=
new
LambdaQueryWrapper
<>();
qu
.
eq
(
RegionalCompanies:
:
getUnitId
,
unitInfo
.
getAmosCompanySeq
());
List
<
RegionalCompanies
>
oldList
=
regionalCompaniesMapper
.
selectList
(
qu
);
regionalCompaniesMapper
.
delete
(
qu
);
List
<
RegionalCompanies
>
regionalComp
=
new
ArrayList
<>();
FeignClientResult
<
Collection
<
CompanyModel
>>
feignClientResult
=
Privilege
.
companyClient
.
querySubAgencyTree
(
regionalCompanies
);
List
<
CompanyModel
>
companyModel
=
(
List
<
CompanyModel
>)
feignClientResult
.
getResult
();
List
<
String
>
lisd
=
unitInfo
.
getRegionalCompaniesSeq
();
if
(
companyModel
!=
null
&&!
companyModel
.
isEmpty
()&&
lisd
!=
null
&&!
lisd
.
isEmpty
()){
for
(
Object
aLong
:
lisd
)
{
for
(
CompanyModel
compan
:
companyModel
)
{
if
(
compan
.
getSequenceNbr
().
longValue
()==
Long
.
valueOf
(
aLong
.
toString
()).
longValue
()){
RegionalCompanies
re
=
new
RegionalCompanies
(
Long
.
valueOf
(
aLong
.
toString
()),
compan
.
getCompanyName
(),
compan
.
getOrgCode
(),
unitInfo
.
getAmosCompanySeq
(),
unitInfo
.
getSequenceNbr
());
lisk
.
add
(
compan
.
getOrgCode
());
regionalComp
.
add
(
re
);
continue
;
if
(
oldList
==
null
)
{
oldList
=
new
ArrayList
<>();
}
if
(
companyModel
!=
null
&&!
companyModel
.
isEmpty
()&&
lisd
!=
null
&&!
lisd
.
isEmpty
()){
for
(
Object
aLong
:
lisd
)
{
RegionalCompanies
oldRe
=
oldList
.
stream
().
filter
(
s
->
Objects
.
equals
(
s
.
getRegionalCompaniesSeq
().
toString
(),
aLong
.
toString
())).
findFirst
().
orElse
(
null
);
if
(
oldRe
!=
null
)
{
lisk
.
add
(
oldRe
.
getRegionalCompaniesCode
());
regionalComp
.
add
(
oldRe
);
}
else
{
for
(
CompanyModel
compan
:
companyModel
)
{
if
(
compan
.
getSequenceNbr
().
longValue
()==
Long
.
valueOf
(
aLong
.
toString
()).
longValue
()){
RegionalCompanies
re
=
new
RegionalCompanies
(
Long
.
valueOf
(
aLong
.
toString
()),
compan
.
getCompanyName
(),
compan
.
getOrgCode
(),
unitInfo
.
getAmosCompanySeq
(),
unitInfo
.
getSequenceNbr
());
lisk
.
add
(
compan
.
getOrgCode
());
regionalComp
.
add
(
re
);
continue
;
}
}
}
}
}
}
regionalCompaniesService
.
saveBatch
(
regionalComp
);
//修改管理员权限
...
...
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