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_31(ShopSubStageEnum.SHOP_STAGE_3, 310, "审核中", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_32(ShopSubStageEnum.SHOP_STAGE_3, 320, "未通过", 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_41(ShopSubStageEnum.SHOP_STAGE_4, 410, "待审核", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_42(ShopSubStageEnum.SHOP_STAGE_4, 420, "审核未通过", 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_60(ShopSubStageEnum.SHOP_STAGE_6, 600, "培训中", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_61(ShopSubStageEnum.SHOP_STAGE_6, 610, "已完成", 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_91(ShopSubStageEnum.SHOP_STAGE_9, 910, "已完成", Boolean.TRUE),

    //装修款
    SHOP_SUB_STAGE_STATUS_100(ShopSubStageEnum.SHOP_STAGE_10, 1000, "待缴费", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_101(ShopSubStageEnum.SHOP_STAGE_10, 1010, "待审批", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_102(ShopSubStageEnum.SHOP_STAGE_10, 1020, "已缴费", 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_120(ShopSubStageEnum.SHOP_STAGE_12, 1200, "待预约", Boolean.FALSE),
    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_130(ShopSubStageEnum.SHOP_STAGE_13, 1300, "待验收", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_131(ShopSubStageEnum.SHOP_STAGE_13, 1310, "验收不通过", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_132(ShopSubStageEnum.SHOP_STAGE_13, 1320,"验收通过", 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_152(ShopSubStageEnum.SHOP_STAGE_15, 1505, "待缴纳", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_151(ShopSubStageEnum.SHOP_STAGE_15, 1510, "已完成", Boolean.TRUE),


    SHOP_SUB_STAGE_STATUS_160(ShopSubStageEnum.SHOP_STAGE_16, 1600, "验收中", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_161(ShopSubStageEnum.SHOP_STAGE_16, 1610, "已完成", Boolean.TRUE),

    SHOP_SUB_STAGE_STATUS_170(ShopSubStageEnum.SHOP_STAGE_17, 1700, "试运营中", Boolean.FALSE),
    SHOP_SUB_STAGE_STATUS_171(ShopSubStageEnum.SHOP_STAGE_17, 1710, "已完成", 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;
    }
}
