package com.zhyc.module.stock.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
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;

/**
 * 出库记录对象 wz_stock_out
 *
 * @author HashMap
 * @date 2025-08-05
 */
@Getter
@Setter
public class WzStockOut extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 序号
     */
    private Long stockOutCode;

    /**
     * 单据日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "单据日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date docDate;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createDate;

    /**
     * 单据编号
     */
    @Excel(name = "单据编号")
    private String docId;

    /**
     * 业务类型
     */
    @Excel(name = "业务类型")
    private String businessType;

    /**
     * 仓库编码
     */
    @Excel(name = "仓库编码")
    private String repositoryId;

    /**
     * 仓库名称
     */
    @Excel(name = "仓库")
    private String repositoryName;

    /**
     * 项目分类
     */
    @Excel(name = "项目分类")
    private String projectClassification;

    /**
     * 项目编码
     */
    @Excel(name = "项目编码")
    private String projectId;

    /**
     * 项目
     */
    @Excel(name = "项目")
    private String projectName;

    /**
     * 生产车间编码
     */
    @Excel(name = "生产车间编码")
    private String departmentId;

    /**
     * 生产车间
     */
    @Excel(name = "生产车间")
    private String departmentName;

    /**
     * 领用人编码
     */
    @Excel(name = "领用人编码")
    private String receiverId;

    /**
     * 领用人
     */
    @Excel(name = "领用人")
    private String receiver;

    /**
     * 制单人
     */
    @Excel(name = "制单人")
    private String single;

    /**
     * 审核人
     */
    @Excel(name = "审核人")
    private String reviewer;

    /**
     * 审核时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date reviewDate;

    /**
     * 修改人
     */
    @Excel(name = "修改人")
    private String modifier;

    /**
     * 材料分类编码
     */
    @Excel(name = "材料分类编码")
    private String materialClassId;

    /**
     * 材料分类
     */
    @Excel(name = "材料分类")
    private String materialClassName;

    /**
     * 材料编码
     */
    @Excel(name = "材料编码")
    private String materialId;

    /**
     * 材料名称
     */
    @Excel(name = "材料名称")
    private String materialName;

    /**
     * 材料规格
     */
    @Excel(name = "材料规格")
    private String materialSpecification;

    /**
     * 计量单位
     */
    @Excel(name = "计量单位")
    private String materialUnit;

    /**
     * 数量
     */
    @Excel(name = "数量")
    private BigDecimal count;

    /**
     * 批号
     */
    @Excel(name = "批号")
    private Long batchId;

    /**
     * 生产日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date productionDate;

    /**
     * 保质期
     */
    @Excel(name = "保质期")
    private Long shelfLife;

    /**
     * 保质期单位
     */
    @Excel(name = "保质期单位")
    private String shelfLifeUnit;

    /**
     * 失效日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "失效日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expirationDate;

    /**
     * 代理人
     */
    @Excel(name = "代理人")
    private String agent;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("stockOutCode", getStockOutCode())
                .append("docDate", getDocDate())
                .append("createDate", getCreateDate())
                .append("docId", getDocId())
                .append("businessType", getBusinessType())
                .append("repositoryId", getRepositoryId())
                .append("repositoryName", getRepositoryName())
                .append("projectClassification", getProjectClassification())
                .append("projectId", getProjectId())
                .append("projectName", getProjectName())
                .append("departmentId", getDepartmentId())
                .append("departmentName", getDepartmentName())
                .append("receiverId", getReceiverId())
                .append("receiver", getReceiver())
                .append("single", getSingle())
                .append("reviewer", getReviewer())
                .append("reviewDate", getReviewDate())
                .append("modifier", getModifier())
                .append("materialClassId", getMaterialClassId())
                .append("materialClassName", getMaterialClassName())
                .append("materialId", getMaterialId())
                .append("materialName", getMaterialName())
                .append("materialSpecification", getMaterialSpecification())
                .append("materialUnit", getMaterialUnit())
                .append("count", getCount())
                .append("batchId", getBatchId())
                .append("productionDate", getProductionDate())
                .append("shelfLife", getShelfLife())
                .append("shelfLifeUnit", getShelfLifeUnit())
                .append("expirationDate", getExpirationDate())
                .append("agent", getAgent())
                .toString();
    }
}
