package com.zfire.jiasm.syncdata.constant;




import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;

public class Constant {
    //feign 内部用header
    public static final String FEIGN_HEADER = "privacy";

    //校验的token
    public static final String TOKEN_NAME = "x-token";

    public final static String TOKEN = "authorization_token";

    public final static String SALES_TYPE_GCJ = "工程机";
    //京东商城
    public final static String SALES_JD = "京东商城";
    //天猫
    public final static String SALES_TM = "天猫旗舰店";

    //家用空调
    public final static Integer MAIN_ID_101 = 101;
    public final static String MAIN_NUMBER_101 = "101";
    //空气能热水器
    public final static Integer MAIN_ID_103 = 103;
    public final static String MAIN_NUMBER_103 = "103";
    //生活电器
    public final static Integer MAIN_ID_104 = 104;
    public final static String MAIN_NUMBER_104 = "104";
    //冰箱
    public final static Integer MAIN_ID_106 = 106;
    public final static String MAIN_NUMBER_106 = "106";
    //洗衣机
    public final static Integer MAIN_ID_140 = 140;
    //涉安费-维修奖励倍数
    public final static double SAF_REPAIR = 1.2;
    //涉安费-安装惩罚倍数
    public final static double SAF_INSTALL = 2;

    /**
     * 认证服务的serviceid
     */
    public static final String AUTH_SERVICE = "material-server";

    /**
     * 商城后台serviceid
     */
    public static final String MALL_AUTH_SERVICE = "mall-manager-service";

    //短信验证码过期时间
    public static final Integer SMS_EXPIRE = 10 * 60;

    @Value("${gree.V3.gettoken}")
    private String v3TokenUrl;
    @Value("${gree.V3.client.secert}")
    private String v3ClientSecert;


    public class RedisPrefix{
        public final static String TOKEN_GREE ="SETTLE:TOKEN:GREE";
        public final static String TOKEN_GREE_V3 ="SETTLE:TOKEN:GREE:V3";
        public final static String TOKEN_GREE_UPLOAD ="SETTLE:TOKEN:GREE:UPLOAD";
        public final static String TOKEN_JIASM_ORDER ="SETTLE:TOKEN:JIASM:ORDER";
    }

    public class GreeApiPath{
        //旧机回收工单推送接口
        public final static String RECYCLE_ASSIGN = "/outapp/recycle/assign";
        //旧机回收工单采集信息获取接口
        public final static String RECYCLE_ACQUISITION = "/outapp/recycle/acquisition";
        //采集信息上传接口
        public final static String RECYCLE_ACQUISITION_UPLOAD = "/outapp/recycle/acquisitionUpload";
        //回收工单状态回传接口
        public final static String RECYCLE_STATUS = "/outapp/recycle/status";
        //回收工单详情获取接口
        public final static String RECYCLE_ASSIGN_DETAIL = "/outapp/recycle/assignDetail";
        //批量新增待入库单
        public final static String RECYCLE_STOCK_STOCKINFOS = "/outapp/recycle/stock/stockInfos";
        //批量新增待入库单(与回收工单共用同一个接口)
        public final static String TRADE_NEW_FOR_OLD_STOCK_STOCKINFOS = "/outapp/recycle/stock/stockInfos";
    }

    @Getter
    public enum SynStatus{
        UN_SYN(0, "未同步"),
        SYN(1, "已同步"),
        SYN_FEEDBACK(44, "已同步反馈明细"),
        SYN_ACQUISITION(66, "已同步采集数据"),
        FAIL(99, "同步失败");

        private Integer code;
        private String name;
        private SynStatus(Integer code, String name) {
            this.code = code;
            this.name = name;
        }
    }

    @Getter
    public enum GreeSynStatus{
        //    	未同步
        UN_SYN(0),
        //    	已同步
        SYN(1),
        //    	同步失败
        FAIL(99);

        private Integer code;
        private GreeSynStatus(Integer code) {
            this.code = code;
        }
    }

    public class GreeWebPath{
        //格力商城-以旧换新 鉴定单采集 -广佛系统回传
        public final static String TBLYJHXJDD_COLLECTION = "/tblyjhxjdd/collection";
        //格力商城-以旧换新 查询所有驳回的鉴定单
        public final static String TBLYJHXJDD_QUERYREJECTJDD = "/tblyjhxjdd/queryRejectJdd";

    }

    //回收工单同步请求记录表 表名
    public class RecycleOrderType{
        public final static String RECYCLE_ASSIGN = "fa_order_recycle_assign" ;
        public final static String RECYCLE_ASSIGN_MX ="fa_order_recycle_assign_mx" ;
        public final static String RECYCLE_ASSIGN_FKMX = "order_recycle_assign_fkmx" ;
        public final static String RECYCLE_ASSIGN_EXPAND = "fa_order_recycle_assign_expand";
        public final static String RECYCLE_ASSIGN_WORKER = "fa_order_recycle_assign_worker";
        public final static String RECYCLE_ASSGIN_COLLECTION = "order_recycle_assign_collection";
        public final static String RECYCLE_ASSIGN_COLLECTION_MACHINE =  "fa_order_recycle_assign_collection_machine";
        public final static String RECYCLE_ASSIGN_ANNEX = "order_recycle_assign_annex";
        public final static String RECYCLE_ASSIGN_STOCK_IN = "fa_order_recycle_assign_stock_in";
        public final static String RECYCLE_ASSIGN_STOCK_OUT = "fa_order_recycle_assign_stock_out";
    }
}
