mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-02-01 19:24:57 +08:00
[feat] 新增枚举类
This commit is contained in:
parent
d6725f3040
commit
e0c60dd15b
@ -0,0 +1,43 @@
|
||||
package cn.iocoder.yudao.module.cms.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author wyw
|
||||
* @description 收费标注枚举
|
||||
* @date 2024/7/31
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ChargingStandardEnum {
|
||||
//厦建设
|
||||
XIA_BUILDING("xia_building","XB"),
|
||||
//包干价
|
||||
LUMP("lump","LU"),
|
||||
//其他省份
|
||||
OTHER("other","OT");
|
||||
|
||||
/**
|
||||
* 类型编号
|
||||
*/
|
||||
private final String code;
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
private final String no;
|
||||
|
||||
/**
|
||||
* 通过code获取no
|
||||
* @param code 字典编号
|
||||
* @return 类型编码
|
||||
*/
|
||||
public static String getNoByCode(String code) {
|
||||
for (ChargingStandardEnum value : values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value.getNo();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package cn.iocoder.yudao.module.cms.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author wyw
|
||||
* @description 合同状态枚举
|
||||
* @date 2024/7/31
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ContractStatusEnum {
|
||||
//应签未签
|
||||
NO_SIGN("no_sign","NS"),
|
||||
//已拟定
|
||||
PREPARED("prepared","PP"),
|
||||
//已盖章
|
||||
STAMP("stamp","ST"),
|
||||
//已签订
|
||||
SIGN("sign","SI"),
|
||||
//已终止
|
||||
TERMINATION("termination","TE"),;
|
||||
|
||||
/**
|
||||
* 类型编号
|
||||
*/
|
||||
private final String code;
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
private final String no;
|
||||
|
||||
/**
|
||||
* 通过code获取no
|
||||
* @param code 字典编号
|
||||
* @return 类型编码
|
||||
*/
|
||||
public static String getNoByCode(String code) {
|
||||
for (ContractStatusEnum value : values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value.getNo();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package cn.iocoder.yudao.module.cms.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author wyw
|
||||
* @description 合同类型枚举
|
||||
* @date 2024/7/31
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ContractTypeEnum {
|
||||
//勘察设计
|
||||
SURVEY("survey","KS"),
|
||||
//检测
|
||||
DETECTION("detection","JC"),
|
||||
//总承包合同
|
||||
GENERAL_CONTRACT("general_contract","GC"),
|
||||
//全过程咨询
|
||||
PROCESS_CONSULTATION("process_consultation","PC");
|
||||
|
||||
|
||||
/**
|
||||
* 类型编号
|
||||
*/
|
||||
private final String code;
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
private final String no;
|
||||
|
||||
/**
|
||||
* 通过code获取no
|
||||
* @param code 字典编号
|
||||
* @return 类型编码
|
||||
*/
|
||||
public static String getNoByCode(String code) {
|
||||
for (ContractTypeEnum value : values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value.getNo();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package cn.iocoder.yudao.module.cms.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author wyw
|
||||
* @description 计费方式枚举
|
||||
* @date 2024/7/31
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum CountTypeEnum {
|
||||
//费率合同
|
||||
RATE_CONTRACT("rate_contract","RC"),
|
||||
//包干合同
|
||||
RES_CONTRACT("res_contract","RC");
|
||||
/**
|
||||
* 类型编号
|
||||
*/
|
||||
private final String code;
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
private final String no;
|
||||
|
||||
/**
|
||||
* 通过code获取no
|
||||
* @param code 字典编号
|
||||
* @return 类型编码
|
||||
*/
|
||||
public static String getNoByCode(String code) {
|
||||
for (CountTypeEnum value : values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value.getNo();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package cn.iocoder.yudao.module.cms.enums;
|
||||
|
||||
/**
|
||||
* @author hhyykk
|
||||
* @description 字典枚举
|
||||
* @date 2024/7/3
|
||||
*/
|
||||
public interface DictTypeConstants {
|
||||
|
||||
// ***** 字典名称 ******
|
||||
String Contract_Type = "contract_type"; // 合同类型
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -8,11 +8,14 @@ import cn.iocoder.yudao.framework.common.exception.ErrorCode;
|
||||
* @date 2024/7/3
|
||||
*/
|
||||
public interface ErrorCodeConstants {
|
||||
ErrorCode CUSTOMER_COMPANY_NOT_EXISTS = new ErrorCode(1_020_000_000, "客户公司管理不存在");
|
||||
|
||||
// ========== 客户公司 1_020_000_000 ==========
|
||||
ErrorCode CUSTOMER_COMPANY_NOT_EXISTS = new ErrorCode(1_020_000_000, "客户公司不存在");
|
||||
// ========== 项目信息 1_021_000_000 ==========
|
||||
ErrorCode PROJECT_NOT_EXISTS = new ErrorCode(1_021_000_000, "项目信息不存在");
|
||||
// ========== 请求参数 1_022_000_000 ==========
|
||||
ErrorCode PARAM_NOT_EXISTS = new ErrorCode(1_022_000_000, "请求参数不存在");
|
||||
|
||||
ErrorCode PARAM_NOT_EXISTS = new ErrorCode(1_022_000_000, "请求参数错误");
|
||||
ErrorCode PARAM_ERROR = new ErrorCode(1_022_001_000, "请求参数错误");
|
||||
|
||||
// ========== 外包合同 2_021_000_000 ==========
|
||||
ErrorCode OUTS_CONTRACT_NOT_EXISTS = new ErrorCode(2_021_000_000, "外包合同不存在");
|
||||
@ -23,21 +26,27 @@ public interface ErrorCodeConstants {
|
||||
// ========== 外包合同关联 2_023_000_000 ==========
|
||||
ErrorCode CONTRACT_OUTS_NOT_EXISTS = new ErrorCode(2_023_000_000, "外包合同关联不存在");
|
||||
|
||||
ErrorCode CONTRACT_OUTS_ALREADY_EXISTS = new ErrorCode(2_023_000_000, "外包合同关联已经存在");
|
||||
ErrorCode CONTRACT_OUTS_ALREADY_EXISTS = new ErrorCode(2_023_001_000, "外包合同关联已经存在");
|
||||
|
||||
// ========== 合同信息 2_024_000_000 ==========
|
||||
ErrorCode CONTRACT_NOT_EXISTS = new ErrorCode(2_024_000_000, "合同不存在");
|
||||
|
||||
|
||||
ErrorCode CONTRACT_NAME_NOT_EXISTS = new ErrorCode(2_024_001_000, "合同名称不存在");
|
||||
|
||||
ErrorCode CONTRACT_ALREADY_EXISTS = new ErrorCode(2_024_002_000, "该合同已经创建");
|
||||
|
||||
|
||||
// ========== 历史合同信息 2_025_000_000 ==========
|
||||
ErrorCode CONTRACT_HISTORY_NOT_EXISTS = new ErrorCode(2_025_000_000, "历史合同不存在");
|
||||
|
||||
|
||||
// ========== 外部合同信息 2_026_000_000 ==========
|
||||
ErrorCode EXT_CONTRACT_NOT_EXISTS = new ErrorCode(2_026_000_000, "外部合同不存在");
|
||||
|
||||
|
||||
// ========== 历史外部合同信息 2_027_000_000 ==========
|
||||
ErrorCode EXT_CONTRACT_HISTORY_NOT_EXISTS = new ErrorCode(2_027_000_000, "历史外部合同不存在");
|
||||
|
||||
// ========== 外部合同关联 2_028_000_000 ==========
|
||||
ErrorCode CONTRACT_EXT_NOT_EXISTS = new ErrorCode(2_028_000_000, "外部合同关联不存在");
|
||||
|
||||
|
||||
|
@ -0,0 +1,47 @@
|
||||
package cn.iocoder.yudao.module.cms.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author wyw
|
||||
* @description 外包合同专业枚举
|
||||
* @date 2024/7/31
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum OutsContractMajorEnum {
|
||||
//地勘
|
||||
GROUND_SERVICE("ground_service","GE"),
|
||||
//景观
|
||||
SCENERY("scenery","SC"),
|
||||
//建筑
|
||||
ARCHITECTURE("architecture","AR"),
|
||||
//测量
|
||||
MEASURE("measure","ME"),
|
||||
//效果图
|
||||
EFFECT_PICTURE("effect_picture","EF");
|
||||
|
||||
/**
|
||||
* 类型编号
|
||||
*/
|
||||
private final String code;
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
private final String no;
|
||||
|
||||
/**
|
||||
* 通过code获取no
|
||||
* @param code 字典编号
|
||||
* @return 类型编码
|
||||
*/
|
||||
public static String getNoByCode(String code) {
|
||||
for (OutsContractMajorEnum value : values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value.getNo();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package cn.iocoder.yudao.module.cms.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author wyw
|
||||
* @description 资金来源枚举
|
||||
* @date 2024/7/31
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum SourceEnum {
|
||||
//市财政
|
||||
MUNICIPAL_FINANCE("municipal_finance","MF"),
|
||||
//区财政
|
||||
DISTRICT_FINANCE("district_finance","DF"),
|
||||
//业主自筹
|
||||
OWNER_FINANCE("owner_finance","OF");
|
||||
/**
|
||||
* 类型编号
|
||||
*/
|
||||
private final String code;
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
private final String no;
|
||||
|
||||
/**
|
||||
* 通过code获取no
|
||||
* @param code 字典编号
|
||||
* @return 类型编码
|
||||
*/
|
||||
public static String getNoByCode(String code) {
|
||||
for (SourceEnum value : values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value.getNo();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package cn.iocoder.yudao.module.pms.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author wyw
|
||||
* @description 主控部门枚举
|
||||
* @date 2024/7/31
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum TrackingDepEnum {
|
||||
// 生产一部
|
||||
FIRST_PRODUCE("first-produce", "FP"),
|
||||
// 生产二部
|
||||
SECOND_PRODUCE("second_produce", "DP"),
|
||||
// 检测院
|
||||
LOD("lod", "LO");
|
||||
/**
|
||||
* 类型编号
|
||||
*/
|
||||
private final String code;
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
private final String no;
|
||||
|
||||
/**
|
||||
* 通过code获取no
|
||||
* @param code 字典编号
|
||||
* @return 类型编码
|
||||
*/
|
||||
public static String getNoByCode(String code) {
|
||||
for (TrackingDepEnum value : values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value.getNo();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user