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
841cb2c1
Commit
841cb2c1
authored
Sep 22, 2022
by
zhangyingbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企业表同步数据接口修改
parent
5803eea7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
6 deletions
+42
-6
TzBaseEnterpriseInfoServiceImpl.java
...tzs/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
+42
-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 @
841cb2c1
...
...
@@ -2,9 +2,12 @@ package com.yeejoin.amos.boot.module.tzs.biz.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.BaseUnitLicenceDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.EquEnterDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.TzBaseEnterpriseInfoDto
;
...
...
@@ -167,20 +170,33 @@ public class TzBaseEnterpriseInfoServiceImpl
int
size
=
500
;
int
total
=
speUseUnitService
.
count
();
int
current
=
total
/
size
+
1
;
for
(
int
i
=
0
;
i
<
current
;
i
++){
int
current
=
total
/
size
;
current
=
current
+
1
;
for
(
int
i
=
1
;
i
<=
current
;
i
++){
System
.
out
.
println
(
"-----------------------------------------------------------------------"
);
System
.
out
.
println
(
i
);
System
.
out
.
println
(
"-----------------------------------------------------------------------"
);
IPage
<
SpeUseUnit
>
page
=
new
Page
<>();
page
.
setCurrent
(
i
);
page
.
setSize
(
size
);
List
<
SpeUseUnit
>
speUseUnitList
=
speUseUnitService
.
page
(
page
).
getRecords
();
for
(
SpeUseUnit
speUseUnit
:
speUseUnitList
)
{
if
(!
speUseUnit
.
getAuditOrgName
().
equals
(
"西安市工商局经开分局"
)
&&
!
speUseUnit
.
getAuditOrgName
().
equals
(
"碑林区市场监督管理局"
)){
if
(
speUseUnit
.
getAuditOrgName
()==
null
)
{
System
.
out
.
println
();
}
if
(!
"西安市工商局经开分局"
.
equals
(
speUseUnit
.
getAuditOrgName
())
&&
!
"碑林区市场监督管理局"
.
equals
(
speUseUnit
.
getAuditOrgName
())){
continue
;
}
if
(
ValidationUtil
.
isEmpty
(
companyMap
.
get
(
speUseUnit
.
getAuditOrgName
()))){
continue
;
}
CompanyModel
companyPrivilegeModel
=
Privilege
.
companyClient
.
queryByCompanyName
(
speUseUnit
.
getName
()).
getResult
();
QueryWrapper
<
TzBaseEnterpriseInfo
>
queryWrapper
=
new
QueryWrapper
<
TzBaseEnterpriseInfo
>();
queryWrapper
.
eq
(
"use_unit"
,
speUseUnit
.
getName
());
TzBaseEnterpriseInfo
tzBaseEnterprisePrivilegeInfo
=
this
.
getOne
(
queryWrapper
);
TzBaseEnterpriseInfo
baseEnterpriseInfo
=
new
TzBaseEnterpriseInfo
();
baseEnterpriseInfo
.
setUseUnit
(
speUseUnit
.
getName
());
...
...
@@ -217,11 +233,31 @@ public class TzBaseEnterpriseInfoServiceImpl
//保存平台和业务的企业信息
try
{
Privilege
.
companyClient
.
create
(
companyModel
);
this
.
save
(
baseEnterpriseInfo
);
if
(
tzBaseEnterprisePrivilegeInfo
==
null
&&
companyPrivilegeModel
==
null
)
{
//当企业表、平台表 中没有时
this
.
save
(
baseEnterpriseInfo
);
Privilege
.
companyClient
.
create
(
companyModel
);
}
else
if
(
tzBaseEnterprisePrivilegeInfo
==
null
){
//企业表没有,平台表有
this
.
save
(
baseEnterpriseInfo
);
}
else
if
(
companyPrivilegeModel
==
null
){
//平台表没有,企业表有
Privilege
.
companyClient
.
create
(
companyModel
);
}
else
{
}
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
e
.
getMessage
());
if
(!
e
.
getMessage
().
equals
(
"重复的公司名称."
))
{
System
.
out
.
println
(
e
.
getMessage
());
}
else
{
System
.
out
.
println
(
e
.
getMessage
());
}
}
// }
}
}
return
"ok"
;
...
...
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