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
9ba6eb53
Commit
9ba6eb53
authored
Sep 30, 2022
by
wanglong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://39.98.45.134:8090/moa/amos-boot-biz
into developer
parents
ce3ed7c7
a8021040
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
TzBaseEnterpriseInfoServiceImpl.java
...tzs/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
+17
-8
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 @
9ba6eb53
...
...
@@ -198,13 +198,16 @@ public class TzBaseEnterpriseInfoServiceImpl
if
(!
ValidationUtil
.
isEmpty
(
companyPrivilegeModel
)){
List
<
AgencyUserModel
>
agencyUserModelList
=
Privilege
.
agencyUserClient
.
queryByCompanyId
(
companyPrivilegeModel
.
getSequenceNbr
(),
null
,
null
,
null
).
getResult
();
if
(
ValidationUtil
.
isEmpty
(
agencyUserModelList
)){
//spe表中的数据在工商查不到,且平台无用户,将删除企业数据
Privilege
.
companyClient
.
deleteCompany
(
String
.
valueOf
(
companyPrivilegeModel
.
getSequenceNbr
()));
if
(!
ValidationUtil
.
isEmpty
(
tzBaseEnterprisePrivilegeInfo
))
{
this
.
deleteBySeq
(
tzBaseEnterprisePrivilegeInfo
.
getSequenceNbr
());
}
}
}
//spe表中的数据在工商查不到,设置spe表状态为1
speUseUnit
.
setSyncState
(
1
);
speUseUnitService
.
updateById
(
speUseUnit
);
}
else
{
CompanyModel
privilegeCompanyModel
=
Privilege
.
companyClient
.
queryByCompanyName
(
String
.
valueOf
(
resultMap
.
get
(
"registration_authority"
))).
getResult
();
CompanyModel
companyModel
=
new
CompanyModel
();
...
...
@@ -255,11 +258,11 @@ public class TzBaseEnterpriseInfoServiceImpl
Privilege
.
companyClient
.
create
(
companyModel
);
}
else
if
(
tzBaseEnterprisePrivilegeInfo
==
null
)
{
//企业表没有,平台表有
this
.
save
(
baseEnterpriseInfo
);
if
(!
companyPrivilegeModel
.
getCompanyType
().
contains
(
companyModel
.
getCompanyType
()))
{
companyPrivilegeModel
.
setCompanyType
(
companyPrivilegeModel
.
getCompanyType
()
+
","
+
companyModel
.
getCompanyType
());
Privilege
.
companyClient
.
update
(
companyPrivilegeModel
,
companyPrivilegeModel
.
getSequenceNbr
());
}
this
.
save
(
baseEnterpriseInfo
);
}
else
if
(
companyPrivilegeModel
==
null
)
{
//平台表没有,企业表有
if
(!
tzBaseEnterprisePrivilegeInfo
.
getUnitType
().
contains
(
baseEnterpriseInfo
.
getUnitType
()))
{
...
...
@@ -271,27 +274,33 @@ public class TzBaseEnterpriseInfoServiceImpl
//企业表有 平台表有
if
(!
companyPrivilegeModel
.
getCompanyType
().
contains
(
companyModel
.
getCompanyType
()))
{
companyPrivilegeModel
.
setCompanyType
(
companyPrivilegeModel
.
getCompanyType
()
+
","
+
companyModel
.
getCompanyType
());
this
.
updateById
(
tzBaseEnterprisePrivilegeInfo
);
Privilege
.
companyClient
.
update
(
companyPrivilegeModel
,
companyPrivilegeModel
.
getSequenceNbr
()
);
}
if
(!
tzBaseEnterprisePrivilegeInfo
.
getUnitType
().
contains
(
baseEnterpriseInfo
.
getUnitType
()))
{
tzBaseEnterprisePrivilegeInfo
.
setUnitType
(
tzBaseEnterprisePrivilegeInfo
.
getUnitType
()
+
","
+
baseEnterpriseInfo
.
getUnitType
());
Privilege
.
companyClient
.
update
(
companyPrivilegeModel
,
companyPrivilegeModel
.
getSequenceNbr
()
);
this
.
updateById
(
tzBaseEnterprisePrivilegeInfo
);
}
}
setSpeUseUnitState
(
3
,
speUseUnit
);
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
e
.
getMessage
());
//当报错时 设置状态为 2
speUseUnit
.
setSyncState
(
2
);
speUseUnitService
.
updateById
(
speUseUnit
);
}
}
speUseUnit
.
setSyncState
(
3
);
speUseUnitService
.
updateById
(
speUseUnit
);
}
}
}
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
){
if
(
companyModels
==
null
){
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