| | |
| | | * @return |
| | | */ |
| | | public static String hidePhoneNum(String phoneNum){ |
| | | if (phoneNum==null){ |
| | | return ""; |
| | | } |
| | | if(phoneNum.contains("*")){ |
| | | return phoneNum; |
| | | } |
| | | |
| | | Pattern pattern = Pattern.compile("((13[0-9])|(14[5,7,9])|(15([0-3]|[5-9]))|(17[0,1,3,5,6,7,8])|(18[0-9])|(19[8|9]))\\d{8}"); |
| | | Matcher matcher = pattern.matcher(phoneNum); |
| | | StringBuffer sb = new StringBuffer(); |
| | |
| | | */ |
| | | public static String hideIdCardNum(String idCardNum){ |
| | | |
| | | if (idCardNum==null){ |
| | | return ""; |
| | | } |
| | | if(idCardNum.contains("*")){ |
| | | return idCardNum; |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | public static String hideCusName(String cusName){ |
| | | if (cusName==null){ |
| | | return ""; |
| | | } |
| | | if(cusName.contains("*")){ |
| | | return cusName; |
| | | } |
| | | |
| | | String realname=null; |
| | | char[] r = cusName.toCharArray(); |
| | | if(r.length ==1){ |
| | |
| | | } |
| | | return realname; |
| | | } |
| | | |
| | | /** |
| | | * 根据时间段判断上午还是下午 |
| | | * |
| | | * @param timeSlot |
| | | * @return |
| | | */ |
| | | // public static String getMorA(String timeSlot){ |
| | | // String reg=""; |
| | | // switch (timeSlot){ |
| | | // case "1": |
| | | // case "2": |
| | | // case "3": |
| | | // case "4": |
| | | // reg="上午"; |
| | | // break; |
| | | // |
| | | // case "5": |
| | | // case "6": |
| | | // case "7": |
| | | // reg="下午"; |
| | | // break; |
| | | // |
| | | // default:break; |
| | | // } |
| | | // |
| | | // return reg; |
| | | // } |
| | | } |