fix: 小修补

This commit is contained in:
2026-08-10 17:43:16 +08:00
parent 2e1214fbff
commit 757ab83bee
10 changed files with 210 additions and 19 deletions

View File

@@ -0,0 +1,60 @@
package cn.code.nl.module.lms.enums;
import lombok.Getter;
/**
* 装箱区货位状态枚举 box_type_status
* @Author: liyongde
* @Date: 2026/8/10 16:48
*/
@Getter
public enum BoxPointStatusEnum {
/**
* 空位
*/
EMPTY(1, "空位"),
/**
* 空载具
*/
EMPTY_CONTAINER(2, "空载具"),
/**
* 有子卷
*/
HAS_SUB_ROLL(3, "有子卷"),
/**
* 合格品
*/
QUALIFIED(4, "合格品"),
/**
* 管制品
*/
CONTROLLED(5, "管制品");
/**
* 字典键值
*/
private final Integer code;
/**
* 字典标签
*/
private final String desc;
BoxPointStatusEnum(Integer code, String desc) {
this.code = code;
this.desc = desc;
}
/**
* 根据code获取对应枚举
* @param code 编码
* @return 匹配的枚举未找到返回null
*/
public static BoxPointStatusEnum getByCode(Integer code) {
for (BoxPointStatusEnum statusEnum : values()) {
if (statusEnum.getCode().equals(code)) {
return statusEnum;
}
}
return null;
}
}

View File

@@ -0,0 +1,55 @@
package cn.code.nl.module.lms.enums;
import lombok.Getter;
/**
* 装箱区货位类型枚举 box_point_type
* @Author: liyongde
* @Date: 2026/8/10 16:47
*/
@Getter
public enum BoxPointTypeEnum {
/**
* 下线点
*/
OFFLINE_POINT(1, "下线点"),
/**
* 待检点
*/
INSPECTION_PENDING_POINT(2, "待检点"),
/**
* 不合格点
*/
UNQUALIFIED_POINT(3, "不合格点"),
/**
* 装箱点
*/
PACKING_POINT(4, "装箱点"),
/**
* 装箱对接点
*/
PACKING_DOCK_POINT(5, "装箱对接点");
private final Integer code;
private final String desc;
BoxPointTypeEnum(Integer code, String desc) {
this.code = code;
this.desc = desc;
}
/**
* 根据编码获取对应枚举
* @param code 字典键值
* @return 匹配枚举无匹配返回null
*/
public static BoxPointTypeEnum getByCode(Integer code) {
for (BoxPointTypeEnum item : values()) {
if (item.getCode().equals(code)) {
return item;
}
}
return null;
}
}