package com.ruoyi.web.modules.trading.support;

/**
 * 交易订单管理常量。
 */
public final class TradeOrderRules
{
    public static final String ORDER_STATUS_PENDING = "0";

    public static final String ORDER_STATUS_COMPLETED = "1";

    public static final String DEL_FLAG_NORMAL = "0";

    public static final String DEL_FLAG_DELETED = "2";

    public static final int MAX_ORDER_SEQ_PER_DAY = 999;

    public static final int MAX_REMARK_LEN = 500;

    public static final long MAX_VOUCHER_BYTES = 10L * 1024 * 1024;

    public static final String MSG_NOT_FOUND = "交易订单不存在";

    public static final String MSG_SUPPLIER_REQUIRED = "请选择供应商";

    public static final String MSG_DISTRIBUTOR_REQUIRED = "请选择承销商";

    public static final String MSG_LINE_EMPTY = "请至少添加一行采购明细";

    public static final String MSG_SUPPLIER_NOT_FOUND = "供应商不存在或已删除";

    public static final String MSG_DISTRIBUTOR_NOT_FOUND = "承销商不存在或已删除";

    public static final String MSG_EAR_TAG_DUP = "存在重复耳标";

    public static final String MSG_EAR_TAG_INVALID = "耳标 %s 不可选或已被其他订单占用";

    public static final String MSG_EAR_TAG_OCCUPIED = "耳标已被其他订单占用";

    public static final String MSG_NO_MARKET_EAR_TAG = "该供应商暂无进栏耳标，请先维护市场进栏登记";

    public static final String MSG_WEIGHT_AMOUNT_INVALID = "重量与金额须大于 0";

    public static final String MSG_GRADE_CONFIG_EMPTY = "等级重量配置未初始化，请联系管理员";

    public static final String MSG_GRADE_NOT_MATCHED = "重量 %s kg 未匹配到品质等级，请检查等级重量配置";

    public static final String MSG_COMPLETED_NO_EDIT = "已完成订单不可修改";

    public static final String MSG_COMPLETED_NO_DELETE = "已完成订单不可删除";

    public static final String MSG_NOT_PENDING = "仅待支付订单可执行该操作";

    public static final String MSG_PAY_VOUCHER_REQUIRED = "请上传支付凭证";

    public static final String MSG_PAY_VOUCHER_INVALID = "支付凭证格式或大小不符合要求";

    public static final String MSG_FEE_NOT_CONFIGURED = "供应商收费方式未配置，无法生成结算单";

    public static final String MSG_ORDER_NO_LIMIT = "当日订单编号已达上限，请联系管理员";

    public static final String MSG_ORDER_NO_CONFLICT = "订单编号生成冲突，请重试";

    public static final String MSG_SETTLEMENT_EXISTS = "结算单已存在，请勿重复完成支付";

    private TradeOrderRules()
    {
    }

    public static String orderStatusName(String orderStatus)
    {
        if (ORDER_STATUS_COMPLETED.equals(orderStatus))
        {
            return "已完成";
        }
        return "待支付";
    }
}
