New file |
| | |
| | | package com.panzhihua.common.api; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * 攀枝花综治网格化 |
| | | * 浪潮重点人员走访接口,人员类型 |
| | | * @author manailin |
| | | * @date 2021/06/20 |
| | | */ |
| | | @Getter |
| | | public enum LcVisitRecordKeyPersonLabelEnum { |
| | | /** |
| | | * 浪潮接口请求参数:吸毒人员类型 |
| | | */ |
| | | XD(1, "p01_drug"), |
| | | /** |
| | | *浪潮接口请求参数:重精人员类型 |
| | | */ |
| | | JS(2, "p01_trouble_schiz"), |
| | | /** |
| | | * 浪潮接口请求参数:释放人员类型 |
| | | */ |
| | | XM(3, "p01_release"), |
| | | /** |
| | | * 浪潮接口请求参数:纠正人员类型 |
| | | */ |
| | | SJ(4, "p01_be_corrected"); |
| | | |
| | | private final Integer code; |
| | | private final String name; |
| | | |
| | | LcVisitRecordKeyPersonLabelEnum(Integer code, String name) { |
| | | this.code = code; |
| | | this.name = name; |
| | | } |
| | | |
| | | public static int getCodeByName(String name) { |
| | | for (LcVisitRecordKeyPersonLabelEnum item : LcVisitRecordKeyPersonLabelEnum.values()) { |
| | | if (item.name.equals(name)) { |
| | | return item.getCode(); |
| | | } |
| | | } |
| | | return -1; |
| | | } |
| | | |
| | | public static String getCnDescByName(Integer code) { |
| | | for (LcVisitRecordKeyPersonLabelEnum item : LcVisitRecordKeyPersonLabelEnum.values()) { |
| | | if (item.code.equals(code)) { |
| | | return item.getName(); |
| | | } |
| | | } |
| | | return "其他"; |
| | | } |
| | | |
| | | } |