package com.ruoyi.web.modules.industryservice;

import java.util.Calendar;
import java.util.Date;
import com.ruoyi.web.modules.industryservice.domain.BizYakDiseaseWarning;
import com.ruoyi.web.modules.industryservice.support.YakDiseaseWarningRules;

/**
 * 牦牛疾病预警测试样本。
 */
public final class YakDiseaseWarningTestSamples
{
    public static final Long PASTURE_P1 = 101L;

    public static final Long PASTURE_P2 = 202L;

    public static final Long WARNING_ID = 8001L;

    public static final Long OTHER_WARNING_ID = 8999L;

    private YakDiseaseWarningTestSamples()
    {
    }

    public static BizYakDiseaseWarning recentWarning()
    {
        BizYakDiseaseWarning row = new BizYakDiseaseWarning();
        row.setId(WARNING_ID);
        row.setPastureId(PASTURE_P1);
        row.setPastureName("牧场甲");
        row.setAlertTime(new Date());
        row.setAlertMessage("当前实测体温39.8℃，超出正常体温参考范围，触发体温异常预警。");
        row.setWarningType(YakDiseaseWarningRules.WARNING_TYPE_TEMP);
        row.setMeasuredValue("39.8℃");
        row.setReferenceRange("正常体温参考范围");
        row.setDataSource(YakDiseaseWarningRules.DATA_SOURCE_LOCAL);
        return row;
    }

    public static BizYakDiseaseWarning otherPastureWarning()
    {
        BizYakDiseaseWarning row = recentWarning();
        row.setId(OTHER_WARNING_ID);
        row.setPastureId(PASTURE_P2);
        row.setPastureName("牧场乙");
        return row;
    }

    public static BizYakDiseaseWarning oldWarning()
    {
        BizYakDiseaseWarning row = recentWarning();
        row.setId(8002L);
        Calendar cal = Calendar.getInstance();
        cal.add(Calendar.MONTH, -4);
        row.setAlertTime(cal.getTime());
        row.setAlertMessage("超窗预警");
        return row;
    }
}
