Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-cr20g
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
Administrator
dsk-cr20g
Commits
6d2e4a11
Commit
6d2e4a11
authored
Jul 27, 2023
by
lcl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u
parent
664603e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
9 deletions
+25
-9
CustomerServiceImpl.java
...java/com/dsk/system/service/impl/CustomerServiceImpl.java
+25
-9
No files found.
dsk-system/src/main/java/com/dsk/system/service/impl/CustomerServiceImpl.java
View file @
6d2e4a11
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
com.dsk.common.core.domain.R
;
import
com.dsk.common.core.domain.R
;
import
com.dsk.common.exception.ServiceException
;
import
com.dsk.common.exception.ServiceException
;
import
com.dsk.common.utils.SecurityUtils
;
import
com.dsk.common.utils.SecurityUtils
;
import
com.dsk.common.utils.StringUtils
;
import
com.dsk.system.domain.customer.Customer
;
import
com.dsk.system.domain.customer.Customer
;
import
com.dsk.system.domain.customer.CustomerUser
;
import
com.dsk.system.domain.customer.CustomerUser
;
import
com.dsk.system.domain.customer.dto.CustomerBusinessSearchDto
;
import
com.dsk.system.domain.customer.dto.CustomerBusinessSearchDto
;
...
@@ -183,31 +184,46 @@ public class CustomerServiceImpl implements ICustomerService {
...
@@ -183,31 +184,46 @@ public class CustomerServiceImpl implements ICustomerService {
try
{
try
{
Map
<
String
,
Object
>
map
=
opportunityRadarService
.
enterpriseByName
(
customer
.
getCompanyName
());
Map
<
String
,
Object
>
map
=
opportunityRadarService
.
enterpriseByName
(
customer
.
getCompanyName
());
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"data"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"data"
)))
{
Integer
companyId
=
MapUtil
.
getInt
(
BeanUtil
.
beanToMap
(
map
.
get
(
"data"
)),
"jskEid"
);
Map
<
String
,
Object
>
data
=
BeanUtil
.
beanToMap
(
map
.
get
(
"data"
));
if
(
ObjectUtil
.
isNotEmpty
(
customer
.
getCompanyId
())
&&
customer
.
getCompanyId
()
!=
companyId
)
{
Integer
companyId
=
MapUtil
.
getInt
(
data
,
"jskEid"
);
if
(
ObjectUtil
.
isNotEmpty
(
customer
.
getCompanyId
())
&&
!
customer
.
getCompanyId
().
equals
(
companyId
))
{
return
;
return
;
}
}
customer
.
setCompanyId
(
companyId
);
customer
.
setCompanyId
(
companyId
);
if
(
ObjectUtils
.
isEmpty
(
customer
.
getLegalPerson
()))
{
if
(
ObjectUtils
.
isEmpty
(
customer
.
getLegalPerson
()))
{
customer
.
setLegalPerson
(
MapUtil
.
getStr
(
map
,
"legalPerson"
));
customer
.
setLegalPerson
(
MapUtil
.
getStr
(
data
,
"legalPerson"
));
}
}
if
(
ObjectUtils
.
isEmpty
(
customer
.
getRegisterCapital
()))
{
if
(
ObjectUtils
.
isEmpty
(
customer
.
getRegisterCapital
()))
{
customer
.
setRegisterCapital
(
MapUtil
.
getStr
(
map
,
"registeredCapitalStr"
));
customer
.
setRegisterCapital
(
MapUtil
.
getStr
(
data
,
"registeredCapitalStr"
));
}
}
if
(
ObjectUtils
.
isEmpty
(
customer
.
getProvinceId
()))
{
if
(
ObjectUtils
.
isEmpty
(
customer
.
getProvinceId
()))
{
customer
.
setProvinceId
(
MapUtil
.
getInt
(
map
,
"provinceId"
));
customer
.
setProvinceId
(
MapUtil
.
getInt
(
data
,
"provinceId"
));
}
}
if
(
ObjectUtils
.
isEmpty
(
customer
.
getCityId
()))
{
if
(
ObjectUtils
.
isEmpty
(
customer
.
getCityId
()))
{
customer
.
setCityId
(
MapUtil
.
getInt
(
map
,
"cityId"
));
customer
.
setCityId
(
MapUtil
.
getInt
(
data
,
"cityId"
));
}
}
if
(
ObjectUtils
.
isEmpty
(
customer
.
getDistrictId
()))
{
if
(
ObjectUtils
.
isEmpty
(
customer
.
getDistrictId
()))
{
customer
.
setDistrictId
(
MapUtil
.
getInt
(
map
,
"countyId"
));
customer
.
setDistrictId
(
MapUtil
.
getInt
(
data
,
"countyId"
));
}
}
if
(
ObjectUtils
.
isEmpty
(
customer
.
getRegisterAddress
()))
{
if
(
ObjectUtils
.
isEmpty
(
customer
.
getRegisterAddress
()))
{
customer
.
setRegisterAddress
(
MapUtil
.
getStr
(
map
,
"domicile"
));
if
(
ObjectUtil
.
isNotEmpty
(
MapUtil
.
getStr
(
data
,
"domicile"
))){
customer
.
setRegisterAddress
(
MapUtil
.
getStr
(
data
,
"domicile"
));
}
else
{
String
address
=
null
;
if
(
ObjectUtils
.
isEmpty
(
MapUtil
.
getStr
(
data
,
"province"
)))
{
address
=
MapUtil
.
getStr
(
data
,
"province"
);
if
(
ObjectUtils
.
isEmpty
(
MapUtil
.
getStr
(
data
,
"city"
)))
{
address
=
address
.
concat
(
"-"
).
concat
(
MapUtil
.
getStr
(
data
,
"city"
));
if
(
ObjectUtils
.
isEmpty
(
MapUtil
.
getStr
(
data
,
"county"
)))
{
address
=
address
.
concat
(
"-"
).
concat
(
MapUtil
.
getStr
(
data
,
"county"
));
}
}
}
customer
.
setRegisterAddress
(
address
);
}
}
}
if
(
ObjectUtils
.
isEmpty
(
customer
.
getCreditCode
()))
{
if
(
ObjectUtils
.
isEmpty
(
customer
.
getCreditCode
()))
{
customer
.
setCreditCode
(
MapUtil
.
getStr
(
map
,
"creditCode"
));
customer
.
setCreditCode
(
MapUtil
.
getStr
(
data
,
"creditCode"
));
}
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
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