package com.ruoyi.web.modules.epidemic;

import java.math.BigDecimal;
import java.util.Calendar;
import java.util.Date;
import com.ruoyi.web.modules.epidemic.domain.BizLabDetection;

/**
 * 实验室检测测试样例。
 */
public final class LabDetectionTestSamples
{
    private LabDetectionTestSamples()
    {
    }

    public static BizLabDetection sample()
    {
        BizLabDetection row = new BizLabDetection();
        row.setTestDate(date(2026, Calendar.MAY, 1));
        row.setQuarantineStationId(1L);
        row.setSampleSource(1);
        row.setTestQuantity(100);
        row.setPositiveCount(5);
        return row;
    }

    public static BizLabDetection sampleWithRate(BigDecimal rate)
    {
        BizLabDetection row = sample();
        row.setDetectionRate(rate);
        return row;
    }

    public static Date date(int year, int month, int day)
    {
        Calendar cal = Calendar.getInstance();
        cal.set(year, month, day, 0, 0, 0);
        cal.set(Calendar.MILLISECOND, 0);
        return cal.getTime();
    }
}
