|
@ -20,10 +20,9 @@ public class IdCardUtil {
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public static String getSexForIdcard(String CardCode){
|
|
|
public static String getSexForIdcard(String CardCode) throws Exception{
|
|
|
String sex = Constant.level_sex_2;
|
|
|
|
|
|
try {
|
|
|
if (CardCode.length() == 18) {
|
|
|
if (Integer.parseInt(CardCode.substring(16).substring(0, 1)) % 2 == 0) {// 判断性别
|
|
|
// modifid by lyr 2016-09-29
|
|
@ -46,9 +45,6 @@ public class IdCardUtil {
|
|
|
sex = Constant.level_sex_2;
|
|
|
}
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
return Constant.level_sex_2;
|
|
|
}
|
|
|
return sex;
|
|
|
}
|
|
|
|