Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
service-campaign
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nguyen Ha
service-campaign
Commits
1057211b
Commit
1057211b
authored
Sep 13, 2019
by
Đào Nhật Quang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quangdn
parent
f7f1e07f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
src/main/java/com/viettel/campaign/service/impl/CustomerServiceImpl.java
...om/viettel/campaign/service/impl/CustomerServiceImpl.java
+10
-8
No files found.
src/main/java/com/viettel/campaign/service/impl/CustomerServiceImpl.java
View file @
1057211b
...
...
@@ -1126,7 +1126,7 @@ public class CustomerServiceImpl implements CustomerService {
isMainPhoneNull
=
true
;
}
else
{
if
(
validateNumberOnly
(
rawDataList
.
get
(
i
)[
headerMap
.
get
(
BundleUtils
.
getLangString
(
"customer.mainPhone"
,
locale
).
split
(
"#"
)[
0
])].
toString
().
trim
()))
{
sb
.
append
(
validateExistPhone
(
rawDataList
.
get
(
i
)[
headerMap
.
get
(
BundleUtils
.
getLangString
(
"customer.mainPhone"
,
locale
).
split
(
"#"
)[
0
])].
toString
().
trim
(),
locale
));
sb
.
append
(
validateExistPhone
(
rawDataList
.
get
(
i
)[
headerMap
.
get
(
BundleUtils
.
getLangString
(
"customer.mainPhone"
,
locale
).
split
(
"#"
)[
0
])].
toString
().
trim
(),
locale
,
true
));
}
else
{
sb
.
append
(
BundleUtils
.
getLangString
(
"customer.onlyNumber"
,
locale
));
}
...
...
@@ -1135,7 +1135,7 @@ public class CustomerServiceImpl implements CustomerService {
isSecondPhoneNull
=
true
;
}
else
{
if
(
validateNumberOnly
(
rawDataList
.
get
(
i
)[
headerMap
.
get
(
BundleUtils
.
getLangString
(
"customer.secondPhone"
,
locale
).
split
(
"#"
)[
0
])].
toString
().
trim
()))
{
sb
.
append
(
validate
Length
(
BundleUtils
.
getLangString
(
"customer.secondPhone"
,
locale
).
split
(
"#"
)[
0
],
rawDataList
.
get
(
i
)[
headerMap
.
get
(
BundleUtils
.
getLangString
(
"customer.secondPhone"
,
locale
).
split
(
"#"
)[
0
])].
toString
(),
50
,
local
e
));
sb
.
append
(
validate
ExistPhone
(
rawDataList
.
get
(
i
)[
headerMap
.
get
(
BundleUtils
.
getLangString
(
"customer.secondPhone"
,
locale
).
split
(
"#"
)[
0
])].
toString
(),
locale
,
fals
e
));
}
else
{
sb
.
append
(
BundleUtils
.
getLangString
(
"customer.onlyNumber"
,
locale
));
}
...
...
@@ -1380,7 +1380,7 @@ public class CustomerServiceImpl implements CustomerService {
}
//<editor-fold desc="Validate Methods" defaultstate="collapsed">
private
String
validateExistPhone
(
String
str
,
Locale
locale
)
{
private
String
validateExistPhone
(
String
str
,
Locale
locale
,
boolean
isCheckDuplicate
)
{
String
result
=
""
;
String
[]
arr
=
str
.
split
(
";"
);
List
<
CustomerContact
>
contactList
;
...
...
@@ -1397,11 +1397,13 @@ public class CustomerServiceImpl implements CustomerService {
}
}
}
for
(
int
i
=
0
;
i
<
arr
.
length
;
i
++)
{
contactList
=
customerContactRepository
.
findCustomerContactsByContactEquals
(
arr
[
i
]);
if
(
contactList
.
size
()
!=
0
)
{
result
+=
BundleUtils
.
getLangString
(
"customer.phoneExists"
,
locale
);
break
;
if
(
isCheckDuplicate
)
{
for
(
int
i
=
0
;
i
<
arr
.
length
;
i
++)
{
contactList
=
customerContactRepository
.
findCustomerContactsByContactEquals
(
arr
[
i
]);
if
(
contactList
.
size
()
!=
0
)
{
result
+=
BundleUtils
.
getLangString
(
"customer.phoneExists"
,
locale
);
break
;
}
}
}
return
result
;
...
...
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