VisitEnum.java 783 Bytes
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
package com.lyms.talkonlineweb.enums;

import lombok.Getter;

/**
* 回访状态
* 自动回复周期上传病例后- 1:第二天 2:第五天 3:第十天 4:第二十天 5:第三十天
*/
@Getter
public enum VisitEnum {

a(1, "第二天"),
b(2, "第五天"),
c(3, "第十天"),
d(4, "第十天"),
e(5, "第三十天");

private Integer code;
private String name;

VisitEnum(Integer code, String name){
this.code = code;
this.name = name;
}

public static String getName(Integer code) {
VisitEnum[] values = VisitEnum.values();
for (VisitEnum value : values) {
if (value.getCode().equals(code)) {
return value.getName();
}
}
return "";
}
}