diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/common/RecordTypeEnum.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/common/RecordTypeEnum.java index c3284401..04c9fa5d 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/common/RecordTypeEnum.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/common/RecordTypeEnum.java @@ -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); } } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsService.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsService.java index 4b02dc59..742c36fb 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsService.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsService.java @@ -19,7 +19,7 @@ public interface RepairRecordsService extends IService { * * @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 diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsServiceImpl.java index 867cbd38..b04a9d8b 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsServiceImpl.java @@ -42,7 +42,7 @@ public class RepairRecordsServiceImpl extends ServiceImpl