选址
This commit is contained in:
@@ -21,6 +21,8 @@ public enum ErrorCodeEnum {
|
||||
PUBLIC_LINE_NOT_FOLLOW(419, "该线索已存在公海,无跟进人", null),
|
||||
LINE_EXIST_FOLLOW(420, "该线索已存在,跟进人为【{0},{1}】", null),
|
||||
|
||||
ERROR_MESSAGE(421, "{0}", null),
|
||||
|
||||
|
||||
/**
|
||||
* 000000 未知错误
|
||||
@@ -92,6 +94,14 @@ public enum ErrorCodeEnum {
|
||||
USER_NOT_ALLOW_ENTER_ROOM(600007, "当前用户不允许进入面试房间", null),
|
||||
|
||||
SHOP_STAGE_ERROR(600008, "店铺阶段错误", null),
|
||||
SHOP_NOT_EXIST(600009, "店铺不存在", null),
|
||||
POINT_IS_SELECTED(600010, "该铺位已被其他人选择", null),
|
||||
POINT_ALREADY_SELECT(600011, "该铺位已被您选择", null),
|
||||
SHOP_IS_SELECTED(600012, "该店铺已选址", null),
|
||||
SHOP_STAGE_NOT_OPERATE(600013, "当前店铺所处阶段不允许该操作", null),
|
||||
POINT_IS_LOCK(600014, "当前铺位已被锁定,刷新后再试", null),
|
||||
POINT_IS_INVALID(600015, "该铺位已失效", null),
|
||||
POINT_SELECTED(600016, "该铺位已被选择", null),
|
||||
|
||||
INTERVIEW_ENTER_FAIL(1021101, "进入面审间失败", null),
|
||||
DINGDING_USER_NOT_EXIST(1021102, "用户钉钉信息不存在,无法发起资质审核!", null),
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.List;
|
||||
* @Description:
|
||||
* @date 2024-04-01 14:38
|
||||
*/
|
||||
public enum PointRecommendStatus {
|
||||
public enum PointRecommendStatusEnum {
|
||||
|
||||
//状态 1.待选择 2.已选择 3.已被他人选择 4.已签约 5.已拒绝 6.已失效
|
||||
POINT_RECOMMEND_STATUS_1(1, "待选择"),
|
||||
@@ -24,7 +24,7 @@ public enum PointRecommendStatus {
|
||||
|
||||
private String desc;
|
||||
|
||||
PointRecommendStatus(Integer code, String desc) {
|
||||
PointRecommendStatusEnum(Integer code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
@@ -37,19 +37,19 @@ public enum PointRecommendStatus {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public static PointRecommendStatus getByCode(Integer code) {
|
||||
for (PointRecommendStatus pointRecommendStatus : PointRecommendStatus.values()) {
|
||||
if (pointRecommendStatus.getCode().equals(code)) {
|
||||
return pointRecommendStatus;
|
||||
public static PointRecommendStatusEnum getByCode(Integer code) {
|
||||
for (PointRecommendStatusEnum pointRecommendStatusEnum : PointRecommendStatusEnum.values()) {
|
||||
if (pointRecommendStatusEnum.getCode().equals(code)) {
|
||||
return pointRecommendStatusEnum;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getDescByCode(Integer code) {
|
||||
for (PointRecommendStatus pointRecommendStatus : PointRecommendStatus.values()) {
|
||||
if (pointRecommendStatus.getCode().equals(code)) {
|
||||
return pointRecommendStatus.getDesc();
|
||||
for (PointRecommendStatusEnum pointRecommendStatusEnum : PointRecommendStatusEnum.values()) {
|
||||
if (pointRecommendStatusEnum.getCode().equals(code)) {
|
||||
return pointRecommendStatusEnum.getDesc();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
@@ -14,10 +14,14 @@ public enum ShopStageEnum {
|
||||
SHOP_STAGE_3(3, "开业"),
|
||||
;
|
||||
|
||||
//店铺阶段
|
||||
private Integer shopStage;
|
||||
|
||||
//阶段名称
|
||||
private String stageName;
|
||||
|
||||
|
||||
|
||||
ShopStageEnum(Integer shopStage, String stageName) {
|
||||
this.shopStage = shopStage;
|
||||
this.stageName = stageName;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.enums.point;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -11,17 +12,17 @@ import java.util.List;
|
||||
*/
|
||||
public enum ShopSubStageEnum {
|
||||
|
||||
SHOP_STAGE_1(ShopStageEnum.SHOP_STAGE_1, 10, "选址"),
|
||||
SHOP_STAGE_2(ShopStageEnum.SHOP_STAGE_1, 20, "上传租赁合同"),
|
||||
SHOP_STAGE_3(ShopStageEnum.SHOP_STAGE_2, 30, "系统建店"),
|
||||
SHOP_STAGE_4(ShopStageEnum.SHOP_STAGE_2, 40, "证照办理"),
|
||||
SHOP_STAGE_5(ShopStageEnum.SHOP_STAGE_2, 50, "员工招聘"),
|
||||
SHOP_STAGE_6(ShopStageEnum.SHOP_STAGE_2, 60, "加盟商/员工培训"),
|
||||
SHOP_STAGE_7(ShopStageEnum.SHOP_STAGE_2, 70, "缴纳加盟费/保证金"),
|
||||
SHOP_STAGE_8(ShopStageEnum.SHOP_STAGE_2, 80, "加盟合同签约"),
|
||||
SHOP_STAGE_9(ShopStageEnum.SHOP_STAGE_2, 90, "设计阶段"),
|
||||
SHOP_STAGE_10(ShopStageEnum.SHOP_STAGE_2, 100, "施工阶段"),
|
||||
SHOP_STAGE_11(ShopStageEnum.SHOP_STAGE_2, 110, "三方验收"),
|
||||
SHOP_STAGE_1(ShopStageEnum.SHOP_STAGE_1, 10, "选址", 3),
|
||||
SHOP_STAGE_2(ShopStageEnum.SHOP_STAGE_1, 20, "上传租赁合同", 2),
|
||||
SHOP_STAGE_3(ShopStageEnum.SHOP_STAGE_2, 30, "系统建店", 2),
|
||||
SHOP_STAGE_4(ShopStageEnum.SHOP_STAGE_2, 40, "证照办理", 2),
|
||||
SHOP_STAGE_5(ShopStageEnum.SHOP_STAGE_2, 50, "员工招聘", 2),
|
||||
SHOP_STAGE_6(ShopStageEnum.SHOP_STAGE_2, 60, "加盟商/员工培训", 2),
|
||||
SHOP_STAGE_7(ShopStageEnum.SHOP_STAGE_2, 70, "缴纳加盟费/保证金", 2),
|
||||
SHOP_STAGE_8(ShopStageEnum.SHOP_STAGE_2, 80, "加盟合同签约", 2),
|
||||
SHOP_STAGE_9(ShopStageEnum.SHOP_STAGE_2, 90, "设计阶段", 2),
|
||||
SHOP_STAGE_10(ShopStageEnum.SHOP_STAGE_2, 100, "施工阶段", 2),
|
||||
SHOP_STAGE_11(ShopStageEnum.SHOP_STAGE_2, 110, "三方验收", 2),
|
||||
;
|
||||
|
||||
//阶段
|
||||
@@ -33,10 +34,14 @@ public enum ShopSubStageEnum {
|
||||
//子阶段名称
|
||||
private String shopSubStageName;
|
||||
|
||||
ShopSubStageEnum(ShopStageEnum shopStageEnum, Integer shopSubStage, String shopSubStageName) {
|
||||
//计划完成天数
|
||||
private Integer planCompleteDays;
|
||||
|
||||
ShopSubStageEnum(ShopStageEnum shopStageEnum, Integer shopSubStage, String shopSubStageName, Integer planCompleteDays) {
|
||||
this.shopStageEnum = shopStageEnum;
|
||||
this.shopSubStage = shopSubStage;
|
||||
this.shopSubStageName = shopSubStageName;
|
||||
this.planCompleteDays = planCompleteDays;
|
||||
}
|
||||
|
||||
public static List<ShopSubStageEnum> getShopStageEnum(Integer shopStage) {
|
||||
@@ -61,6 +66,10 @@ public enum ShopSubStageEnum {
|
||||
return shopSubStageName;
|
||||
}
|
||||
|
||||
public Integer getPlanCompleteDays() {
|
||||
return planCompleteDays;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取各阶段的初始状态
|
||||
* @return
|
||||
@@ -94,4 +103,29 @@ public enum ShopSubStageEnum {
|
||||
}
|
||||
}
|
||||
|
||||
public static Integer getSelectStageMaxDays() {
|
||||
return Math.max(ShopSubStageEnum.SHOP_STAGE_1.getPlanCompleteDays(), ShopSubStageEnum.SHOP_STAGE_2.getPlanCompleteDays());
|
||||
|
||||
}
|
||||
|
||||
public String getPlanCompleteTime(LocalDate planCompleteTime, LocalDate planSelectPointCompleteDate) {
|
||||
switch (this){
|
||||
case SHOP_STAGE_1:
|
||||
case SHOP_STAGE_2:
|
||||
case SHOP_STAGE_5:
|
||||
case SHOP_STAGE_6:
|
||||
case SHOP_STAGE_7:
|
||||
case SHOP_STAGE_8:
|
||||
return planCompleteTime.plusDays(getPlanCompleteDays()).toString();
|
||||
case SHOP_STAGE_3:
|
||||
case SHOP_STAGE_4:
|
||||
case SHOP_STAGE_9:
|
||||
case SHOP_STAGE_10:
|
||||
case SHOP_STAGE_11:
|
||||
return planSelectPointCompleteDate.plusDays(getPlanCompleteDays()).toString();
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user