Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
asset-distribution
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
data-spider
asset-distribution
Commits
19a26492
Commit
19a26492
authored
Sep 30, 2021
by
技术部-韩成龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
身份证户籍校验fix
parent
cdb297a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
AreaVerifyImpl.java
...t/distribution/service/newrule/common/AreaVerifyImpl.java
+24
-2
No files found.
src/main/java/com/quantgroup/asset/distribution/service/newrule/common/AreaVerifyImpl.java
View file @
19a26492
...
@@ -14,6 +14,7 @@ import com.quantgroup.asset.distribution.util.JacksonUtil;
...
@@ -14,6 +14,7 @@ import com.quantgroup.asset.distribution.util.JacksonUtil;
import
com.quantgroup.asset.distribution.util.PhoneNumberGeo
;
import
com.quantgroup.asset.distribution.util.PhoneNumberGeo
;
import
com.quantgroup.asset.distribution.util.PhoneNumberInfo
;
import
com.quantgroup.asset.distribution.util.PhoneNumberInfo
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
...
@@ -58,8 +59,29 @@ public class AreaVerifyImpl extends AbstractProductRuleVerifyImpl {
...
@@ -58,8 +59,29 @@ public class AreaVerifyImpl extends AbstractProductRuleVerifyImpl {
if
(
StringUtils
.
isNotBlank
(
ruleConcrete
.
getNativeList
())){
if
(
StringUtils
.
isNotBlank
(
ruleConcrete
.
getNativeList
())){
String
nativeList
=
ruleConcrete
.
getNativeList
();
String
nativeList
=
ruleConcrete
.
getNativeList
();
String
nativeCode
=
IdCardUtil
.
getCityCodeByIdCard
(
userInfo
.
getIdNo
());
String
nativeCode
=
IdCardUtil
.
getCityCodeByIdCard
(
userInfo
.
getIdNo
());
if
(
StringUtils
.
isNotBlank
(
nativeCode
)
&&
nativeList
.
contains
(
nativeCode
)){
if
(
StringUtils
.
isNotBlank
(
nativeCode
)){
hit
.
incrementAndGet
();
String
[]
nativeCodeList
=
nativeList
.
replaceAll
(
"\\["
,
""
).
replaceAll
(
"]"
,
""
).
split
(
","
);
if
(
ArrayUtils
.
isNotEmpty
(
nativeCodeList
))
{
for
(
String
configCode
:
nativeCodeList
)
{
String
provCode
=
nativeCode
.
substring
(
0
,
2
);
String
cityCode
=
nativeCode
.
substring
(
0
,
4
);
if
(
configCode
.
endsWith
(
"0000"
)
&&
configCode
.
startsWith
(
provCode
))
{
log
.
info
(
"省份匹配"
);
hit
.
incrementAndGet
();
break
;
}
if
(
configCode
.
endsWith
(
"00"
)
&&
configCode
.
startsWith
(
cityCode
))
{
log
.
info
(
"城市匹配"
);
hit
.
incrementAndGet
();
break
;
}
if
(!
configCode
.
endsWith
(
"00"
)
&&
configCode
.
equals
(
nativeCode
))
{
log
.
info
(
"区域匹配"
);
hit
.
incrementAndGet
();
break
;
}
}
}
}
}
if
(
AreaEnum
.
CHOOSE_ONE_MORE
.
equals
(
param
.
getAreaNum
())
&&
hit
.
get
()
>=
AreaEnum
.
CHOOSE_ONE_MORE
.
getCode
()){
if
(
AreaEnum
.
CHOOSE_ONE_MORE
.
equals
(
param
.
getAreaNum
())
&&
hit
.
get
()
>=
AreaEnum
.
CHOOSE_ONE_MORE
.
getCode
()){
log
.
info
(
"地区校验通过CHOOSE_ONE_MORE"
);
log
.
info
(
"地区校验通过CHOOSE_ONE_MORE"
);
...
...
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