k94314517
2023-12-19 165078645b8cfe800aeda7206e89ebd901c7e6c8
server/dmvisit_service/src/main/java/com/doumee/core/utils/Constants.java
@@ -87,10 +87,22 @@
    try {
        birthday = dateFormat.parse(birthdayString);
    } catch (Exception e) {
        throw new RuntimeException(e);
//        throw new RuntimeException(e);
    }
    return  birthday;
}
    public static  Integer   getSexByCardNo(String idCard){
        if(idCard ==null || idCard.length()<17){
            return null;
        }
        String str = idCard.substring(16, 17); // 截取身份证号的前六位数字作为出生日期
        try {
            Integer num  = Integer.parseInt(str);
            return  (num % 2 !=0) ? 1:2 ;
        } catch (Exception e) {
        }
        return  null;
    }
    /**
     *   判断是否为有效车牌号
@@ -250,8 +262,8 @@
public interface  memberType{
    int visitor = 0;//普通访客
    int lw_visitor = 1;//劳务访客
    int lw_visitor = 0;//劳务访客
    int visitor = 1;//普通访客
    int internal = 2;//内部人员
}
    public static void main(String[] args) {