123456789101112131415161718192021222324252627282930313233343536 |
- package com.ruoyi.warehouseBusiness.domain.enums;
- import lombok.AllArgsConstructor;
- import lombok.Getter;
- import java.util.Objects;
- /**
- * @author caifc
- * @date 2021-10-22 17:19
- */
- @Getter
- @AllArgsConstructor
- public enum AnnexActEnum {
- // 活动号
- STORAGE_FEE(1L, "仓储费协议"),
- HOMEWORK_FEE(10L, "作业费协议"),
- WAREHOUSE(30L, "仓库"),
- ;
- private final Long type;
- private final String name;
- public static AnnexActEnum fromType(Long tp) {
- for (AnnexActEnum type : AnnexActEnum.values()) {
- if (Objects.equals(type.getType(), tp)) {
- return type;
- }
- }
- throw new IllegalArgumentException("fees type not exist");
- }
- }
|