|
|
@ -46,11 +46,12 @@ public class IdentityNoUtils implements Serializable { |
|
|
|
private final static int[] VERIFY_CODE_WEIGHT = {7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2}; |
|
|
|
|
|
|
|
/** |
|
|
|
* 根据身份证号获取性别 |
|
|
|
* 0女;1男 |
|
|
|
* 根据身份证号获取性别 0女;1男 |
|
|
|
* |
|
|
|
* @param IDCard |
|
|
|
* @return |
|
|
|
* @param IDCard 完整身份证号码 |
|
|
|
* @return java.lang.String |
|
|
|
* @author work@yujt.net.cn |
|
|
|
* @date 2019/9/20 14:26 |
|
|
|
*/ |
|
|
|
public static String getSex(String IDCard) { |
|
|
|
if (StringUtils.isNotBlank(IDCard)) { |
|
|
@ -74,8 +75,10 @@ public class IdentityNoUtils implements Serializable { |
|
|
|
/** |
|
|
|
* 根据身份证号获取年龄 |
|
|
|
* |
|
|
|
* @param IDCard |
|
|
|
* @return |
|
|
|
* @param IDCard 完整身份证号码 |
|
|
|
* @return java.lang.Integer |
|
|
|
* @author work@yujt.net.cn |
|
|
|
* @date 2019/9/20 14:26 |
|
|
|
*/ |
|
|
|
public static Integer getAge(String IDCard) { |
|
|
|
int age; |
|
|
@ -112,10 +115,12 @@ public class IdentityNoUtils implements Serializable { |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取出生日期 yyyy-MM-dd |
|
|
|
* 根据身份证号获取出生日期 |
|
|
|
* |
|
|
|
* @param IDCard |
|
|
|
* @return |
|
|
|
* @param IDCard 完整身份证号码 |
|
|
|
* @return java.lang.String |
|
|
|
* @author work@yujt.net.cn |
|
|
|
* @date 2019/9/20 14:26 |
|
|
|
*/ |
|
|
|
public static String getBirthday(String IDCard) { |
|
|
|
String year = ""; |
|
|
@ -188,7 +193,7 @@ public class IdentityNoUtils implements Serializable { |
|
|
|
/** |
|
|
|
* 验证身份证号码,验证通过返回null |
|
|
|
* |
|
|
|
* @param idStr |
|
|
|
* @param idStr 完整身份证号码 |
|
|
|
* @return java.lang.String |
|
|
|
* @author work@yujt.net.cn |
|
|
|
* @date 2019/9/20 14:26 |
|
|
|