SysParamEnum.java 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. package jnpf.emnus;
  2. /**
  3. * 当前系统参数枚举类
  4. *
  5. * @author JNPF开发平台组
  6. * @version v6.0.0
  7. * @copyright 引迈信息技术有限公司
  8. * @date 2025/3/5 10:34:36
  9. */
  10. public enum SysParamEnum {
  11. USER("user", "当前用户", ""),
  12. ORG("org", "当前组织", ""),
  13. SUBORG("subOrg", "当前组织及子组织", "及子组织"),
  14. PROGENYORG("progenyOrg", "当前组织及子孙组织", "及子孙组织"),
  15. POS("pos", "当前岗位", ""),
  16. SUBPOS("subPos", "当前岗位及子岗位", "及子岗位"),
  17. PROGENYPOS("progenyPos", "当前岗位及子孙岗位", "及子孙岗位"),
  18. GROUP("group","用户组",""),
  19. ROLE("role","角色",""),
  20. ;
  21. private final String code;
  22. private final String name;
  23. private final String suffix;
  24. SysParamEnum(String code, String name, String suffix) {
  25. this.code = code;
  26. this.name = name;
  27. this.suffix = suffix;
  28. }
  29. public String getCode() {
  30. return code;
  31. }
  32. public String getName() {
  33. return name;
  34. }
  35. public String getSuffix() {
  36. return suffix;
  37. }
  38. public static SysParamEnum get(String code) {
  39. for (SysParamEnum item : SysParamEnum.values()) {
  40. if (item.getCode().equals(code)) {
  41. return item;
  42. }
  43. }
  44. return null;
  45. }
  46. }