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日计划接口令牌错误");
|
||||
}
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
package cn.code.nl.module.lms.dal.dataobject.dailyplan;
|
||||
|
||||
import cn.code.nl.framework.tenant.core.db.TenantBaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* LMS 日计划 DO
|
||||
*/
|
||||
@TableName("lms_daily_plan")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class DailyPlanDO extends TenantBaseDO {
|
||||
|
||||
/** 日计划 ID */
|
||||
@TableId
|
||||
private Long dailyPlanId;
|
||||
/** 日计划编码 */
|
||||
private String planCode;
|
||||
/** 来源类型 */
|
||||
private Integer sourceType;
|
||||
/** ERP 订单号 */
|
||||
private String erpOrderCode;
|
||||
/** 人工订单号 */
|
||||
private String manualOrderCode;
|
||||
/** 计划日期 */
|
||||
private LocalDate planDate;
|
||||
/** 物料 ID */
|
||||
private Long materialId;
|
||||
/** 物料编码 */
|
||||
private String materialCode;
|
||||
/** 物料名称 */
|
||||
private String materialName;
|
||||
/** 物料规格 */
|
||||
private String materialSpec;
|
||||
/** 计划数量 */
|
||||
private Integer planQty;
|
||||
/** 追加数量 */
|
||||
private Integer appendQty;
|
||||
/** 已备货数量 */
|
||||
private Integer stockedQty;
|
||||
/** 已套管数量 */
|
||||
private Integer sleevedQty;
|
||||
/** 包装信息 */
|
||||
private String packingInfo;
|
||||
/** 排序序号 */
|
||||
private Integer sortSeq;
|
||||
/** 调度权重 */
|
||||
private Integer weight;
|
||||
/** 订单状态 */
|
||||
private Integer orderStatus;
|
||||
/** 备货状态 */
|
||||
private Integer stockingStatus;
|
||||
/** 套管状态 */
|
||||
private Integer sleevingStatus;
|
||||
/** 前一订单状态 */
|
||||
private Integer previousOrderStatus;
|
||||
/** 前一备货状态 */
|
||||
private Integer previousStockingStatus;
|
||||
/** 前一套管状态 */
|
||||
private Integer previousSleevingStatus;
|
||||
/** 订单开始时间 */
|
||||
private LocalDateTime orderStartTime;
|
||||
/** 订单结束时间 */
|
||||
private LocalDateTime orderEndTime;
|
||||
/** 备货开始时间 */
|
||||
private LocalDateTime stockingStartTime;
|
||||
/** 备货完成时间 */
|
||||
private LocalDateTime stockingCompleteTime;
|
||||
/** 套管开始时间 */
|
||||
private LocalDateTime sleevingStartTime;
|
||||
/** 套管完成时间 */
|
||||
private LocalDateTime sleevingCompleteTime;
|
||||
/** 乐观锁版本号 */
|
||||
private Integer version;
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package cn.code.nl.module.lms.dal.dataobject.dailyplan;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* LMS 日计划操作日志 DO
|
||||
*/
|
||||
@TableName("lms_daily_plan_operation_log")
|
||||
@Data
|
||||
public class DailyPlanOperationLogDO {
|
||||
|
||||
/** 操作日志 ID */
|
||||
@TableId
|
||||
private Long operationLogId;
|
||||
/** 日计划 ID */
|
||||
private Long dailyPlanId;
|
||||
/** 操作对象 */
|
||||
private String operationTarget;
|
||||
/** 操作类型 */
|
||||
private String operationType;
|
||||
/** 操作前值 */
|
||||
private String beforeValue;
|
||||
/** 操作后值 */
|
||||
private String afterValue;
|
||||
/** 变更数量 */
|
||||
private Integer changeQty;
|
||||
/** 操作原因 */
|
||||
private String operationReason;
|
||||
/** 操作人 */
|
||||
private String operator;
|
||||
/** 操作时间 */
|
||||
private LocalDateTime operationTime;
|
||||
/** 是否删除 */
|
||||
@TableLogic
|
||||
private Boolean deleted;
|
||||
/** 租户编号 */
|
||||
private Long tenantId;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package cn.code.nl.module.lms.dal.dataobject.dailyplan;
|
||||
|
||||
import cn.code.nl.framework.tenant.core.db.TenantBaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* LMS 日计划调度策略 DO
|
||||
*/
|
||||
@TableName("lms_daily_plan_strategy")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class DailyPlanStrategyDO extends TenantBaseDO {
|
||||
|
||||
/** 策略 ID */
|
||||
@TableId
|
||||
private Long strategyId;
|
||||
/** 策略类型 */
|
||||
private Integer strategyType;
|
||||
/** 策略模式 */
|
||||
private Integer strategyMode;
|
||||
/** 当前游标日计划 ID */
|
||||
private Long cursorDailyPlanId;
|
||||
/** 乐观锁版本号 */
|
||||
private Integer version;
|
||||
}
|
||||
Reference in New Issue
Block a user