package com.ruoyi.web.modules.epidemic;

import java.math.BigDecimal;
import com.ruoyi.web.modules.epidemic.domain.BizRiskFactorWeight;
import com.ruoyi.web.modules.epidemic.domain.dto.RiskFactorWeightSaveRequest;
import com.ruoyi.web.modules.epidemic.support.RiskFactorWeightRules;

/**
 * 风险因子权重测试样例。
 */
public final class RiskFactorWeightTestSamples
{
    private RiskFactorWeightTestSamples()
    {
    }

    public static RiskFactorWeightSaveRequest uniformRequest()
    {
        return request(
                new BigDecimal("0.2"),
                new BigDecimal("0.2"),
                new BigDecimal("0.2"),
                new BigDecimal("0.2"),
                new BigDecimal("0.2"));
    }

    public static RiskFactorWeightSaveRequest request(
            BigDecimal breeding,
            BigDecimal traffic,
            BigDecimal quarantine,
            BigDecimal meteorological,
            BigDecimal past)
    {
        RiskFactorWeightSaveRequest req = new RiskFactorWeightSaveRequest();
        req.setBreedingDensityWeight(breeding);
        req.setTrafficMobilityWeight(traffic);
        req.setQuarantineIntensityWeight(quarantine);
        req.setMeteorologicalSuitabilityWeight(meteorological);
        req.setPastDiseaseLevelWeight(past);
        return req;
    }

    public static BizRiskFactorWeight dbRow()
    {
        BizRiskFactorWeight row = new BizRiskFactorWeight();
        row.setId(RiskFactorWeightRules.SINGLETON_ID);
        row.setWeightBreedingDensity(new BigDecimal("0.2000"));
        row.setWeightTrafficMobility(new BigDecimal("0.2000"));
        row.setWeightQuarantineIntensity(new BigDecimal("0.2000"));
        row.setWeightMeteorologicalSuitability(new BigDecimal("0.2000"));
        row.setWeightPastDiseaseLevel(new BigDecimal("0.2000"));
        row.setUpdateBy("admin");
        return row;
    }
}
