package com.cool.store.enums.point;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * @author zhangchenbiao
 * @FileName: ShopStageStatusEnum
 * @Description:店铺阶段状态
 * @date 2024-04-10 17:34
 */
public enum ShopSubStageStatusEnum {

    SHOP_SUB_STAGE_STATUS_00(null, -100, "未开始", Boolean.FALSE),

    //选址
    SHOP_SUB_STAGE_STATUS_10(ShopSubStageEnum.SHOP_STAGE_1, 100, "待选址", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_11(ShopSubStageEnum.SHOP_STAGE_1, 110, "待审核", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_12(ShopSubStageEnum.SHOP_STAGE_1, 120, "已选址", Boolean.TRUE),

    //上传租赁合同
    SHOP_SUB_STAGE_STATUS_20(ShopSubStageEnum.SHOP_STAGE_2, 200, "待上传", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_21(ShopSubStageEnum.SHOP_STAGE_2, 210, "待审核", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_22(ShopSubStageEnum.SHOP_STAGE_2, 220, "审核未通过", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_23(ShopSubStageEnum.SHOP_STAGE_2, 230, "审核通过", Boolean.TRUE),

    //营业执照办理
     SHOP_SUB_STAGE_STATUS_30(ShopSubStageEnum.SHOP_STAGE_3, 300, "待提交", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_33(ShopSubStageEnum.SHOP_STAGE_3, 330, "已完成", Boolean.TRUE),
    //食安许可证
    SHOP_SUB_STAGE_STATUS_40(ShopSubStageEnum.SHOP_STAGE_4, 400, "待提交", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_43(ShopSubStageEnum.SHOP_STAGE_4, 430, "已完成", Boolean.TRUE),

    //培训登记
    SHOP_SUB_STAGE_STATUS_50(ShopSubStageEnum.SHOP_STAGE_5, 500, "登记中", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_51(ShopSubStageEnum.SHOP_STAGE_5, 510, "已完成", Boolean.TRUE),

    //缴纳加盟费/保证金
    SHOP_SUB_STAGE_STATUS_70(ShopSubStageEnum.SHOP_STAGE_7, 700, "待发布账单", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_71(ShopSubStageEnum.SHOP_STAGE_7, 710, "待缴费", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_72(ShopSubStageEnum.SHOP_STAGE_7, 720, "待审核", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_73(ShopSubStageEnum.SHOP_STAGE_7, 730, "已缴费", Boolean.TRUE),
    SHOP_SUB_STAGE_STATUS_74(ShopSubStageEnum.SHOP_STAGE_7, 740, "审核不通过", Boolean.FALSE),

    //加盟合同签约
    SHOP_SUB_STAGE_STATUS_80(ShopSubStageEnum.SHOP_STAGE_8, 800, "待提交", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_83(ShopSubStageEnum.SHOP_STAGE_8, 830, "审核中", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_84(ShopSubStageEnum.SHOP_STAGE_8, 840, "已签约", Boolean.TRUE),
    SHOP_SUB_STAGE_STATUS_85(ShopSubStageEnum.SHOP_STAGE_8, 850, "退回", Boolean.FALSE),

    //设计阶段
    SHOP_SUB_STAGE_STATUS_90(ShopSubStageEnum.SHOP_STAGE_9, 900, "待上传", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_905(ShopSubStageEnum.SHOP_STAGE_9, 905, "待确认", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_91(ShopSubStageEnum.SHOP_STAGE_9, 910, "已完成", Boolean.TRUE),

    //施工阶段
    SHOP_SUB_STAGE_STATUS_110(ShopSubStageEnum.SHOP_STAGE_11, 1100, "待提交", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_111(ShopSubStageEnum.SHOP_STAGE_11, 1110, "施工中", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_112(ShopSubStageEnum.SHOP_STAGE_11, 1120, "已完成", Boolean.TRUE),

    //三方验收 （待预约去掉）
    SHOP_SUB_STAGE_STATUS_121(ShopSubStageEnum.SHOP_STAGE_12, 1210, "待验收", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_122(ShopSubStageEnum.SHOP_STAGE_12, 1220, "验收中", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_123(ShopSubStageEnum.SHOP_STAGE_12, 1230, "已验收", Boolean.TRUE),

    //开业运营方案
    SHOP_SUB_STAGE_STATUS_140(ShopSubStageEnum.SHOP_STAGE_14, 1400, "待上传", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_141(ShopSubStageEnum.SHOP_STAGE_14, 1420, "待审核", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_142(ShopSubStageEnum.SHOP_STAGE_14, 1430,"审核不通过", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_143(ShopSubStageEnum.SHOP_STAGE_14, 1440, "已完成", Boolean.TRUE),

    //平台资料提交
    SHOP_SUB_STAGE_STATUS_150(ShopSubStageEnum.SHOP_STAGE_15, 1500, "待提交", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_153(ShopSubStageEnum.SHOP_STAGE_15, 1530, "已完成", Boolean.TRUE),

    //POS
    SHOP_SUB_STAGE_STATUS_160(ShopSubStageEnum.SHOP_STAGE_16, 1600, "待提交", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_163(ShopSubStageEnum.SHOP_STAGE_16, 1630, "已完成", Boolean.TRUE),

    //订货系统
    SHOP_SUB_STAGE_STATUS_170(ShopSubStageEnum.SHOP_STAGE_17, 1700, "待提交", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_173(ShopSubStageEnum.SHOP_STAGE_17, 1730, "已完成", Boolean.TRUE),

    //抖音
    SHOP_SUB_STAGE_STATUS_180(ShopSubStageEnum.SHOP_STAGE_18, 1800, "待申请", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_181(ShopSubStageEnum.SHOP_STAGE_18, 1810, "受理中", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_182(ShopSubStageEnum.SHOP_STAGE_18, 1820,"开通失败", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_183(ShopSubStageEnum.SHOP_STAGE_18, 1830, "开通成功", Boolean.TRUE),

    //美团外卖
    SHOP_SUB_STAGE_STATUS_190(ShopSubStageEnum.SHOP_STAGE_19, 1900, "待申请", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_191(ShopSubStageEnum.SHOP_STAGE_19, 1910, "初审中", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_193(ShopSubStageEnum.SHOP_STAGE_19, 1930,"受理中", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_194(ShopSubStageEnum.SHOP_STAGE_19, 1940,"开通失败", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_195(ShopSubStageEnum.SHOP_STAGE_19, 1950, "开通成功", Boolean.TRUE),

    //美团团购
    SHOP_SUB_STAGE_STATUS_200(ShopSubStageEnum.SHOP_STAGE_20, 2000, "待申请", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_201(ShopSubStageEnum.SHOP_STAGE_20, 2010, "受理中", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_202(ShopSubStageEnum.SHOP_STAGE_20, 2020,"开通失败", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_203(ShopSubStageEnum.SHOP_STAGE_20, 2030, "开通成功", Boolean.TRUE),

    //饿了么
    SHOP_SUB_STAGE_STATUS_210(ShopSubStageEnum.SHOP_STAGE_21, 2100, "待申请", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_211(ShopSubStageEnum.SHOP_STAGE_21, 2110, "初审中", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_213(ShopSubStageEnum.SHOP_STAGE_21, 2130,"受理中", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_214(ShopSubStageEnum.SHOP_STAGE_21, 2140,"开通失败", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_215(ShopSubStageEnum.SHOP_STAGE_21, 2150, "开通成功", Boolean.TRUE),

    //快手
    SHOP_SUB_STAGE_STATUS_220(ShopSubStageEnum.SHOP_STAGE_22, 2200, "待申请", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_221(ShopSubStageEnum.SHOP_STAGE_22, 2210, "受理中", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_222(ShopSubStageEnum.SHOP_STAGE_22, 2220,"开通失败", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_223(ShopSubStageEnum.SHOP_STAGE_22, 2230, "开通成功", Boolean.TRUE),


    //信发系统开通
    SHOP_SUB_STAGE_STATUS_230(ShopSubStageEnum.SHOP_STAGE_23, 2300, "待提交", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_235(ShopSubStageEnum.SHOP_STAGE_23, 2350, "已完成", Boolean.TRUE),

    //营帐通开通
    SHOP_SUB_STAGE_STATUS_240(ShopSubStageEnum.SHOP_STAGE_24, 2400, "待提交", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_245(ShopSubStageEnum.SHOP_STAGE_24, 2450, "已完成", Boolean.TRUE),

    ;

    private ShopSubStageEnum shopSubStageEnum;

    private Integer shopSubStageStatus;

    private String shopSubStageStatusName;

    private boolean isTerminated;


    ShopSubStageStatusEnum(ShopSubStageEnum shopSubStageEnum, Integer shopSubStageStatus, String shopSubStageStatusName, Boolean isTerminated) {
        this.shopSubStageEnum = shopSubStageEnum;
        this.shopSubStageStatus = shopSubStageStatus;
        this.shopSubStageStatusName = shopSubStageStatusName;
        this.isTerminated = isTerminated;
    }

    public static List<ShopSubStageStatusEnum> getShopSubStageStatusEnum(ShopSubStageEnum shopSubStage) {
        List<ShopSubStageStatusEnum> resultList = new ArrayList<>();
        for (ShopSubStageStatusEnum stageStatusEnum : ShopSubStageStatusEnum.values()) {
            if (Objects.nonNull(stageStatusEnum.getShopSubStageEnum()) && stageStatusEnum.getShopSubStageEnum().equals(shopSubStage)) {
                resultList.add(stageStatusEnum);
            }
        }
        return resultList;
    }

    public ShopSubStageEnum getShopSubStageEnum() {
        return shopSubStageEnum;
    }

    public Integer getShopSubStageStatus() {
        return shopSubStageStatus;
    }

    public String getShopSubStageStatusName() {
        return shopSubStageStatusName;
    }

    public String getShopSubStageName() {
        return shopSubStageEnum.getShopSubStageName();
    }

    public boolean isTerminated() {
        return isTerminated;
    }
}
