PatientAlarmEnum.java 944 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. package com.coffee.bus.enums;
  2. import com.baomidou.mybatisplus.annotation.IEnum;
  3. import com.fasterxml.jackson.annotation.JsonFormat;
  4. import lombok.AllArgsConstructor;
  5. import lombok.Getter;
  6. /**
  7. * @author lifang
  8. * @version 1.0.0
  9. * @ClassName PatientAlarmEnum.java
  10. * @Description TODO
  11. * @createTime 2022年04月18日 11:06:00
  12. */
  13. @AllArgsConstructor
  14. @JsonFormat(shape = JsonFormat.Shape.OBJECT)
  15. @Getter
  16. public enum PatientAlarmEnum implements IEnum<Integer> {
  17. NONE(0,"无报警信息"),
  18. DEVICE_REPEAT(1,"病人绑定多个设备"),
  19. DEVICE_NONE(2,"病人未绑定设备");
  20. private Integer value;
  21. private String text;
  22. public static PatientAlarmEnum of(int value){
  23. switch (value){
  24. case 0:
  25. return NONE;
  26. case 1:
  27. return DEVICE_REPEAT;
  28. case 2:
  29. return DEVICE_NONE;
  30. default:break;
  31. }
  32. return null;
  33. }
  34. }