|
|
@@ -284,21 +284,23 @@ public class OrderChange extends TscBaseDomain {
|
|
|
|
|
|
// 휴대폰 번호 대쉬 붙이기
|
|
|
public void setHypenRecipPhone() {
|
|
|
- if (StringUtils.isNotBlank(this.recipPhnno) && !this.recipPhnno.contains("-")) {
|
|
|
- if (this.recipPhnno.length() > 10) {
|
|
|
- this.recipPhnno = this.recipPhnno.substring(0, 3) + "-" + this.recipPhnno.substring(3, 7) + "-" + this.recipPhnno.substring(7, 11);
|
|
|
+ if (StringUtils.isNotBlank(this.recipPhnno)) {
|
|
|
+ String tempRecipPhone = this.recipPhnno.replaceAll("-", "");
|
|
|
+ if (tempRecipPhone.length() > 10) {
|
|
|
+ this.recipPhnno = tempRecipPhone.substring(0, 3) + "-" + tempRecipPhone.substring(3, 7) + "-" + tempRecipPhone.substring(7, 11);
|
|
|
} else {
|
|
|
- this.recipPhnno = this.recipPhnno.substring(0, 3) + "-" + this.recipPhnno.substring(3, 6) + "-" + this.recipPhnno.substring(6, 10);
|
|
|
+ this.recipPhnno = tempRecipPhone.substring(0, 3) + "-" + tempRecipPhone.substring(3, 6) + "-" + tempRecipPhone.substring(6, 10);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public void setHypenChgerPhone() {
|
|
|
- if (StringUtils.isNotBlank(this.chgerPhnno) && !this.chgerPhnno.contains("-")) {
|
|
|
- if (this.chgerPhnno.length() > 10) {
|
|
|
- this.chgerPhnno = this.chgerPhnno.substring(0, 3) + "-" + this.chgerPhnno.substring(3, 7) + "-" + this.chgerPhnno.substring(7, 11);
|
|
|
+ if (StringUtils.isNotBlank(this.chgerPhnno)) {
|
|
|
+ String tempChgerPhone = this.chgerPhnno.replaceAll("-", "");
|
|
|
+ if (tempChgerPhone.length() > 10) {
|
|
|
+ this.chgerPhnno = tempChgerPhone.substring(0, 3) + "-" + tempChgerPhone.substring(3, 7) + "-" + tempChgerPhone.substring(7, 11);
|
|
|
} else {
|
|
|
- this.chgerPhnno = this.chgerPhnno.substring(0, 3) + "-" + this.chgerPhnno.substring(3, 6) + "-" + this.chgerPhnno.substring(6, 10);
|
|
|
+ this.chgerPhnno = tempChgerPhone.substring(0, 3) + "-" + tempChgerPhone.substring(3, 6) + "-" + tempChgerPhone.substring(6, 10);
|
|
|
}
|
|
|
}
|
|
|
}
|