订单绑定相关
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
package com.zt.plat.module.contractorder.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public enum OrderTypeEnum {
|
||||
// 基础业务订单
|
||||
SALE("SALE", "销售", 0),
|
||||
PUR("PUR", "采购", 1),
|
||||
ENT("ENT", "委托加工", 2),
|
||||
ENTED_PUR("ENTED_PUR", "来料加工-采购", 3),
|
||||
ENTED_SALE("ENTED_SALE", "来料加工-销售", 10),
|
||||
|
||||
// 物流服务订单
|
||||
HD_13("13HD", "货运代理", 4),
|
||||
YS_10("10YS", "货物运输", 5),
|
||||
CC_11("11CC", "货物保管仓储", 6),
|
||||
BX_03("03BX", "货物保险", 7);
|
||||
|
||||
/** 订单类型编码(字典键值) */
|
||||
private final String code;
|
||||
/** 订单类型描述(字典标签) */
|
||||
private final String description;
|
||||
/** 排序号(字典排序) */
|
||||
private final Integer sort;
|
||||
|
||||
OrderTypeEnum(String code, String description, Integer sort) {
|
||||
this.code = code;
|
||||
this.description = description;
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据编码获取枚举
|
||||
*/
|
||||
public static OrderTypeEnum getByCode(String code) {
|
||||
if (code == null || code.trim().isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
for (OrderTypeEnum type : values()) {
|
||||
if (type.getCode().equals(code.trim())) {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import com.zt.plat.framework.common.exception.ErrorCode;
|
||||
*/
|
||||
public interface ErrorCodeConstants {
|
||||
|
||||
ErrorCode PURCHASE_ORDER_NOT_EXISTS = new ErrorCode(1_008_000_001, "采购订单不存在");
|
||||
ErrorCode PURCHASE_ORDER_NOT_EXISTS = new ErrorCode(1_008_000_001, "订单不存在");
|
||||
ErrorCode ORDER_ID_NOT_EXISTS = new ErrorCode(1_008_000_010, "订单id不能为空");
|
||||
ErrorCode PRCH_ORD_DTL_NOT_EXISTS = new ErrorCode(1_008_001_001, "采购订单明细不存在");
|
||||
ErrorCode PURCHASE_ORDER_STATUS_ERROR = new ErrorCode(1_008_001_020, "非法的订单状态");
|
||||
@@ -22,4 +22,7 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode WAREHOUSE_CODE_OR_FACTORY_CODE_NOT_EXISTS = new ErrorCode(1_008_000_151, "{}");
|
||||
ErrorCode ERP_ORDER_UPDATE_FAILED = new ErrorCode(1_008_000_160, "erp订单更新失败");
|
||||
ErrorCode ORDER_DETAIL_NOT_EXISTS = new ErrorCode(1_008_000_060, "订单明细不能为空");
|
||||
ErrorCode PURCHASE_ORDER_ID_IS_NULL = new ErrorCode(1_008_000_070, "订单ID不能为空");
|
||||
ErrorCode PURCHASE_ORDER_ID_IS_EMPTY = new ErrorCode(1_008_000_080, "业务订单类型非法,请参考字典:SPLY_BSN_TP");
|
||||
ErrorCode PURCHASE_ORDER_NOT_ALLOW_BIND = new ErrorCode(1_008_000_090, "来料销售加工订单不允许绑定订单");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user