package com.fs.oms.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fs.common.annotation.Excel;
import com.fs.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * oms采购单对象 oms_purchase_order
 *
 * @author oms
 * @date 2023-07-03
 */
public class OmsPurchaseOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 采购单号 */
    @Excel(name = "采购单号")
    private String code;

    /** 采购申请单id */
    @Excel(name = "采购申请单id")
    private Long applyId;

    /** 供应商id */
    @Excel(name = "供应商id")
    private Long supplierId;

    /** 要求收货仓库id */
    @Excel(name = "要求收货仓库id")
    private Long warehouseId;

    /** 预计到货时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "预计到货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expectedTime;

    /** 采购类型 0:普通采购  1:赠品采购 */
    @Excel(name = "采购类型 0:普通采购  1:赠品采购")
    private Long type;

    /** 采购员ID */
    @Excel(name = "采购员ID")
    private Long purchaseUserId;

    /** 溢装比例 */
    @Excel(name = "溢装比例")
    private BigDecimal overfillRate;

    /** 采购商品信息 */
    @Excel(name = "采购商品信息")
    private String products;

    /** 总金额 */
    @Excel(name = "总金额")
    private BigDecimal amount;

    /** 发票类型 0无 1电子发票 2增值税普通发票 3增值税专用发票 */
    @Excel(name = "发票类型 0无 1电子发票 2增值税普通发票 3增值税专用发票")
    private Long invoiceType;

    /** 是否含包装 0否  1是 */
    @Excel(name = "是否含包装 0否  1是")
    private Long packagingFlag;

    /** 是否包邮 0否  1是 */
    @Excel(name = "是否包邮 0否  1是")
    private Long shippingFlag;

    /** 已下采购数量/入库数量 */
    @Excel(name = "已下采购数量/入库数量")
    private Long alreadyNum;

    /** 未下采购数量/未入库数量 */
    @Excel(name = "未下采购数量/未入库数量")
    private Long waitNum;

    /** 采购数量 */
    @Excel(name = "采购数量")
    private Long planNum;

    /** 审核人ID */
    @Excel(name = "审核人ID")
    private Long auditUserId;

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

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

    /** 状态 0待审核  1已审核待入库 2已完成 3已取消 4待通知WMS 5通知WMS失败 */
    @Excel(name = "状态 0待审核  1已审核待入库 2已完成 3已取消 4待通知WMS 5通知WMS失败")
    private Long status;

    /** 入库状态 0未入库  1部分入库 2整单入库 3超收入库 */
    @Excel(name = "入库状态 0未入库  1部分入库 2整单入库 3超收入库")
    private Long stockinStatus;

    /** 停止等待数量 */
    @Excel(name = "停止等待数量")
    private Long cancelNum;

    /** 物流id */
    @Excel(name = "物流id")
    private Long logisticsId;

    /** 结算方式 */
    @Excel(name = "结算方式")
    private String paymentType;

    /** 创建人ID */
    @Excel(name = "创建人ID")
    private Long createUserId;

    /** 更新人ID */
    @Excel(name = "更新人ID")
    private Long updateUserId;

    private String applyCode;

    public String getApplyCode() {
        return applyCode;
    }

    public void setApplyCode(String applyCode) {
        this.applyCode = applyCode;
    }

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

    public Long getId()
    {
        return id;
    }
    public void setCode(String code)
    {
        this.code = code;
    }

    public String getCode()
    {
        return code;
    }
    public void setApplyId(Long applyId)
    {
        this.applyId = applyId;
    }

    public Long getApplyId()
    {
        return applyId;
    }
    public void setSupplierId(Long supplierId)
    {
        this.supplierId = supplierId;
    }

    public Long getSupplierId()
    {
        return supplierId;
    }
    public void setWarehouseId(Long warehouseId)
    {
        this.warehouseId = warehouseId;
    }

    public Long getWarehouseId()
    {
        return warehouseId;
    }
    public void setExpectedTime(Date expectedTime)
    {
        this.expectedTime = expectedTime;
    }

    public Date getExpectedTime()
    {
        return expectedTime;
    }
    public void setType(Long type)
    {
        this.type = type;
    }

    public Long getType()
    {
        return type;
    }
    public void setPurchaseUserId(Long purchaseUserId)
    {
        this.purchaseUserId = purchaseUserId;
    }

    public Long getPurchaseUserId()
    {
        return purchaseUserId;
    }
    public void setOverfillRate(BigDecimal overfillRate)
    {
        this.overfillRate = overfillRate;
    }

    public BigDecimal getOverfillRate()
    {
        return overfillRate;
    }
    public void setProducts(String products)
    {
        this.products = products;
    }

    public String getProducts()
    {
        return products;
    }
    public void setAmount(BigDecimal amount)
    {
        this.amount = amount;
    }

    public BigDecimal getAmount()
    {
        return amount;
    }
    public void setInvoiceType(Long invoiceType)
    {
        this.invoiceType = invoiceType;
    }

    public Long getInvoiceType()
    {
        return invoiceType;
    }
    public void setPackagingFlag(Long packagingFlag)
    {
        this.packagingFlag = packagingFlag;
    }

    public Long getPackagingFlag()
    {
        return packagingFlag;
    }
    public void setShippingFlag(Long shippingFlag)
    {
        this.shippingFlag = shippingFlag;
    }

    public Long getShippingFlag()
    {
        return shippingFlag;
    }
    public void setAlreadyNum(Long alreadyNum)
    {
        this.alreadyNum = alreadyNum;
    }

    public Long getAlreadyNum()
    {
        return alreadyNum;
    }
    public void setWaitNum(Long waitNum)
    {
        this.waitNum = waitNum;
    }

    public Long getWaitNum()
    {
        return waitNum;
    }
    public void setPlanNum(Long planNum)
    {
        this.planNum = planNum;
    }

    public Long getPlanNum()
    {
        return planNum;
    }
    public void setAuditUserId(Long auditUserId)
    {
        this.auditUserId = auditUserId;
    }

    public Long getAuditUserId()
    {
        return auditUserId;
    }
    public void setAuditTime(Date auditTime)
    {
        this.auditTime = auditTime;
    }

    public Date getAuditTime()
    {
        return auditTime;
    }
    public void setFinishTime(Date finishTime)
    {
        this.finishTime = finishTime;
    }

    public Date getFinishTime()
    {
        return finishTime;
    }
    public void setStatus(Long status)
    {
        this.status = status;
    }

    public Long getStatus()
    {
        return status;
    }
    public void setStockinStatus(Long stockinStatus)
    {
        this.stockinStatus = stockinStatus;
    }

    public Long getStockinStatus()
    {
        return stockinStatus;
    }
    public void setCancelNum(Long cancelNum)
    {
        this.cancelNum = cancelNum;
    }

    public Long getCancelNum()
    {
        return cancelNum;
    }
    public void setLogisticsId(Long logisticsId)
    {
        this.logisticsId = logisticsId;
    }

    public Long getLogisticsId()
    {
        return logisticsId;
    }
    public void setPaymentType(String paymentType)
    {
        this.paymentType = paymentType;
    }

    public String getPaymentType()
    {
        return paymentType;
    }
    public void setCreateUserId(Long createUserId)
    {
        this.createUserId = createUserId;
    }

    public Long getCreateUserId()
    {
        return createUserId;
    }
    public void setUpdateUserId(Long updateUserId)
    {
        this.updateUserId = updateUserId;
    }

    public Long getUpdateUserId()
    {
        return updateUserId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("code", getCode())
            .append("applyId", getApplyId())
            .append("supplierId", getSupplierId())
            .append("warehouseId", getWarehouseId())
            .append("expectedTime", getExpectedTime())
            .append("type", getType())
            .append("purchaseUserId", getPurchaseUserId())
            .append("overfillRate", getOverfillRate())
            .append("products", getProducts())
            .append("amount", getAmount())
            .append("invoiceType", getInvoiceType())
            .append("packagingFlag", getPackagingFlag())
            .append("shippingFlag", getShippingFlag())
            .append("alreadyNum", getAlreadyNum())
            .append("waitNum", getWaitNum())
            .append("planNum", getPlanNum())
            .append("auditUserId", getAuditUserId())
            .append("auditTime", getAuditTime())
            .append("finishTime", getFinishTime())
            .append("status", getStatus())
            .append("stockinStatus", getStockinStatus())
            .append("cancelNum", getCancelNum())
            .append("logisticsId", getLogisticsId())
            .append("paymentType", getPaymentType())
            .append("createUserId", getCreateUserId())
            .append("createTime", getCreateTime())
            .append("updateUserId", getUpdateUserId())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
                .append("applyCode",getApplyCode())
            .toString();
    }
}
