forked from luyan/epmet-cloud-lingshan
9 changed files with 134 additions and 11 deletions
@ -0,0 +1,46 @@ |
|||
package com.epmet.enums; |
|||
|
|||
/** |
|||
* 项目来源枚举 |
|||
* @author liujianjun |
|||
*/ |
|||
public enum ProjectOriginEnum { |
|||
/** |
|||
* 项目来源 |
|||
*/ |
|||
ISSUE("issue", "议题上报"), |
|||
AGENCY("agency", "直接立项"), |
|||
WORK_EVENT("work_event", "巡查上报"), |
|||
IC_EVENT("ic_event", "居民上报"), |
|||
RESI_EVENT("resi_event", "旧的居民上报(已废弃)"); |
|||
|
|||
private String code; |
|||
private String name; |
|||
|
|||
ProjectOriginEnum(String code, String name) { |
|||
this.code = code; |
|||
this.name = name; |
|||
} |
|||
|
|||
/** |
|||
* 根据sourceType查询对应的枚举对象 |
|||
* @param code |
|||
* @return |
|||
*/ |
|||
public static ProjectOriginEnum getEnumByCode(String code) { |
|||
for (ProjectOriginEnum e : ProjectOriginEnum.values()) { |
|||
if (e.getCode().equals(code)) { |
|||
return e; |
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
public String getCode() { |
|||
return code; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
} |
Loading…
Reference in new issue