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

/**
 * 隔离巡查登记常量。
 */
public final class IsolationPatrolRules
{
    public static final String DEL_FLAG_NORMAL = "0";

    public static final String DEL_FLAG_DELETED = "2";

    public static final int MIN_DESC_LEN = 1;

    public static final int MAX_DESC_LEN = 200;

    public static final int MAX_REMARK_LEN = 500;

    public static final int MIN_SICK_DEAD_QTY = 0;

    public static final String DEFAULT_CONTENT_NORMAL = "巡查结果正常";

    public static final String DEFAULT_CONTENT_ABNORMAL = "巡查结果异常";

    public static final String DEFAULT_HANDLE_NORMAL = "无需处理";

    public static final String DEFAULT_HANDLE_ABNORMAL = "需要处理";

    public static final String MSG_PEN_REQUIRED = "请选择圈位编号";

    public static final String MSG_PEN_NOT_IN_STOCK = "圈位无效或已无在栏牲畜";

    public static final String MSG_PATROL_TIME_REQUIRED = "请选择巡查时间";

    public static final String MSG_PATROL_TIME_FUTURE = "巡查时间不能晚于当前时间";

    public static final String MSG_SICK_QTY_INVALID = "请输入正确的病死病害数量（非负整数）";

    public static final String MSG_CONTENT_REQUIRED = "请填写巡查内容描述";

    public static final String MSG_HANDLE_REQUIRED = "请填写处理情况";

    public static final String MSG_DESC_TOO_LONG = "巡查内容描述/处理情况长度不能超过200个字符";

    public static final String MSG_QTY_TAG_MISMATCH = "病死病害数量与已勾选耳标号数量不一致";

    public static final String MSG_EAR_TAG_REQUIRED = "请选择耳标号";

    public static final String MSG_EAR_TAG_NOT_IN_PEN = "耳标 {0} 不在当前圈位或已出圈";

    public static final String MSG_NOT_FOUND = "记录不存在或已删除";

    public static final String MSG_PHOTO_EXT = "仅支持 jpg、jpeg、png，且不超过 10MB";

    private IsolationPatrolRules()
    {
    }

    public static boolean isPhotoExtensionAllowed(String filenameOrPath)
    {
        String ext = EntryIsolationRules.extensionOf(filenameOrPath);
        return "jpg".equals(ext) || "jpeg".equals(ext) || "png".equals(ext);
    }
}
