2 changed files with 131 additions and 0 deletions
			
			
		@ -0,0 +1,23 @@ | 
				
			|||
package com.epmet.commons.tools.dto.result; | 
				
			|||
 | 
				
			|||
import lombok.Data; | 
				
			|||
 | 
				
			|||
import java.io.Serializable; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * @Description | 
				
			|||
 * @Author yzm | 
				
			|||
 * @Date 2022/7/26 16:37 | 
				
			|||
 */ | 
				
			|||
@Data | 
				
			|||
public class ZhzlCategorySelectDTO implements Serializable { | 
				
			|||
    private String label; | 
				
			|||
    private String value; | 
				
			|||
 | 
				
			|||
    private String queryType; | 
				
			|||
    private String tableName; | 
				
			|||
    private String columnName; | 
				
			|||
    private String columnValue; | 
				
			|||
    private Integer sort; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
@ -0,0 +1,108 @@ | 
				
			|||
package com.epmet.commons.tools.enums; | 
				
			|||
 | 
				
			|||
import com.epmet.commons.tools.dto.result.ZhzlCategorySelectDTO; | 
				
			|||
 | 
				
			|||
import java.util.ArrayList; | 
				
			|||
import java.util.List; | 
				
			|||
 | 
				
			|||
public enum ZhzlResiCategoryEnum { | 
				
			|||
    // resi_xfry	信访人员
 | 
				
			|||
    // anzhibangjiao	安置帮教
 | 
				
			|||
    // xiejiaorenyuan	邪教人员
 | 
				
			|||
    // buliangqingshaonian	不良青少年
 | 
				
			|||
    // shequjiaozheng	社区矫正
 | 
				
			|||
    // zhaoshizhaohuojingshenbing	肇事肇祸精神病
 | 
				
			|||
    // xidurenyuan	吸毒人员
 | 
				
			|||
 | 
				
			|||
    resi_xfry("resi_xfry", "信访人员", "equal", "ic_resi_user", "IS_XFRY", "1", 1), | 
				
			|||
    anzhibangjiao("anzhibangjiao", "安置帮教", "list_equal", "ic_special", "SPECIAL_RQLB", "anzhibangjiao", 2), | 
				
			|||
    xiejiaorenyuan("xiejiaorenyuan", "邪教人员", "list_equal", "ic_special", "SPECIAL_RQLB", "xiejiaorenyuan", 3), | 
				
			|||
    buliangqingshaonian("buliangqingshaonian", "不良青少年", "list_equal", "ic_special", "SPECIAL_RQLB", "buliangqingshaonian", 4), | 
				
			|||
    shequjiaozheng("shequjiaozheng", "社区矫正", "list_equal", "ic_special", "SPECIAL_RQLB", "shequjiaozheng", 5), | 
				
			|||
    zhaoshizhaohuojingshenbing("zhaoshizhaohuojingshenbing", "肇事肇祸精神病", "list_equal", "ic_special", "SPECIAL_RQLB", "zhaoshizhaohuojingshenbing", 6), | 
				
			|||
    xidurenyuan("xidurenyuan", "吸毒人员", "list_equal", "ic_special", "SPECIAL_RQLB", "xidurenyuan", 7); | 
				
			|||
 | 
				
			|||
    private String code; | 
				
			|||
    private String name; | 
				
			|||
    private String queryType; | 
				
			|||
    private String tableName; | 
				
			|||
    private String columnName; | 
				
			|||
    private String columnValue; | 
				
			|||
    private Integer sort; | 
				
			|||
 | 
				
			|||
 | 
				
			|||
    ZhzlResiCategoryEnum(String code, String name, String queryType, String tableName, String columnName, String columnValue, Integer sort) { | 
				
			|||
        this.code = code; | 
				
			|||
        this.name = name; | 
				
			|||
        this.queryType = queryType; | 
				
			|||
        this.tableName = tableName; | 
				
			|||
        this.columnName = columnName; | 
				
			|||
        this.columnValue = columnValue; | 
				
			|||
        this.sort = sort; | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    public static ZhzlResiCategoryEnum getEnum(String code) { | 
				
			|||
        ZhzlResiCategoryEnum[] values = ZhzlResiCategoryEnum.values(); | 
				
			|||
        for (ZhzlResiCategoryEnum value : values) { | 
				
			|||
            if (value.getCode().equals(code)) { | 
				
			|||
                return value; | 
				
			|||
            } | 
				
			|||
        } | 
				
			|||
        return null; | 
				
			|||
 | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 转为数据 | 
				
			|||
     * | 
				
			|||
     * @return 枚举对象数组 | 
				
			|||
     */ | 
				
			|||
    public static List<ZhzlCategorySelectDTO> toSelectList() { | 
				
			|||
        List<ZhzlCategorySelectDTO> list = new ArrayList<>(); | 
				
			|||
        for (ZhzlResiCategoryEnum item : ZhzlResiCategoryEnum.values()) { | 
				
			|||
            ZhzlCategorySelectDTO selectDTO = new ZhzlCategorySelectDTO(); | 
				
			|||
            selectDTO.setLabel(item.getName()); | 
				
			|||
            selectDTO.setValue(item.getCode()); | 
				
			|||
            selectDTO.setQueryType(item.getQueryType()); | 
				
			|||
            selectDTO.setTableName(item.getTableName()); | 
				
			|||
            selectDTO.setColumnName(item.getColumnName()); | 
				
			|||
            selectDTO.setColumnValue(item.getColumnValue()); | 
				
			|||
            selectDTO.setSort(item.getSort()); | 
				
			|||
            list.add(selectDTO); | 
				
			|||
        } | 
				
			|||
        return list; | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
    public String getCode() { | 
				
			|||
        return code; | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    public String getName() { | 
				
			|||
        return name; | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
    public String getQueryType() { | 
				
			|||
        return queryType; | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    public String getTableName() { | 
				
			|||
        return tableName; | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    public String getColumnName() { | 
				
			|||
        return columnName; | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    public String getColumnValue() { | 
				
			|||
        return columnValue; | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    public Integer getSort() { | 
				
			|||
        return sort; | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
 | 
				
			|||
} | 
				
			|||
					Loading…
					
					
				
		Reference in new issue