PrintEnum.java 1011 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. package jnpf.flowable.enums;
  2. import lombok.Getter;
  3. /**
  4. * 打印条件
  5. *
  6. * @author :JNPF开发平台组
  7. * @version: V3.1.0
  8. * @copyright 引迈信息技术有限公司
  9. * @date :2022/6/14 16:50
  10. */
  11. @Getter
  12. public enum PrintEnum {
  13. /**
  14. * 不限制
  15. */
  16. none(1, "不限制"),
  17. /**
  18. * 节点结束
  19. */
  20. nodeEnd(2, "节点结束"),
  21. /**
  22. * 流程结束
  23. */
  24. flowEnd(3, "流程结束"),
  25. /**
  26. * 条件设置
  27. */
  28. conditions(4, "条件设置");
  29. private final Integer code;
  30. private final String message;
  31. PrintEnum(int code, String message) {
  32. this.code = code;
  33. this.message = message;
  34. }
  35. /**
  36. * 根据状态code获取枚举名称
  37. *
  38. * @return
  39. */
  40. public static PrintEnum getPrint(Integer code) {
  41. for (PrintEnum status : PrintEnum.values()) {
  42. if (status.getCode().equals(code)) {
  43. return status;
  44. }
  45. }
  46. return PrintEnum.none;
  47. }
  48. }