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

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 牧业金融生物资产<strong>全量同步</strong>结果 VO。
 * <p>
 * 由 {@link com.ruoyi.web.modules.industryservice.service.LivestockFinanceMasterSyncService#syncAll()} 返回，
 * 包含五个步骤各自的新增/更新/失败统计。
 * </p>
 * <p>
 * IoT 数据（称重/定位/环境）增量同步结果见 {@link IotDataIncrementalSyncResultVo}。
 * </p>
 */
public class LivestockFinanceSyncResultVo
{
    /** 步骤1：养殖场 */
    private YakAssetSyncResultVo pasture;

    /** 步骤2：养殖圈舍 */
    private YakAssetSyncResultVo enclosure;

    /** 步骤3：养殖生产计划 */
    private YakAssetSyncResultVo plan;

    /** 步骤4：养殖批次 */
    private YakAssetSyncResultVo batch;

    /** 步骤5：入栏建档（牦牛生物资产） */
    private YakAssetSyncResultVo yakAsset;

    /** 全量同步开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date syncTime;

    public YakAssetSyncResultVo getPasture() { return pasture; }
    public void setPasture(YakAssetSyncResultVo pasture) { this.pasture = pasture; }
    public YakAssetSyncResultVo getEnclosure() { return enclosure; }
    public void setEnclosure(YakAssetSyncResultVo enclosure) { this.enclosure = enclosure; }
    public YakAssetSyncResultVo getPlan() { return plan; }
    public void setPlan(YakAssetSyncResultVo plan) { this.plan = plan; }
    public YakAssetSyncResultVo getBatch() { return batch; }
    public void setBatch(YakAssetSyncResultVo batch) { this.batch = batch; }
    public YakAssetSyncResultVo getYakAsset() { return yakAsset; }
    public void setYakAsset(YakAssetSyncResultVo yakAsset) { this.yakAsset = yakAsset; }
    public Date getSyncTime() { return syncTime; }
    public void setSyncTime(Date syncTime) { this.syncTime = syncTime; }

    /** 兼容旧前端：入栏建档新增条数 */
    public int getInsertCount()
    {
        return yakAsset != null ? yakAsset.getInsertCount() : 0;
    }

    /** 兼容旧前端：入栏建档更新条数 */
    public int getUpdateCount()
    {
        return yakAsset != null ? yakAsset.getUpdateCount() : 0;
    }

    /** 兼容旧前端：入栏建档失败条数 */
    public int getFailCount()
    {
        return yakAsset != null ? yakAsset.getFailCount() : 0;
    }
}
