You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					
					
						
							63 lines
						
					
					
						
							2.2 KiB
						
					
					
				
			
		
		
	
	
							63 lines
						
					
					
						
							2.2 KiB
						
					
					
				package com.ynxbd.common.bean.enums;
 | 
						|
 | 
						|
import org.apache.commons.lang3.ObjectUtils;
 | 
						|
 | 
						|
// 电子健康卡证件类型
 | 
						|
public enum HCardTypeEnum {
 | 
						|
    BABY("baby", "有身份证的婴儿(证件未入公安库)", null, null),
 | 
						|
    NO_CARD("00", "无证绑定", null, "8888"),
 | 
						|
    // -----------------------------------------------------------------------------------
 | 
						|
    _01("01", "居民身份证", "0", "0"),
 | 
						|
    _02("02", "居民户口簿", null, null),
 | 
						|
    _03("03", "护照", null, null),
 | 
						|
    _04("04", "军官证", null, null),
 | 
						|
    _05("05", "驾驶证", null, null),
 | 
						|
    _06("06", "港澳居民来往内地通行证", null, null),
 | 
						|
    _07("07", "台湾居民来往内地通行证", null, null),
 | 
						|
    _08("08", "出生医学证明", null, null),
 | 
						|
    _09("09", "医保卡(仅在用卡数据监测接口使用)", null, null),
 | 
						|
    _10("10", "就诊卡(仅在用卡数据监测接口使用)", null, null),
 | 
						|
    _11("11", "电子健康卡(仅在用卡数据监测接口使用)", null, null),
 | 
						|
    _12("12", "新生儿证件(仅山东、广东、河南支持)", null, null),
 | 
						|
    _15("15", "外国人永久居住证", null, null),
 | 
						|
    _99("99", "其他法定有效证件", null, null),
 | 
						|
    ;
 | 
						|
 | 
						|
    public final String WX_CODE;
 | 
						|
    public final String NAME;
 | 
						|
    public final String ALI_CODE;
 | 
						|
    public final String HIS_CODE;
 | 
						|
 | 
						|
    HCardTypeEnum(String WX_CODE, String NAME, String ALI_CODE, String HIS_CODE) {
 | 
						|
        this.WX_CODE = WX_CODE;
 | 
						|
        this.NAME = NAME;
 | 
						|
        this.ALI_CODE = ALI_CODE;
 | 
						|
        this.HIS_CODE = HIS_CODE;
 | 
						|
    }
 | 
						|
 | 
						|
    public static HCardTypeEnum toTypeByWxCode(String wxCode) {
 | 
						|
        if (ObjectUtils.isEmpty(wxCode)) {
 | 
						|
            return null;
 | 
						|
        }
 | 
						|
 | 
						|
        for (HCardTypeEnum item : HCardTypeEnum.values()) {
 | 
						|
            if (wxCode.equals(item.WX_CODE)) {
 | 
						|
                return item;
 | 
						|
            }
 | 
						|
        }
 | 
						|
        return null;
 | 
						|
    }
 | 
						|
 | 
						|
    public static HCardTypeEnum toTypeByAliCode(String aliCode) {
 | 
						|
        if (ObjectUtils.isEmpty(aliCode)) {
 | 
						|
            return null;
 | 
						|
        }
 | 
						|
 | 
						|
        for (HCardTypeEnum item : HCardTypeEnum.values()) {
 | 
						|
            if (aliCode.equals(item.ALI_CODE)) {
 | 
						|
                return item;
 | 
						|
            }
 | 
						|
        }
 | 
						|
        return null;
 | 
						|
    }
 | 
						|
}
 | 
						|
 |