feat(asset): add vehicle replacement module with BPM approval workflow
Implement complete replacement vehicle management (替换车) supporting temporary and permanent vehicle replacements under rental contracts, with BPM-based approval flow, event-driven architecture, and CRUD APIs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
package cn.iocoder.yudao.module.asset.enums.replacement;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 替换车状态枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ReplacementStatusEnum {
|
||||
|
||||
DRAFT(0, "草稿"),
|
||||
APPROVING(1, "审批中"),
|
||||
APPROVED(2, "审批通过"),
|
||||
EXECUTING(3, "执行中"),
|
||||
COMPLETED(4, "已完成"),
|
||||
REJECTED(5, "审批驳回"),
|
||||
WITHDRAWN(6, "已撤回");
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private final Integer status;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
public static ReplacementStatusEnum valueOf(Integer status) {
|
||||
return Arrays.stream(values())
|
||||
.filter(item -> item.getStatus().equals(status))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package cn.iocoder.yudao.module.asset.enums.replacement;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 替换车类型枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ReplacementTypeEnum {
|
||||
|
||||
TEMPORARY(1, "临时替换"),
|
||||
PERMANENT(2, "永久替换");
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private final Integer type;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
public static ReplacementTypeEnum valueOf(Integer type) {
|
||||
return Arrays.stream(values())
|
||||
.filter(item -> item.getType().equals(type))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user