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
d2368f93
Commit
d2368f93
authored
Sep 30, 2022
by
zhangyingbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化一次性企业表同步规则
parent
edbd1046
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
TzBaseEnterpriseInfoServiceImpl.java
...tzs/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
+15
-6
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
View file @
d2368f93
...
@@ -198,13 +198,16 @@ public class TzBaseEnterpriseInfoServiceImpl
...
@@ -198,13 +198,16 @@ public class TzBaseEnterpriseInfoServiceImpl
if
(!
ValidationUtil
.
isEmpty
(
companyPrivilegeModel
)){
if
(!
ValidationUtil
.
isEmpty
(
companyPrivilegeModel
)){
List
<
AgencyUserModel
>
agencyUserModelList
=
Privilege
.
agencyUserClient
.
queryByCompanyId
(
companyPrivilegeModel
.
getSequenceNbr
(),
null
,
null
,
null
).
getResult
();
List
<
AgencyUserModel
>
agencyUserModelList
=
Privilege
.
agencyUserClient
.
queryByCompanyId
(
companyPrivilegeModel
.
getSequenceNbr
(),
null
,
null
,
null
).
getResult
();
if
(
ValidationUtil
.
isEmpty
(
agencyUserModelList
)){
if
(
ValidationUtil
.
isEmpty
(
agencyUserModelList
)){
//spe表中的数据在工商查不到,且平台无用户,将删除企业数据
Privilege
.
companyClient
.
deleteCompany
(
String
.
valueOf
(
companyPrivilegeModel
.
getSequenceNbr
()));
Privilege
.
companyClient
.
deleteCompany
(
String
.
valueOf
(
companyPrivilegeModel
.
getSequenceNbr
()));
if
(!
ValidationUtil
.
isEmpty
(
tzBaseEnterprisePrivilegeInfo
))
{
if
(!
ValidationUtil
.
isEmpty
(
tzBaseEnterprisePrivilegeInfo
))
{
this
.
deleteBySeq
(
tzBaseEnterprisePrivilegeInfo
.
getSequenceNbr
());
this
.
deleteBySeq
(
tzBaseEnterprisePrivilegeInfo
.
getSequenceNbr
());
}
}
}
}
}
}
//spe表中的数据在工商查不到,设置spe表状态为1
speUseUnit
.
setSyncState
(
1
);
speUseUnitService
.
updateById
(
speUseUnit
);
}
else
{
}
else
{
CompanyModel
privilegeCompanyModel
=
Privilege
.
companyClient
.
queryByCompanyName
(
String
.
valueOf
(
resultMap
.
get
(
"registration_authority"
))).
getResult
();
CompanyModel
privilegeCompanyModel
=
Privilege
.
companyClient
.
queryByCompanyName
(
String
.
valueOf
(
resultMap
.
get
(
"registration_authority"
))).
getResult
();
CompanyModel
companyModel
=
new
CompanyModel
();
CompanyModel
companyModel
=
new
CompanyModel
();
...
@@ -255,11 +258,11 @@ public class TzBaseEnterpriseInfoServiceImpl
...
@@ -255,11 +258,11 @@ public class TzBaseEnterpriseInfoServiceImpl
Privilege
.
companyClient
.
create
(
companyModel
);
Privilege
.
companyClient
.
create
(
companyModel
);
}
else
if
(
tzBaseEnterprisePrivilegeInfo
==
null
)
{
}
else
if
(
tzBaseEnterprisePrivilegeInfo
==
null
)
{
//企业表没有,平台表有
//企业表没有,平台表有
this
.
save
(
baseEnterpriseInfo
);
if
(!
companyPrivilegeModel
.
getCompanyType
().
contains
(
companyModel
.
getCompanyType
()))
{
if
(!
companyPrivilegeModel
.
getCompanyType
().
contains
(
companyModel
.
getCompanyType
()))
{
companyPrivilegeModel
.
setCompanyType
(
companyPrivilegeModel
.
getCompanyType
()
+
","
+
companyModel
.
getCompanyType
());
companyPrivilegeModel
.
setCompanyType
(
companyPrivilegeModel
.
getCompanyType
()
+
","
+
companyModel
.
getCompanyType
());
Privilege
.
companyClient
.
update
(
companyPrivilegeModel
,
companyPrivilegeModel
.
getSequenceNbr
());
Privilege
.
companyClient
.
update
(
companyPrivilegeModel
,
companyPrivilegeModel
.
getSequenceNbr
());
}
}
this
.
save
(
baseEnterpriseInfo
);
}
else
if
(
companyPrivilegeModel
==
null
)
{
}
else
if
(
companyPrivilegeModel
==
null
)
{
//平台表没有,企业表有
//平台表没有,企业表有
if
(!
tzBaseEnterprisePrivilegeInfo
.
getUnitType
().
contains
(
baseEnterpriseInfo
.
getUnitType
()))
{
if
(!
tzBaseEnterprisePrivilegeInfo
.
getUnitType
().
contains
(
baseEnterpriseInfo
.
getUnitType
()))
{
...
@@ -277,21 +280,27 @@ public class TzBaseEnterpriseInfoServiceImpl
...
@@ -277,21 +280,27 @@ public class TzBaseEnterpriseInfoServiceImpl
tzBaseEnterprisePrivilegeInfo
.
setUnitType
(
tzBaseEnterprisePrivilegeInfo
.
getUnitType
()
+
","
+
baseEnterpriseInfo
.
getUnitType
());
tzBaseEnterprisePrivilegeInfo
.
setUnitType
(
tzBaseEnterprisePrivilegeInfo
.
getUnitType
()
+
","
+
baseEnterpriseInfo
.
getUnitType
());
Privilege
.
companyClient
.
update
(
companyPrivilegeModel
,
companyPrivilegeModel
.
getSequenceNbr
());
Privilege
.
companyClient
.
update
(
companyPrivilegeModel
,
companyPrivilegeModel
.
getSequenceNbr
());
}
}
}
}
setSpeUseUnitState
(
3
,
speUseUnit
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
e
.
getMessage
());
System
.
out
.
println
(
e
.
getMessage
());
//当报错时 设置状态为 2
speUseUnit
.
setSyncState
(
2
);
speUseUnitService
.
updateById
(
speUseUnit
);
}
}
}
}
speUseUnit
.
setSyncState
(
3
);
speUseUnitService
.
updateById
(
speUseUnit
);
}
}
}
}
}
}
return
"ok"
;
return
"ok"
;
}
}
public
void
setSpeUseUnitState
(
int
state
,
SpeUseUnit
speUseUnit
){
speUseUnit
.
setSyncState
(
state
);
speUseUnitService
.
updateById
(
speUseUnit
);
}
public
Map
<
String
,
CompanyModel
>
getCompanyInfoMap
(
Collection
companyModels
,
Map
<
String
,
CompanyModel
>
map
){
public
Map
<
String
,
CompanyModel
>
getCompanyInfoMap
(
Collection
companyModels
,
Map
<
String
,
CompanyModel
>
map
){
if
(
companyModels
==
null
){
if
(
companyModels
==
null
){
return
map
;
return
map
;
...
...
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