|
@@ -7,6 +7,7 @@ import javax.annotation.Resource;
|
|
|
import org.fouram.core.base.dao.DAO;
|
|
|
import org.fouram.core.util.Base64Util;
|
|
|
import org.fouram.core.util.ConfConfig;
|
|
|
+import org.fouram.core.util.Tools;
|
|
|
import org.fouram.entity.SapUser;
|
|
|
import org.springframework.http.HttpHeaders;
|
|
|
|
|
@@ -69,4 +70,23 @@ public abstract class BaseService {
|
|
|
}
|
|
|
return userIds;
|
|
|
}
|
|
|
+
|
|
|
+ public static String formatPosition(String position) {
|
|
|
+ if(Tools.isEmpty(position)) {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ position = position.replace("\n", "");
|
|
|
+ return position;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static String formatBusinessPhone(String businessPhone) {
|
|
|
+ if(Tools.isEmpty(businessPhone)) {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ // 021 80171999 -> 021-80171999
|
|
|
+ if(businessPhone.length() == 12) {
|
|
|
+ businessPhone = businessPhone.replace(" ", "-");
|
|
|
+ }
|
|
|
+ return businessPhone;
|
|
|
+ }
|
|
|
}
|