操作类型枚举

This commit is contained in:
Vinjor 2024-10-18 16:33:09 +08:00
parent 88dab0293f
commit a789c59169
2 changed files with 67 additions and 0 deletions

View File

@ -0,0 +1,65 @@
package cn.iocoder.yudao.common;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 维修工单状态枚举
*
* @author vinjor-m
*/
@AllArgsConstructor
@Getter
public enum TicketsStatusEnum {
/**
* 未派工
*/
NO_WORK("04","未派工"),
/**
* 施工中
*/
WORKING("05","施工中"),
/**
* 未结账
*/
NO_PAY("01","未结账"),
/**
* 挂单/记账
*/
ACCOUNTING("06","挂单/记账"),
/**
* 已结账
*/
CHECK_OUT("02","已结账"),
/**
* 已作废
*/
CANCEL("03","已作废");
/**
* 角色code
*/
private String code;
/**
* 角色名称
*/
private String name;
/**
* 根据角色code返回对应的枚举
* @author vinjor-M
* @date 14:23 2024/10/16
* @param code 角色code
* @return cn.iocoder.yudao.common.SystemEnum
**/
public static TicketsStatusEnum getRepairRole(String code) {
for (TicketsStatusEnum roleEnum : TicketsStatusEnum.values()) {
if (roleEnum.getCode().equalsIgnoreCase(code)) {
// 找到对应的枚举
return roleEnum;
}
}
throw new IllegalArgumentException("无效的角色code" + code);
}
}

View File

@ -0,0 +1,2 @@
package cn.iocoder.yudao.module.tickets.utils;public class TicketsOprateUtil {
}