package com.quyunshuo.module.home.utils;

import static com.quyunshuo.androidbaseframemvvm.base.utils.ResourcesFunKt.getString;

import com.quyunshuo.module.home.R;

public class ErrorTextUtlis {
    public static String getErrorText(String type) {
        String errorContext = "";
        if ("010001".equals(type)) {//01开头表示设备致命性报错02开头表示设备非致命性报错
            errorContext = getString(R.string.base_disconnectiondev);
        } else if ("010002".equals(type)) {
            errorContext = getString(R.string.base_not_heating_up);
        } else if ("010011".equals(type)) {
            errorContext = getString(R.string.base_chip_malfunction);
        } else if ("010101".equals(type)) {
            errorContext = getString(R.string.base_sensor_fault);
        } else if ("010111".equals(type)) {
            errorContext = getString(R.string.base_abnormal_air_pump);
        } else if ("010121".equals(type)) {
            errorContext = getString(R.string.base_motor_overload);
        } else if ("020001".equals(type)) {
            errorContext = getString(R.string.base_water_shortage);
        } else if ("020002".equals(type)) {
            errorContext = getString(R.string.base_too_high);
        } else if ("020101".equals(type)) {
            errorContext = getString(R.string.base_not_turned_on);
        } else if ("020102".equals(type)) {
            errorContext = getString(R.string.base_on_off_switch);
        } else if ("020103".equals(type)) {
            errorContext = getString(R.string.base_be_in_progress);
        } else {
            errorContext = getString(R.string.base_errortip);
        }
        return errorContext;
    }

    public static String getErrorNO(String type) {
        String errorNO = "";
        if ("010001".equals(type)) {//01开头表示设备致命性报错02开头表示设备非致命性报错
            errorNO = "NO1:";
        } else if ("010002".equals(type)) {
            errorNO = "NO2:";

        } else if ("010011".equals(type)) {
            errorNO = "NO3:";

        } else if ("010101".equals(type)) {
            errorNO = "NO4:";

        } else if ("010111".equals(type)) {

            errorNO = "NO5:";
        } else if ("010121".equals(type)) {
            errorNO = "NO6:";

        } else if ("020001".equals(type)) {
            errorNO = "NO7:";

        } else if ("020002".equals(type)) {
            errorNO = "NO8:";

        } else if ("020101".equals(type)) {
            errorNO = "NO9:";

        } else if ("020102".equals(type)) {
            errorNO = "NO10:";

        } else if ("020103".equals(type)) {
            errorNO = "NO11:";

        } else {
            errorNO = "NO110:";

        }
        return errorNO;
    }
}
