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.
		
		
		
		
			
				
					
					
						
							32 lines
						
					
					
						
							841 B
						
					
					
				
			
		
		
	
	
							32 lines
						
					
					
						
							841 B
						
					
					
				package com.ynxbd.common.bean.enums;
 | 
						|
 | 
						|
import org.apache.commons.lang3.ObjectUtils;
 | 
						|
 | 
						|
public enum CountyEnum {
 | 
						|
    弥勒市("弥勒市", "532504", "532526"),
 | 
						|
    禄丰市("禄丰市", "532381", "532331"),
 | 
						|
    ;
 | 
						|
    public final String NAME;
 | 
						|
    public final String CODE; // 市级编码
 | 
						|
    public final String OLD_CODE; // 县级编码
 | 
						|
 | 
						|
 | 
						|
    CountyEnum(String NAME, String CODE, String OLD_CODE) {
 | 
						|
        this.NAME = NAME;
 | 
						|
        this.CODE = CODE;
 | 
						|
        this.OLD_CODE = OLD_CODE;
 | 
						|
    }
 | 
						|
 | 
						|
    public static String getNewCounty(String code) {
 | 
						|
        if (ObjectUtils.isEmpty(code)) {
 | 
						|
            return null;
 | 
						|
        }
 | 
						|
 | 
						|
        for (CountyEnum item : CountyEnum.values()) {
 | 
						|
            if (item.OLD_CODE.equals(code)) {
 | 
						|
                return item.CODE;
 | 
						|
            }
 | 
						|
        }
 | 
						|
        return code;
 | 
						|
    }
 | 
						|
}
 | 
						|
 |