package com.ruoyi.web.modules.industryservice.domain.vo;

import java.util.ArrayList;
import java.util.List;

/**
 * 疫苗接种数据 Excel 导入结果。
 * 任一行失败时服务层整批回滚，通常以异常消息返回失败明细。
 */
public class VaccinationDataImportResultVo
{
    private int insertCount;

    private int updateCount;

    private int failCount;

    private List<String> failMessages = new ArrayList<>();

    private List<String> warnMessages = new ArrayList<>();

    public int getInsertCount()
    {
        return insertCount;
    }

    public void setInsertCount(int insertCount)
    {
        this.insertCount = insertCount;
    }

    public int getUpdateCount()
    {
        return updateCount;
    }

    public void setUpdateCount(int updateCount)
    {
        this.updateCount = updateCount;
    }

    public int getFailCount()
    {
        return failCount;
    }

    public void setFailCount(int failCount)
    {
        this.failCount = failCount;
    }

    public List<String> getFailMessages()
    {
        return failMessages;
    }

    public void setFailMessages(List<String> failMessages)
    {
        this.failMessages = failMessages;
    }

    public List<String> getWarnMessages()
    {
        return warnMessages;
    }

    public void setWarnMessages(List<String> warnMessages)
    {
        this.warnMessages = warnMessages;
    }

    public void addFail(String message)
    {
        failMessages.add(message);
        failCount = failMessages.size();
    }

    public void addWarn(String message)
    {
        warnMessages.add(message);
    }
}
