枚举更换、归属类型调整
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
package cn.iocoder.lyzsys.module.tjt.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 专业内/项目负责人角色编码枚举。
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum OutputSplitRoleEnum {
|
||||
|
||||
DIRECTOR("director", "专业负责人", 1, false),
|
||||
CHECK("check", "校对", 2, false),
|
||||
REVIEW("review", "审核", 3, false),
|
||||
APPROVE("approve", "审定", 4, false),
|
||||
DESIGN("design", "设计", 5, false),
|
||||
PROJECT_MANAGER("project_manager", "项目经理", 1, true),
|
||||
ENGINEERING_PRINCIPAL("engineering_principal", "工程负责人", 2, true);
|
||||
|
||||
private final String code;
|
||||
private final String label;
|
||||
private final Integer sortNo;
|
||||
private final boolean projectLeadRole;
|
||||
|
||||
public static OutputSplitRoleEnum of(String code) {
|
||||
return Arrays.stream(values())
|
||||
.filter(item -> item.getCode().equals(code))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
public static boolean contains(String code) {
|
||||
return of(code) != null;
|
||||
}
|
||||
|
||||
public static String labelOf(String code) {
|
||||
OutputSplitRoleEnum item = of(code);
|
||||
return item == null ? code : item.getLabel();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package cn.iocoder.lyzsys.module.tjt.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 项目/专业分配专业编码枚举。
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum OutputSplitSpecialtyEnum {
|
||||
|
||||
PROJECT_LEAD("project_lead", "项目经理/工程负责人", 0, true),
|
||||
ARCH("arch", "建筑", 1, false),
|
||||
DECOR("decor", "装饰", 2, false),
|
||||
STRUCT("struct", "结构", 3, false),
|
||||
WATER("water", "给排水", 4, false),
|
||||
ELEC("elec", "电气", 5, false),
|
||||
HVAC("hvac", "暖通", 6, false),
|
||||
DIGITAL("digital", "数字化设计", 7, false);
|
||||
|
||||
private final String code;
|
||||
private final String label;
|
||||
private final Integer sortNo;
|
||||
private final boolean projectLead;
|
||||
|
||||
public static OutputSplitSpecialtyEnum of(String code) {
|
||||
return Arrays.stream(values())
|
||||
.filter(item -> item.getCode().equals(code))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
public static boolean contains(String code) {
|
||||
return of(code) != null;
|
||||
}
|
||||
|
||||
public static String labelOf(String code) {
|
||||
OutputSplitSpecialtyEnum item = of(code);
|
||||
return item == null ? code : item.getLabel();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package cn.iocoder.lyzsys.module.tjt.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 合约规划产值计算方式枚举。
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ProjectPlanningCalculationMethodEnum {
|
||||
|
||||
GUIDANCE_PRICE("guidance_price", "指导价法"),
|
||||
CONTRACT_PRICE("contract_price", "合同价法"),
|
||||
VIRTUAL_OUTPUT("virtual_output", "虚拟产值法");
|
||||
|
||||
private final String code;
|
||||
private final String label;
|
||||
|
||||
public static ProjectPlanningCalculationMethodEnum of(String code) {
|
||||
return Arrays.stream(values())
|
||||
.filter(item -> item.getCode().equals(code))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
public static boolean contains(String code) {
|
||||
return of(code) != null;
|
||||
}
|
||||
|
||||
public static String labelOf(String code) {
|
||||
ProjectPlanningCalculationMethodEnum item = of(code);
|
||||
return item == null ? code : item.getLabel();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package cn.iocoder.lyzsys.module.tjt.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 指导价法设计部位枚举。
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ProjectPlanningDesignPartEnum {
|
||||
|
||||
ABOVE_GROUND("above_ground", "地上部分"),
|
||||
UNDERGROUND("underground", "地下部分"),
|
||||
OTHER("other", "其他");
|
||||
|
||||
private final String code;
|
||||
private final String label;
|
||||
|
||||
public static ProjectPlanningDesignPartEnum of(String code) {
|
||||
return Arrays.stream(values())
|
||||
.filter(item -> item.getCode().equals(code))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
public static boolean contains(String code) {
|
||||
return of(code) != null;
|
||||
}
|
||||
|
||||
public static String labelOf(String code) {
|
||||
ProjectPlanningDesignPartEnum item = of(code);
|
||||
return item == null ? code : item.getLabel();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package cn.iocoder.lyzsys.module.tjt.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 合约规划设计阶段枚举。
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ProjectPlanningDesignStageEnum {
|
||||
|
||||
SCHEME("scheme", "方案"),
|
||||
CONSTRUCTION_DRAWING("construction_drawing", "施工图"),
|
||||
SCHEME_AND_CONSTRUCTION_DRAWING("scheme_and_construction_drawing", "方案+施工图");
|
||||
|
||||
private final String code;
|
||||
private final String label;
|
||||
|
||||
public static ProjectPlanningDesignStageEnum of(String code) {
|
||||
return Arrays.stream(values())
|
||||
.filter(item -> item.getCode().equals(code))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
public static boolean contains(String code) {
|
||||
return of(code) != null;
|
||||
}
|
||||
|
||||
public static String labelOf(String code) {
|
||||
ProjectPlanningDesignStageEnum item = of(code);
|
||||
return item == null ? code : item.getLabel();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package cn.iocoder.lyzsys.module.tjt.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 合约规划归属类型枚举。
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ProjectPlanningOwnershipTypeEnum {
|
||||
|
||||
MAJOR("major", "专业所"),
|
||||
COMPREHENSIVE("comprehensive", "综合所"),
|
||||
SPECIAL_SUBCONTRACT_MAJOR("special_subcontract_major", "专项分包-专业所"),
|
||||
SPECIAL_SUBCONTRACT_SOURCE_COOP("special_subcontract_source_coop", "专项分包-源头合作分包"),
|
||||
SPECIAL_SUBCONTRACT_COMPREHENSIVE("special_subcontract_comprehensive", "专项分包-综合所");
|
||||
|
||||
private final String code;
|
||||
private final String label;
|
||||
|
||||
public static ProjectPlanningOwnershipTypeEnum of(String code) {
|
||||
return Arrays.stream(values())
|
||||
.filter(item -> item.getCode().equals(code))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
public static boolean contains(String code) {
|
||||
return of(code) != null;
|
||||
}
|
||||
|
||||
public static String labelOf(String code) {
|
||||
ProjectPlanningOwnershipTypeEnum item = of(code);
|
||||
return item == null ? code : item.getLabel();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package cn.iocoder.lyzsys.module.tjt.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 虚拟产值计算方式枚举。
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ProjectPlanningVirtualCalculationMethodEnum {
|
||||
|
||||
GUIDANCE_PRICE("guidance_price", "指导单价法"),
|
||||
GUIDANCE_TOTAL_PRICE("guidance_total_price", "指导总价法"),
|
||||
WORKING_DAY("working_day", "工日法");
|
||||
|
||||
private final String code;
|
||||
private final String label;
|
||||
|
||||
public static ProjectPlanningVirtualCalculationMethodEnum of(String code) {
|
||||
return Arrays.stream(values())
|
||||
.filter(item -> item.getCode().equals(code))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
public static boolean contains(String code) {
|
||||
return of(code) != null;
|
||||
}
|
||||
|
||||
public static String labelOf(String code) {
|
||||
ProjectPlanningVirtualCalculationMethodEnum item = of(code);
|
||||
return item == null ? code : item.getLabel();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package cn.iocoder.lyzsys.module.tjt.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 项目状态枚举。
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ProjectStatusEnum {
|
||||
|
||||
IN_PROGRESS("in_progress", "进行中"),
|
||||
COMPLETED("completed", "完成"),
|
||||
PAUSED("paused", "暂停"),
|
||||
TERMINATED("terminated", "中止");
|
||||
|
||||
private final String code;
|
||||
private final String label;
|
||||
|
||||
public static ProjectStatusEnum of(String code) {
|
||||
return Arrays.stream(values())
|
||||
.filter(item -> item.getCode().equals(code))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
public static boolean contains(String code) {
|
||||
return of(code) != null;
|
||||
}
|
||||
|
||||
public static String labelOf(String code) {
|
||||
ProjectStatusEnum item = of(code);
|
||||
return item == null ? code : item.getLabel();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user