fix:添加app-生产概况-产品时间筛选
parent
6185639d4a
commit
7616b34052
@ -0,0 +1,34 @@
|
||||
package cn.iocoder.yudao.module.mes.enums;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum BaogongTrendTypeEnum implements IntArrayValuable {
|
||||
|
||||
YEAR(1, "近一年"),
|
||||
MONTH(2, "本月"),
|
||||
WEEK(3, "本周"),
|
||||
TODAY(4, "今日"),
|
||||
CUSTOM(5, "自定义");
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BaogongTrendTypeEnum::getType).toArray();
|
||||
|
||||
private final Integer type;
|
||||
private final String name;
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
|
||||
public static BaogongTrendTypeEnum valueOf(Integer type) {
|
||||
return ArrayUtil.firstMatch(item -> item.getType().equals(type), values());
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue