package com.ms.biz.consts;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class PurchaseOrderConst {
    public static final String PURCHASE_ORDER_TAB_ALL = "all";
    public static final String PURCHASE_ORDER_TAB_WAIT_PURCHASE = "wait_purchase";
    public static final String PURCHASE_ORDER_TAB_WAIT_SEND = "wait_send";
    public static final String PURCHASE_ORDER_TAB_HAS_SEND = "has_send";
    public static final String PURCHASE_ORDER_TAB_FINISHED = "finished";
    public static final String PURCHASE_ORDER_TAB_CANCELED = "canceled";
    public static final String PURCHASE_ORDER_TAB_ISOLATION = "isolation";
    public static final String PURCHASE_ORDER_TAB_CASH_ON_DELIVERY = "cash_on_delivery";
    public static final String PURCHASE_ORDER_TAB_RISK = "risk";
    public static final String PURCHASE_ORDER_TAB_WAIT_PAY = "wait_pay";

    public static final String PURCHASE_ORDER_STATUS_WAIT_SEND = "wait_send";
    public static final String PURCHASE_ORDER_STATUS_TAKING_GOODS = "taking_goods";
    public static final String PURCHASE_ORDER_STATUS_HAS_SEND = "has_send";
    public static final String PURCHASE_ORDER_STATUS_FINISHED = "finished";
    public static final String PURCHASE_ORDER_STATUS_CANCEL = "cancel";
    public static final String PURCHASE_ORDER_STATUS_REFUND = "refund";
    public static final String PURCHASE_ORDER_STATUS_WAIT_PAY = "wait_pay";
    public static final String PURCHASE_ORDER_STATUS_WAIT_CONFIRM = "wait_confirm";

    public static final String FILTER_PURCHASE_STATUS_WAIT_PURCHASE = "0";
    public static final String FILTER_PURCHASE_STATUS_PART_PURCHASE = "1";
    public static final String FILTER_PURCHASE_STATUS_HAS_PURCHASE = "2";
    public static final String FILTER_PURCHASE_STATUS_MANUAL_HAS_PURCHASE = "3";

    public static final String PURCHASE1688_TYPE_PROMPT_GOODS = "prompt_goods";
    public static final String PURCHASE1688_TYPE_DISTRIBUITION = "distribution";
    public static final String PURCHASE1688_TYPE_USE_PURCHASE_URL = "use_purchase_url";

    public static final String PURCHASE1688_ADDRESS_TYPE_TEMPORARILY = "temporarily";
    public static final String PURCHASE1688_ADDRESS_TYPE_FIXED = "fixed";

    public static final String AUTO_FILL_REMARK_TYPE_NONE = "0";
    public static final String AUTO_FILL_REMARK_TYPE_ONLY_ORDER_REMARK = "1";
    public static final String AUTO_FILL_REMARK_TYPE_INCLUDE_VENDER_REMARK = "2";
    public static final String AUTO_FILL_REMARK_TYPE_CUSTOM_REMARK = "3";
    public static final String AUTO_FILL_REMARK_TYPE_SKU = "4";
    public static final String AUTO_FILL_REMARK_TYPE_ADDRESS = "5";
    public static final String AUTO_FILL_REMARK_TYPE_ONLY_VENDER_REMARK = "6";
    public static final String AUTO_FILL_REMARK_TYPE_PLATFORM_NAME = "11";
    public static final String AUTO_FILL_REMARK_TYPE_PLATFORM_SHOP_NAME = "12";
    public static final String AUTO_FILL_REMARK_TYPE_PLATFORM_ORDER_ID = "13";

    public static final Integer PURCHASE_URL_SOURCE_MOVE = 0;
    public static final Integer PURCHASE_URL_SOURCE_MANUAL = 1;

    public static final String PURCHASE_PLATFORM_TAOBAO = "taobao";
    public static final String PURCHASE_PLATFORM_PDD = "yangkeduo";
    public static final String PURCHASE_PLATFORM_TMALL = "tmall";
    public static final String PURCHASE_PLATFORM1688 = "1688";
    public static final String PURCHASE_PLATFORM_JD = "jd";
    public static final String PURCHASE_PLATFORM_WSY = "wsy";
    public static final String PURCHASE_PLATFORM_SOOXIE = "sooxie";
    public static final String PURCHASE_PLATFORM_VVIC = "vvic";
    public static final String PURCHASE_PLATFORM17QCC = "17qcc";
    public static final String PURCHASE_PLATFORM17ZWD = "17zwd";
    public static final String PURCHASE_PLATFORM_HZNZCN = "hznzcn";
    public static final String PURCHASE_PLATFORM_BAO66 = "bao66";
    public static final String PURCHASE_PLATFORM_K3 = "k3";
    public static final String PURCHASE_PLATFORM_XINGFUJIE = "xingfujie";
    public static final String PURCHASE_PLATFORM2TONG = "2tong";
    public static final String PURCHASE_PLATFORM_JUYI5 = "juyi5";
    public static final String PURCHASE_PLATFORM3E = "3e";
    public static final String PURCHASE_PLATFORM1688_D_S = "1688DS";
    public static final String PURCHASE_PLATFORM1688_C_G = "1688CG";
    public static final String PURCHASE_PLATFORM_JP0663 = "jp0663";
    public static final String PURCHASE_PLATFORM52DSY = "52dsy";
    public static final String PURCHASE_PLATFORM91FJ = "91jf";

    public static final String PURCHASE_PLATFORM_TAOTE = "taote";
    public static final String PURCHASE_PLATFORM_LTAO = "ltao";
    public static final String PURCHASE_PLATFORM_SOOXIE_D_S = "sooxieDS";
    public static final String PURCHASE_PLATFORM_YIWUGOU = "yiwugou";
    public static final String PURCHASE_PLATFORM_ZLYCW = "zlycw";

    public static final String PURCHASE_PLATFORM_FIELD = "purchase_platform";
    public static final String PURCHASE_PLATFORM2_FIELD = "purchase_platform_2";
    public static final String PURCHASE_ORDER_SN_FIELD = "purchase_order_sn";
    public static final String PURCHASE_PAYMENT_FIELD = "purchase_payment";
    public static final String PURCHASE_ORDER_SELLER_FIELD = "purchase_order_seller";
    public static final String TOTAL_PROFIT_FIELD = "total_profit";
    public static final String PROFIT_RATIO_FIELD = "profit_ratio";
    public static final String LOGISTICS_INFO_FIELD = "logistics_info";
    public static final String PURCHASE_ORDER_BUYER = "purchase_order_buyer";
    public static final String PURCHASE_ORDER_NUM_FIELD = "purchase_order_num";
    public static final String SHOP_NAME_FIELD = "shop_name";
    public static final String RECEIVER_MOBILE_FIELD = "receiver_mobile";
    public static final String CUSTOM_FIELD = "custom";

    public static final String AUTO_SHIPMENT_DD_API = "2";
    public static final String AUTO_SHIPMENT_PLUGIN = "1";

    public static final String ACTION_AUTO_RELATE = "auto_relate";
    public static final String ACTION_MANUAL_RELATE = "manual_relate";
    public static final String ACTION_RSYNC = "rsync";

    public static final String SAME_RECEIVE_INFO_TIP_FIELD_NAME = "name";
    public static final String SAME_RECEIVE_INFO_TIP_FIELD_MOBILE = "mobile";
    public static final String SAME_RECEIVE_INFO_TIP_FIELD_RECEIVER_FULL_ADDRESS = "fullAddress";

    public static final String SAME_TYPE_NAME = "name";
    public static final String SAME_TYPE_MOBILE = "mobile";
    public static final String SAME_TYPE_FULL_ADDRESS = "fullAddress";
    public static final String SAME_TYPE_NAME_AND_MOBILE = "name_mobile";
    public static final String SAME_TYPE_NAME_AND_FULL_ADDRESS = "name_fullAddress";
    public static final String SAME_TYPE_MOBILE_AND_FULL_ADDRESS = "mobile_fullAddress";
    public static final String SAME_TYPE_NAME_AND_MOBILE_AND_FULL_ADDRESS = "name_mobile_fullAddress";

    public static final String AUTO_AUDIT_ADDRESS_ORDER_TYPE_NO_PURCHASE = "no_purchase";
    public static final String AUTO_AUDIT_ADDRESS_ORDER_TYPE_ALREADY_PURCHASE = "already_purchase";

    public static final Integer PURCHASE_SETTING_DEFAULT_AFTER_SALES_LAST_SHIP_LEFT_HOURS = 24;

    public static final String PURCHASE_ORDER_CONSIGNEE_SUFFIX_ORDER_ID = "orderId";
    public static final String PURCHASE_ORDER_CONSIGNEE_SUFFIX_RECEIVER_NAME = "receiverName";
    public static final String PURCHASE_ORDER_CONSIGNEE_SUFFIX_RECEIVER_MOBILE = "receiverMobile";
    public static final String PURCHASE_ORDER_CONSIGNEE_SUFFIX_SHOP_NAME = "shopName";
    public static final String PURCHASE_ORDER_CONSIGNEE_SUFFIX_CUSTOM = "custom";

    public static final String SEARCH_TYPE_SEARCH_BY_TITLE = "searchByTitle";
    public static final String SEARCH_TYPE_SEARCH_BY_IMAGE = "searchByImage";

    public static final String PURCHASE_ORDER_CANCEL_SOURCE_MANUAL_CANCEL = "manual_cancel";
    public static final String PURCHASE_ORDER_CANCEL_SOURCE_MANUAL_RELATE = "manual_relate";
    public static final String PURCHASE_ORDER_CANCEL_SOURCE_RELATE_CANCEL = "relate_cancel";
    public static final String PURCHASE_ORDER_CANCEL_SOURCE_DS_RELATE_CANCEL = "ds_relate_cancel";
    public static final String PURCHASE_ORDER_CANCEL_SOURCE_DS_CANCEL = "ds_cancel";
    public static final String PURCHASE_ORDER_CANCEL_SOURCE_DS_CLOSE_CANCEL = "ds_close_cancel";
    public static final String PURCHASE_ORDER_CANCEL_SOURCE_DS_RELATE = "ds_relate";
    public static final String PURCHASE_ORDER_CANCEL_SOURCE_PLUGIN_RELATE = "plugin_relate";
    public static final String PURCHASE_ORDER_CANCEL_SOURCE_CG_RELATE = "cg_relate";
    public static final String PURCHASE_ORDER_CANCEL_SOURCE_CG_CANCEL = "cg_cancel";
    public static final String PURCHASE_ORDER_CANCEL_SOURCE_CG_MSG_CANCEL = "cg_msg_cancel";
    public static final String PURCHASE_ORDER_CANCEL_SOURCE_CG_CLOSE_CANCEL = "ds_close_cancel";

    public static final String FAKE_WARNING_RANGE_SHOP_FAKE = "shopFake";
    public static final String FAKE_WARNING_RANGE_CLOUD_FAKE = "cloudFake";

    public static final String SHOP_FAKE_SOURCE_ORDER_MARK = "orderMark";
    public static final String SHOP_FAKE_SOURCE_MANUAL = "manual";

    public static final String ORDER_HIGH_LIGHT_TYPE_TITLE = "title";
    public static final String ORDER_HIGH_LIGHT_TYPE_GOODS_ID = "goodsId";
    public static final String ORDER_HIGH_LIGHT_TYPE_ITEM_NUM = "itemNum";
    public static final String ORDER_HIGH_LIGHT_TYPE_NOTE = "orderNote";
    public static final String ORDER_HIGH_LIGHT_TYPE_REMARK = "orderRemark";

    public static final String ORDER_PROCESS_AREA_TYPE_ISOLATION = "isolation";
    public static final String ORDER_PROCESS_AREA_TYPE_WARNING = "warning";

    public static final String FILTER_SKU_NAME = "skuName";
    public static final String FILTER_PRODUCT_ID = "productId";
    public static final String FILTER_EXCLUDE_PRODUCT_ID = "excludeProductId";
    public static final String FILTER_SKU_ID = "skuId";
    public static final String FILTER_ITEM_NUM = "itemNum";
    public static final String FILTER_CODE = "code";

    public static final String AUTO_FILL_ORDER_MEMO_SHOP_NAME_AND_ORDER_ID = "shop_name_and_order_id";
    public static final String AUTO_FILL_ORDER_MEMO_TYPE_SHOP_NAME = "shop_name";
    public static final String AUTO_FILL_ORDER_MEMO_TYPE_ORDER_ID = "order_id";
    public static final String AUTO_FILL_ORDER_MEMO_TYPE_ORDER_REMARK = "order_remark";
    public static final String AUTO_FILL_ORDER_MEMO_TYPE_SELLER_REMARK = "seller_remark";
    public static final String AUTO_FILL_ORDER_MEMO_TYPE_PLATFORM_NAME = "platform_name";

    public static final String PLATFORM_GROUP1688_D_S = "1688DS";
    public static final String PLATFORM_GROUP1688_C_G = "1688CG";
    public static final String PLATFORM_GROUP_OTHER = "other";
    public static final String PLATFORM_GROUP_MANUAL = "manual";

    public static final String PURCHASE_FLOW_GENERAL = "general";//1688批发方式
    public static final String PURCHASE_FLOW_SALE_PROXY = "saleproxy";//1688代发方式

    public static final String DELIVERY_TIME_TYPE_RIGHT_NOW = "right_now";
    public static final String DELIVERY_TIME_TYPE_LOGISTICS_ACCEPT = "logistics_accept";
    public static final String DELIVERY_TIME_TYPE_DISABLED = "disabled";

    public static final String PURCHASE_MOBILE_TYPE_ORIGIN = "origin";//使用原手机号
    public static final String PURCHASE_MOBILE_TYPE_FIX = "fix";//固定手机号
    public static final String PURCHASE_MOBILE_TYPE_REPLACE_MIDDLE_FOUR_NUM = "replace_middle_four_num";//修改手机号中间4位

    public static final String PURCHASE_URL_MODAL_SOURCE_MANUAL = "manual";
    public static final String PURCHASE_URL_MODAL_SOURCE_AUTO = "auto";

    public static final String ACTION_SOURCE_PLATFORM_DS_AUTO_PURCHASE_SETTING = "platformDsAutoPurchaseSetting";
    public static final String ACTION_SOURCE_INIT_DS_PURCHASE_SETTING = "initDsPurchaseSetting";
    public static final String ACTION_SOURCE_PLATFORM_PURCHASE_SETTING = "platformPurchaseSetting";

    public static final String DS_ENCRYPT_ORDER_TYPE_ALL_SELLER = "allSeller";
    public static final String DS_ENCRYPT_ORDER_TYPE_SOME_SELLER = "someSeller";

    public static final Integer CURRENT_PURCHASE_SETTING_VERSION = 2;

    public static final Integer AUTO_ISOLATION_WARE_TYPE_ISOLATION = 1;
    public static final Integer AUTO_ISOLATION_WARE_TYPE_NOT_ISOLATION = 2;
    public static final Integer AUTO_ISOLATION_SKU_TYPE_ISOLATION = 1;
    public static final Integer AUTO_ISOLATION_SKU_TYPE_NOT_ISOLATION = 2;

    public static final String APPEND_VENDER_REMARK_TPL_ITEM_TYPE_FIELD = "field";
    public static final String APPEND_VENDER_REMARK_TPL_ITEM_TYPE_TEXT = "text";

    public static Map<String, String> getPurchasePlatformAndOrderDsTblMap() {
        Map<String, String> map = new HashMap<>();
        map.put(PURCHASE_PLATFORM1688_D_S, TblConst.op_order_ds);
        map.put(PURCHASE_PLATFORM_LTAO, TblConst.op_order_ltao);
        return map;
    }

    public static Set<String> getDsPurchasePlatforms() {
        return getPurchasePlatformAndOrderDsTblMap().keySet();
    }

    public static String getPurchasePlatformName(String purchasePlatform) {
        return getPurchasePlatformMap().getOrDefault(purchasePlatform, "");
    }

    public static Map<String, String> getPurchasePlatformMap() {
        Map<String, String> purchasePlatformMap = new HashMap<>();
        purchasePlatformMap.put(PURCHASE_PLATFORM_TAOBAO, "淘宝");
        purchasePlatformMap.put(PURCHASE_PLATFORM_PDD, "拼多多");
        purchasePlatformMap.put(PURCHASE_PLATFORM_TMALL, "天猫");
        purchasePlatformMap.put(PURCHASE_PLATFORM1688, "1688");
        purchasePlatformMap.put(PURCHASE_PLATFORM1688_D_S, "1688分销");
        purchasePlatformMap.put(PURCHASE_PLATFORM1688_C_G, "1688采购");
        purchasePlatformMap.put(PURCHASE_PLATFORM_TAOTE, "淘特");
        purchasePlatformMap.put(PURCHASE_PLATFORM_LTAO, "淘特分销");
        purchasePlatformMap.put(PURCHASE_PLATFORM_JD, "京东");
        purchasePlatformMap.put(PURCHASE_PLATFORM_WSY, "网商园");
        purchasePlatformMap.put(PURCHASE_PLATFORM_SOOXIE, "搜鞋网");
        purchasePlatformMap.put(PURCHASE_PLATFORM_SOOXIE_D_S, "搜鞋网分销");
        purchasePlatformMap.put(PURCHASE_PLATFORM_VVIC, "搜款网");
        purchasePlatformMap.put(PURCHASE_PLATFORM17QCC, "青创网");
        purchasePlatformMap.put(PURCHASE_PLATFORM_HZNZCN, "杭州女装网");
        purchasePlatformMap.put(PURCHASE_PLATFORM_BAO66, "包牛牛");
        purchasePlatformMap.put(PURCHASE_PLATFORM_K3, "开山网");
        purchasePlatformMap.put(PURCHASE_PLATFORM_XINGFUJIE, "新款网");
        purchasePlatformMap.put(PURCHASE_PLATFORM2TONG, "二童网");
        purchasePlatformMap.put(PURCHASE_PLATFORM_JUYI5, "聚衣网");
        purchasePlatformMap.put(PURCHASE_PLATFORM3E, "生意网");
        purchasePlatformMap.put(PURCHASE_PLATFORM_JP0663, "军埔网");
        purchasePlatformMap.put(PURCHASE_PLATFORM52DSY, "52电商园");
        purchasePlatformMap.put(PURCHASE_PLATFORM91FJ, "91家纺网");
        purchasePlatformMap.put(PURCHASE_PLATFORM_ZLYCW, "织里云仓");

        return purchasePlatformMap;
    }
}
