package com.shzg.project.worn.domain;

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_inbound_bill
 */
public class WornInboundBill extends BaseEntity
{
    private static final long serialVersionUID = 1L;

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

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

    /** 入库单类型（0入库单入库 1调拨入库 2退货入库） */
    @Excel(name = "入库单类型", readConverterExp = "0=入库申请,1=入库成功,2=出库申请,3=出库成功,4=已作废")
    private String billType;

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

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

    /** 存储区编码 */
    @Excel(name = "存储区编码")
    private String areaCode;

    /** 存储区名称 */
    @Excel(name = "存储区名称")
    private String areaName;

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

    /** 状态（0草稿 1已完成） */
    @Excel(name = "状态", readConverterExp = "0=草稿,1=已完成,2=部分入库")
    private String status;

    /** 逻辑删除（0正常 1删除） */
    @Excel(name = "逻辑删除", readConverterExp = "0=正常,1=删除")
    private String isDelete;

    /** 项目ID（用于数据隔离，对应sys_dept.id） */
    @Excel(name = "项目ID", readConverterExp = "用于数据隔离，对应sys_dept.id")
    private Long projectId;

    /** ================== 新增：明细列表 ================== */
    private List<WornInboundItem> itemList;

    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }

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

    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 getWarehouseName() { return warehouseName; }
    public void setWarehouseName(String warehouseName) { this.warehouseName = warehouseName; }

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

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

    public Date getInboundTime() { return inboundTime; }
    public void setInboundTime(Date inboundTime) { this.inboundTime = inboundTime; }

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

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

    public List<WornInboundItem> getItemList() { return itemList; }
    public void setItemList(List<WornInboundItem> itemList) { this.itemList = itemList; }
    public Long getProjectId()
    {
        return projectId;
    }

    public void setProjectId(Long projectId)
    {
        this.projectId = projectId;
    }
    @Override
    public String toString()
    {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("billNo", getBillNo())
                .append("billType", getBillType())
                .append("warehouseCode", getWarehouseCode())
                .append("warehouseName", getWarehouseName())
                .append("areaCode", getAreaCode())
                .append("areaName", getAreaName())
                .append("remark", getRemark())
                .append("inboundTime", getInboundTime())
                .append("status", getStatus())
                .append("isDelete", getIsDelete())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("itemList", getItemList())
                .toString();
    }
}