package com.zhyc.module.feed.domain;

import com.alibaba.fastjson2.JSON;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zhyc.module.base.domain.DaSheepfold;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zhyc.common.annotation.Excel;
import com.zhyc.common.core.domain.BaseEntity;

import java.util.Date;
import java.util.List;

/**
 * 饲喂量统计对象 sg_feed_statistic
 *
 * @author HashMap
 * @date 2025-08-23
 */
@Setter
@Getter
public class SgFeedStatistic extends BaseEntity {
    private static final long serialVersionUID = 1L;
    private Long userId;
    private Long deptId;
    /**
     * UUID
     */
    private String id;

    /**
     * 配方编号
     */
    @Excel(name = "配方编号")
    private String formulaId;

    /**
     * 配方批号
     */
    @Excel(name = "配方批号")
    private String formulaBatchId;

    /**
     * 羊只数量
     */
    @Excel(name = "羊只数量")
    private Long sheepFoldCount;

    /**
     * 青贮损耗比例
     */
    @Excel(name = "青贮损耗比例")
    private String silageLossRate;

    /**
     * 总饲喂量
     */
    @Excel(name = "总饲喂量")
    private Double feedTotalSize;

    /**
     * 日均饲喂量
     */
    @Excel(name = "日均饲喂量")
    private Double feedDailySize;

    /**
     * 配方列表
     */
    @Excel(name = "配方列表")
    private List<SgFormulaList> materialList;

    /**
     * 羊舍列表
     */
    @Excel(name = "羊舍列表")
    private List<DaSheepfold> sheepFoldList;

    @Excel(name = "日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date feedDate;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("formulaId", getFormulaId())
                .append("formulaBatchId", getFormulaBatchId())
                .append("sheepFoldCount", getSheepFoldCount())
                .append("silageLossRate", getSilageLossRate())
                .append("feedTotalSize", getFeedTotalSize())
                .append("feedDailySize", getFeedDailySize())
                .append("materialList", getMaterialList())
                .append("sheepFoldList", getSheepFoldList())
                .toString();
    }
}
