package com.shzg.project.worn.domain;

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

import com.fasterxml.jackson.annotation.JsonFormat;
import com.shzg.framework.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.shzg.framework.aspectj.lang.annotation.Excel;

/**
 * 出库单明细对象 worn_outbound_item
 * 
 * @author shzg
 * @date 2026-04-08
 */
public class WornOutboundItem extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 出库单ID */
    @Excel(name = "出库单ID")
    private Long billId;

    /** 出库单号 */
    @Excel(name = "出库单号")
    private String billNo;

    /** 物料ID */
    @Excel(name = "物料ID")
    private Long materialId;

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

    /** 唯一码 */
    @Excel(name = "唯一码")
    private Integer uniqueCode;

    /** 明细状态（0待出库 1已出库） */
    @Excel(name = "明细状态", readConverterExp = "0=待出库,1=已出库")
    private String status;

    /** 是否删除（0正常 1删除） */
    @Excel(name = "是否删除", readConverterExp = "0=正常,1=删除")
    private String isDelete;
    // ================== 物料扩展信息（查询用，不入库） ==================
    /** ================== 新增：明细列表 ================== */
    private List<WornMaterial> itemList;
    /** 物料名称 */
    @Excel(name = "物料名称")
    private String materialName;

    /** 物料简称 */
    @Excel(name = "物料简称")
    private String materialShortName;

    /** 物料编码 */
    @Excel(name = "物料编码")
    private String materialCode;

    /** 规格 */
    @Excel(name = "规格")
    private String specification;

    /** 型号 */
    @Excel(name = "型号")
    private String model;
    /** 仓库编码 */
    private String warehouseCode;
    /** 仓库名称 */
    @Excel(name = "仓库名称")
    private String warehouseName;
    /** 存储区编码 */
    private String areaCode;
    /** 存储区名称 */
    @Excel(name = "存储区名称")
    private String areaName;

    /** 创建时间 */
    @Excel(name = "创建时间")
    private java.util.Date createTime;
    /** 入库时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "入库时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date outboundTime;
    /** 单件重量 */
    @Excel(name = "单件重量")
    private BigDecimal weight;

    /** 单据备注 */
    @Excel(name = "单据备注")
    private String billRemark;
    /** 入库单类型（0=入库申请,1=入库成功,2=出库申请,3=出库成功,4=已作废"） */
    private String billType;
    /** 物资类型 */
    private String typeName;
    /** 父级类型名称 */
    private String typeParentNames;
    /** 物料单位ID */
    private Long unitId;
    /** 单位名称 */
    private String unitName;

    /** 主单据状态 */
    private String  billStatus;
    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setBillId(Long billId) 
    {
        this.billId = billId;
    }

    public Long getBillId() 
    {
        return billId;
    }

    public void setBillNo(String billNo) 
    {
        this.billNo = billNo;
    }

    public String getBillNo() 
    {
        return billNo;
    }

    public void setMaterialId(Long materialId) 
    {
        this.materialId = materialId;
    }

    public Long getMaterialId() 
    {
        return materialId;
    }

    public void setQuantity(BigDecimal quantity) 
    {
        this.quantity = quantity;
    }

    public BigDecimal getQuantity() 
    {
        return quantity;
    }

    public Integer getUniqueCode() { return uniqueCode; }
    public void setUniqueCode(Integer uniqueCode) { this.uniqueCode = uniqueCode; }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    public void setIsDelete(String isDelete) 
    {
        this.isDelete = isDelete;
    }

    public String getIsDelete() 
    {
        return isDelete;
    }
    public List<WornMaterial> getItemList() { return itemList; }
    public void setItemList(List<WornMaterial> itemList) { this.itemList = itemList; }
    public String getBillType() { return billType; }
    public void setBillType(String billType) { this.billType = billType; }
    public String getWarehouseCode() { return warehouseCode; }
    public void setWarehouseCode(String warehouseCode) { this.warehouseCode = warehouseCode; }

    public String getAreaCode() { return areaCode; }
    public void setAreaCode(String areaCode) { this.areaCode = areaCode; }
    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }
    public String getTypeParentNames() {
        return typeParentNames;
    }

    public void setTypeParentNames(String typeParentNames) {
        this.typeParentNames = typeParentNames;
    }
    public Long getUnitId() {
        return unitId;
    }

    public void setUnitId(Long unitId) {
        this.unitId = unitId;
    }
    public void setUnitName(String unitName)
    {
        this.unitName = unitName;
    }

    public String getUnitName()
    {
        return unitName;
    }
    public void setBillStatus(String billStatus)
    {
        this.billStatus = billStatus;
    }

    public String getBillStatus()
    {
        return billStatus;
    }
    public String getWarehouseName() {
        return warehouseName;
    }

    public void setWarehouseName(String warehouseName) {
        this.warehouseName = warehouseName;
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    @Override
    public java.util.Date getCreateTime() {
        return super.getCreateTime();
    }

    @Override
    public void setCreateTime(java.util.Date createTime) {
        super.setCreateTime(createTime);
    }
    public Date getOutboundTime() {
        return outboundTime;
    }

    public void setOutboundTime(Date outboundTime) {
        this.outboundTime = outboundTime;
    }
    public BigDecimal getWeight() {
        return weight;
    }

    public void setWeight(BigDecimal weight) {
        this.weight = weight;
    }

    public String getBillRemark() {
        return billRemark;
    }

    public void setBillRemark(String billRemark) {
        this.billRemark = billRemark;
    }
    public String getMaterialName() { return materialName; }
    public void setMaterialName(String materialName) { this.materialName = materialName; }
    public String getMaterialCode() { return materialCode; }
    public void setMaterialCode(String materialCode) { this.materialCode = materialCode; }
    public String getModel() { return model; }
    public void setModel(String model) { this.model = model; }
    public String getMaterialShortName() { return materialShortName; }
    public void setMaterialShortName(String materialShortName) { this.materialShortName = materialShortName; }
    public String getSpecification() { return specification; }
    public void setSpecification(String specification) { this.specification = specification; }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("billId", getBillId())
            .append("billNo", getBillNo())
            .append("materialId", getMaterialId())
            .append("quantity", getQuantity())
            .append("uniqueCode", getUniqueCode())
            .append("remark", getRemark())
            .append("status", getStatus())
            .append("isDelete", getIsDelete())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
