feat: 增加LMS日计划领域模型
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package cn.code.nl.module.lms.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 日计划订单状态枚举
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum DailyPlanOrderStatusEnum {
|
||||
|
||||
NOT_STARTED(0),
|
||||
IN_PROGRESS(1),
|
||||
FINISHED(2),
|
||||
CANCELED(3);
|
||||
|
||||
/**
|
||||
* 订单状态编码
|
||||
*/
|
||||
private final Integer code;
|
||||
|
||||
/**
|
||||
* 根据编码获取订单状态
|
||||
*/
|
||||
public static DailyPlanOrderStatusEnum getByCode(Integer code) {
|
||||
for (DailyPlanOrderStatusEnum value : values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package cn.code.nl.module.lms.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 日计划来源类型枚举
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum DailyPlanSourceTypeEnum {
|
||||
|
||||
ERP(1),
|
||||
MANUAL(2);
|
||||
|
||||
/**
|
||||
* 来源类型编码
|
||||
*/
|
||||
private final Integer code;
|
||||
|
||||
/**
|
||||
* 根据编码获取来源类型
|
||||
*/
|
||||
public static DailyPlanSourceTypeEnum getByCode(Integer code) {
|
||||
for (DailyPlanSourceTypeEnum value : values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package cn.code.nl.module.lms.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 日计划策略模式枚举
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum DailyPlanStrategyModeEnum {
|
||||
|
||||
SEQUENCE(1),
|
||||
WEIGHT_ROUND_ROBIN(2);
|
||||
|
||||
/**
|
||||
* 策略模式编码
|
||||
*/
|
||||
private final Integer code;
|
||||
|
||||
/**
|
||||
* 根据编码获取策略模式
|
||||
*/
|
||||
public static DailyPlanStrategyModeEnum getByCode(Integer code) {
|
||||
for (DailyPlanStrategyModeEnum value : values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package cn.code.nl.module.lms.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 日计划策略类型枚举
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum DailyPlanStrategyTypeEnum {
|
||||
|
||||
STOCKING(1),
|
||||
SLEEVING(2);
|
||||
|
||||
/**
|
||||
* 策略类型编码
|
||||
*/
|
||||
private final Integer code;
|
||||
|
||||
/**
|
||||
* 根据编码获取策略类型
|
||||
*/
|
||||
public static DailyPlanStrategyTypeEnum getByCode(Integer code) {
|
||||
for (DailyPlanStrategyTypeEnum value : values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package cn.code.nl.module.lms.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 日计划作业状态枚举
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum DailyPlanWorkStatusEnum {
|
||||
|
||||
NOT_STARTED(0),
|
||||
IN_PROGRESS(1),
|
||||
COMPLETED(2),
|
||||
CANCELED(3);
|
||||
|
||||
/**
|
||||
* 作业状态编码
|
||||
*/
|
||||
private final Integer code;
|
||||
|
||||
/**
|
||||
* 根据编码获取作业状态
|
||||
*/
|
||||
public static DailyPlanWorkStatusEnum getByCode(Integer code) {
|
||||
for (DailyPlanWorkStatusEnum value : values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -45,4 +45,17 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode STOCKING_IVT_NOT_EXISTS = new ErrorCode(22, "备货区域点位不存在");
|
||||
ErrorCode PAPER_VEHICLE_POSITION_DUPLICATED = new ErrorCode(23, "托盘格位重复:{}");
|
||||
ErrorCode PAPER_VEHICLE_POSITION_OUT_OF_RANGE = new ErrorCode(24, "托盘格位超出5×5范围:{}");
|
||||
|
||||
// ========== LMS 日计划 ==========
|
||||
ErrorCode DAILY_PLAN_NOT_EXISTS = new ErrorCode(25, "日计划不存在");
|
||||
ErrorCode DAILY_PLAN_ERP_FINAL_STATUS_NOT_UPDATE = new ErrorCode(26, "ERP终态订单不可更新");
|
||||
ErrorCode DAILY_PLAN_ERP_PLAN_QTY_NOT_DECREASE = new ErrorCode(27, "ERP计划数量不能减少");
|
||||
ErrorCode DAILY_PLAN_STATUS_OPERATION_NOT_ALLOWED = new ErrorCode(28, "日计划当前状态{}不允许执行{}操作");
|
||||
ErrorCode DAILY_PLAN_COMPLETED_QTY_EXCEEDS_TOTAL = new ErrorCode(29, "日计划完成数量超过需求总量");
|
||||
ErrorCode DAILY_PLAN_VERSION_CONFLICT = new ErrorCode(30, "日计划数据已变化,请刷新重试");
|
||||
ErrorCode DAILY_PLAN_STRATEGY_NOT_EXISTS = new ErrorCode(31, "日计划策略不存在");
|
||||
ErrorCode DAILY_PLAN_SORT_SEQ_NOT_POSITIVE = new ErrorCode(32, "日计划顺序必须为正整数");
|
||||
ErrorCode DAILY_PLAN_WEIGHT_NOT_POSITIVE = new ErrorCode(33, "日计划权重必须为正整数");
|
||||
ErrorCode DAILY_PLAN_CANCEL_OR_RESUME_REASON_EMPTY = new ErrorCode(34, "取消或恢复原因不能为空");
|
||||
ErrorCode DAILY_PLAN_ERP_TOKEN_ERROR = new ErrorCode(35, "ERP日计划接口令牌错误");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user