package com.ms.biz.consts;

import java.util.HashMap;

public class StatusConst {

    public static final String normal = "normal";
	public static final String pause = "pause";
	public static final String cancel = "cancel";
	public static final String recycle = "recycle";
	public static final String deny = "deny";
	public static final String none = "none";

	public static final String delete = "delete";
	public static final String skip = "skip";
	public static final String finish = "finish";

	public static final String wait = "wait";
	public static final String waitRetry = "wait_retry";
	public static final String waitRetryFixup = "wait_retry_fixup";
	public static final String waitFixup = "wait_fixup";
	public static final String waitRevert = "wait_revert";
	public static final String waitPlan = "wait_plan";
	public static final String waitAudit = "wait_audit";
	public static final String processing = "processing";
	public static final String processingRevert = "processing_revert";
	public static final String processChildTask = "process_child_task";
	public static final String processCompareImage = "process_compare_image";
    public static final String process = "process";

	public static final String reject = "reject";
	public static final String manualAudit = "manual_audit";
	public static final String auditPass = "audit_pass";
	public static final String agree = "agree";

	public static final String success = "success";
	public static final String updateSuccess = "update_success";
	public static final String revertSuccess = "revert_success";
	public static final String processingDelete = "processing_delete";
	public static final String fail = "fail";
	public static final String updateFail = "update_fail";
	public static final String revertFail = "revert_fail";
	public static final String processingCancel = "processing_cancel";
	public static final String processingUpdate = "processing_update";
	public static final String processingCheckEnd = "processing_check_end";
    public static final String partSuccess = "part_success";
    public static final String partProcessing = "part_processing";

	public static final String waitProcessing = "wait_processing";

	public static final String switchOn = "on";
	public static final String switchOff = "off";

	public static final String waitDwsData = "wait_dws_data";

	public static final String processParse = "process_parse";
	public static final String processJudgment = "process_judgment";
	public static final String processCollectData = "process_collect_data";

    public static final String waitPlugin = "waitPlugin";

	public static final String payWait = "pay_wait";
	public static final String paySuccess = "pay_success";
	public static final String payFail = "pay_fail";
	public static final String payManualCheck = "pay_manual_check";
	public static final String payManualRefund = "pay_manual_refund";

    public static final String settingStatusAll = "all";
    public static final String settingStatusHasSet = "has_set";
    public static final String settingStatusNotSet = "not_set";

    public static final String delay = "delay";

    public static final String manual = "manual";

    public static final String productImgProcessTypeNormal = "normal";
    public static final String productImgProcessTypeRevert = "revert";

    /**
     * 根据状态码获取状态名称
     *
     * @param code
     * @return
     */
    public static String getStatusNameByStatusCode(String code) {
        HashMap<String,String> codeMap = new HashMap<>();
        codeMap.put(finish,"完成");
        codeMap.put(success,"'成功'");
        codeMap.put(fail,"'失败'");
        codeMap.put(cancel,"已取消");
        codeMap.put(wait,"等待");
        codeMap.put(processing,"处理中");
        codeMap.put(waitRevert,"等待恢复");
        codeMap.put(processingRevert,"恢复处理中");
        codeMap.put(revertSuccess,"已恢复");
        codeMap.put(revertFail,"恢复失败");

        return codeMap.getOrDefault(code, "");

    }
}
