后端对应 RecordTypeEnum 枚举)
This commit is contained in:
parent
a789c59169
commit
328c865bb6
@ -4,62 +4,74 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 维修工单状态枚举
|
||||
* 工单操作记录-工作类型枚举
|
||||
*
|
||||
* @author vinjor-m
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum TicketsStatusEnum {
|
||||
public enum RecordTypeEnum {
|
||||
/**
|
||||
* 未派工
|
||||
* 创建工单
|
||||
*/
|
||||
NO_WORK("04","未派工"),
|
||||
CJGD("cjgd","创建工单"),
|
||||
/**
|
||||
* 指派施工
|
||||
*/
|
||||
ZPSG("zpsg","指派施工"),
|
||||
/**
|
||||
* 领料
|
||||
*/
|
||||
LL("ll","领料"),
|
||||
/**
|
||||
* 退料
|
||||
*/
|
||||
TL("tl","退料"),
|
||||
/**
|
||||
* 施工完成(自检)
|
||||
*/
|
||||
SGWCZJ("sgwczj","施工完成(自检)"),
|
||||
/**
|
||||
* 总检
|
||||
*/
|
||||
ZJ("zj","总检"),
|
||||
/**
|
||||
* 结束工单
|
||||
*/
|
||||
JSGD("jsgd","结束工单"),
|
||||
/**
|
||||
* 开始施工
|
||||
*/
|
||||
KSSG("kssg","开始施工"),
|
||||
/**
|
||||
* 施工中
|
||||
*/
|
||||
WORKING("05","施工中"),
|
||||
/**
|
||||
* 未结账
|
||||
*/
|
||||
NO_PAY("01","未结账"),
|
||||
/**
|
||||
* 挂单/记账
|
||||
*/
|
||||
ACCOUNTING("06","挂单/记账"),
|
||||
/**
|
||||
* 已结账
|
||||
*/
|
||||
CHECK_OUT("02","已结账"),
|
||||
/**
|
||||
* 已作废
|
||||
*/
|
||||
CANCEL("03","已作废");
|
||||
SGZ("sgz","施工中");
|
||||
|
||||
/**
|
||||
* 角色code
|
||||
* code
|
||||
*/
|
||||
private String code;
|
||||
/**
|
||||
* 角色名称
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 根据角色code返回对应的枚举
|
||||
* 根据code返回对应的枚举
|
||||
* @author vinjor-M
|
||||
* @date 14:23 2024/10/16
|
||||
* @param code 角色code
|
||||
* @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)) {
|
||||
public static RecordTypeEnum getRepairRole(String code) {
|
||||
for (RecordTypeEnum thisEnum : RecordTypeEnum.values()) {
|
||||
if (thisEnum.getCode().equalsIgnoreCase(code)) {
|
||||
// 找到对应的枚举
|
||||
return roleEnum;
|
||||
return thisEnum;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("无效的角色code:" + code);
|
||||
throw new IllegalArgumentException("无效的枚举code:" + code);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ public interface RepairRecordsService extends IService<RepairRecords> {
|
||||
*
|
||||
* @param ticketId 工单id
|
||||
* @param repairItemId 工单子表id
|
||||
* @param type 工作类型(数据字典:repair_records_type;后端已初始化常量,可直接引用base包中BaseConstants下106-119行)
|
||||
* @param type 工作类型(数据字典:repair_records_type;后端对应 RecordTypeEnum 枚举)
|
||||
* @param remark 备注
|
||||
* @param images 图片(相对路径按照“,”分隔)
|
||||
* @author PQZ
|
||||
|
@ -42,7 +42,7 @@ public class RepairRecordsServiceImpl extends ServiceImpl<RepairRecordsMapper, R
|
||||
*
|
||||
* @param ticketId 工单id
|
||||
* @param repairItemId 工单子表id
|
||||
* @param type 工作类型(数据字典:repair_records_type;后端已初始化常量,可直接引用base包中BaseConstants下106-119行)
|
||||
* @param type 工作类型(数据字典:repair_records_type;后端对应 RecordTypeEnum 枚举)
|
||||
* @param remark 备注
|
||||
* @param images 图片(相对路径按照“,”分隔)
|
||||
* @author PQZ
|
||||
|
@ -1,2 +1,18 @@
|
||||
package cn.iocoder.yudao.module.tickets.utils;public class TicketsOprateUtil {
|
||||
package cn.iocoder.yudao.module.tickets.utils;
|
||||
|
||||
import cn.iocoder.yudao.module.base.service.RepairRecordsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 工单操作常用util
|
||||
* @author vinjor-M
|
||||
* @date 16:15 2024/10/18
|
||||
**/
|
||||
@Component
|
||||
public class TicketsOperateUtil {
|
||||
@Autowired
|
||||
private RepairRecordsService repairRecordsService;
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user