parent
							
								
									dd6d0b9f9c
								
							
						
					
					
						commit
						6fd8bc6c68
					
				@ -0,0 +1,35 @@ | 
				
			|||||||
 | 
					package digital.laboratory.platform.entrustment.enums; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import lombok.Getter; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Getter | 
				
			||||||
 | 
					public enum EntrustIdentificationSituationType { | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    FIRST_IDENT(0, "首次鉴定"), | 
				
			||||||
 | 
					    SUPPLY_IDENT(1, "补充鉴定"), | 
				
			||||||
 | 
					    AFRESF_IDENT(2, "重新鉴定"), | 
				
			||||||
 | 
					    PRIMARY_SCREEN(3, "初筛(不要报告、只要结果)"), | 
				
			||||||
 | 
					    MYANMAR_PERSON(4, "涉缅人员"), | 
				
			||||||
 | 
					    VOLUNTARY_PERSON(5, "自愿戒治人员") | 
				
			||||||
 | 
					    ; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private final Integer code; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private final String desc; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    EntrustIdentificationSituationType(Integer code, String desc) { | 
				
			||||||
 | 
					        this.code = code; | 
				
			||||||
 | 
					        this.desc = desc; | 
				
			||||||
 | 
					    } | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // 根据名称判断是否存在对应枚举
 | 
				
			||||||
 | 
					    public static EntrustIdentificationSituationType isExist(String desc) { | 
				
			||||||
 | 
					        for (EntrustIdentificationSituationType entrustIdentificationSituationType : values()) { | 
				
			||||||
 | 
					            if (entrustIdentificationSituationType.getDesc().equals(desc)) { | 
				
			||||||
 | 
					                return entrustIdentificationSituationType; | 
				
			||||||
 | 
					            } | 
				
			||||||
 | 
					        } | 
				
			||||||
 | 
					        throw new IllegalArgumentException("No enum constant with desc: " + desc); | 
				
			||||||
 | 
					    } | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					} | 
				
			||||||
@ -1,33 +0,0 @@ | 
				
			|||||||
package digital.laboratory.platform.entrustment.enums; | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import lombok.Getter; | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@Getter | 
					 | 
				
			||||||
public enum EntrustStatisticType { | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    ENTRUST(0, "委托"), | 
					 | 
				
			||||||
    SCREEN(1, "初筛"), | 
					 | 
				
			||||||
    SOCIETY(2, "两社人员"), | 
					 | 
				
			||||||
    OTHER(3, "其他人员") | 
					 | 
				
			||||||
    ; | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    private final Integer code; | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    private final String desc; | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    EntrustStatisticType(Integer code, String desc) { | 
					 | 
				
			||||||
        this.code = code; | 
					 | 
				
			||||||
        this.desc = desc; | 
					 | 
				
			||||||
    } | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // 根据名称判断是否存在对应枚举
 | 
					 | 
				
			||||||
    public static EntrustStatisticType isExist(String desc) { | 
					 | 
				
			||||||
        for (EntrustStatisticType entrustStatisticType : values()) { | 
					 | 
				
			||||||
            if (entrustStatisticType.getDesc().equals(desc)) { | 
					 | 
				
			||||||
                return entrustStatisticType; | 
					 | 
				
			||||||
            } | 
					 | 
				
			||||||
        } | 
					 | 
				
			||||||
        throw new IllegalArgumentException("No enum constant with desc: " + desc); | 
					 | 
				
			||||||
    } | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
} | 
					 | 
				
			||||||
					Loading…
					
					
				
		Reference in new issue