feat:预炸

This commit is contained in:
苏竹红
2025-06-23 17:12:39 +08:00
parent 2fb004de85
commit 2c8061f532
20 changed files with 486 additions and 48 deletions

View File

@@ -279,6 +279,7 @@ public enum ErrorCodeEnum {
PRE_FRY_PRODUCT_NOT_EXIST(1511029,"预炸品不存在",null),
PRE_FRY_RECORD_EXIST(1511030,"当前门店已存在同类型预炸资质申请记录",null),
PRE_FRY_APPLY_NOT_EXIST(1511030,"预炸资质申请信息不存在",null),
CURRENT_STAGE_NOT_OPERATION(1511030,"当前有更优选择,请确认!",null),
;

View File

@@ -0,0 +1,50 @@
package com.cool.store.enums;
/**
* 预炸产品申请类型枚举
* @Author suzhuhong
* @Date 2025/6/23 16:01
* @Version 1.0
*/
public enum PreFryApplyTypeEnum {
HAS_REFRIGERATED_DISPLAY(1, "有冷藏展示柜"),
HAS_NORMAL_DISPLAY(2, "有常温展示柜"),
NO_DISPLAY(3, "无展示柜");
private final int code;
private final String description;
PreFryApplyTypeEnum(int code, String description) {
this.code = code;
this.description = description;
}
public int getCode() {
return code;
}
public String getDescription() {
return description;
}
/**
* 根据code获取枚举
*/
public static PreFryApplyTypeEnum getByCode(int code) {
for (PreFryApplyTypeEnum type : values()) {
if (type.code == code) {
return type;
}
}
return null;
}
/**
* 根据code获取描述
*/
public static String getDescriptionByCode(int code) {
PreFryApplyTypeEnum type = getByCode(code);
return type != null ? type.description : "";
}
}

View File

@@ -0,0 +1,50 @@
package com.cool.store.enums;
/**
* @Author suzhuhong
* @Date 2025/6/23 15:49
* @Version 1.0
*/
public enum PreFryStageEnum {
PRE_FRY_COMPLETED(1, "预炸完成"),
STORED_IN_DISPLAY_CABINET(2, "存入展示柜"),
STORED_IN_FRIDGE(3, "放入冰箱"),
TAKEN_OUT_NEXT_DAY(4, "次日拿出"),
DISCARDED(5, "报废");
private final int code;
private final String description;
PreFryStageEnum(int code, String description) {
this.code = code;
this.description = description;
}
public int getCode() {
return code;
}
public String getDescription() {
return description;
}
/**
* 根据code获取枚举
*/
public static PreFryStageEnum getByCode(int code) {
for (PreFryStageEnum stage : values()) {
if (stage.code == code) {
return stage;
}
}
return null;
}
/**
* 根据code获取描述
*/
public static String getDescriptionByCode(int code) {
PreFryStageEnum stage = getByCode(code);
return stage != null ? stage.description : "";
}
}