package com.hw.wms.domain;

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

/**
 * 成品订单库存记录对象 wms_product_stock_saleorder
 *
 * @author xins
 * @date 2024-02-22
 */
public class WmsProductStockSaleorder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 成品库存ID */
    private Long productStockSaleorderId;

    /** 仓库ID */
    @Excel(name = "仓库ID")
    private Long warehouseId;

    /** 仓库楼层 */
    @Excel(name = "仓库楼层")
    private Long warehouseFloor;

    /** 库存类型(2半成品，3成品) */
    @Excel(name = "库存类型(2半成品，3成品)")
    private String stockType;

    /** 产品ID，关联物料信息的物料ID */
    @Excel(name = "产品ID，关联物料信息的物料ID")
    private Long productId;

    /** 销售订单ID，关联销售订单主键 */
    @Excel(name = "销售订单ID，关联销售订单主键")
    private Long saleOrderId;

    /** 销售订单编号 */
    @Excel(name = "销售订单编号")
    private String saleorderCode;

    /** 总数量;此数量记录此订单生产的总数量，只能加，不能减 */
    @Excel(name = "总数量;此数量记录此订单生产的总数量，只能加，不能减")
    private BigDecimal totalAmount;

    /** 占用数量 */
    @Excel(name = "占用数量")
    private BigDecimal occupyAmount;

    /** 冻结数量 */
    @Excel(name = "冻结数量")
    private BigDecimal frozenAmount;

    /** 已申请数量 */
    @Excel(name = "已申请数量")
    private BigDecimal applyAmount;

    /** 已出库数量（库管或agv出库的数量） */
    @Excel(name = "已出库数量", readConverterExp = "库=管或agv出库的数量")
    private BigDecimal outstockAmount;

    /** 确认数量（在一楼最终扫码确认出库的数量） */
    @Excel(name = "确认数量", readConverterExp = "在=一楼最终扫码确认出库的数量")
    private BigDecimal confirmAmount;

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

    /** 最后更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updateDate;

    /** 有效标记 */
    @Excel(name = "有效标记")
    private String activeFlag;

    private String materialCode;

    private String materialName;

    /**
     * 销售订单销售数量
     */
    private BigDecimal orderAmount;

    private String warehouseName;


    public void setProductStockSaleorderId(Long productStockSaleorderId)
    {
        this.productStockSaleorderId = productStockSaleorderId;
    }

    public Long getProductStockSaleorderId()
    {
        return productStockSaleorderId;
    }
    public void setWarehouseId(Long warehouseId)
    {
        this.warehouseId = warehouseId;
    }

    public Long getWarehouseId()
    {
        return warehouseId;
    }
    public void setWarehouseFloor(Long warehouseFloor)
    {
        this.warehouseFloor = warehouseFloor;
    }

    public Long getWarehouseFloor()
    {
        return warehouseFloor;
    }
    public void setStockType(String stockType)
    {
        this.stockType = stockType;
    }

    public String getStockType()
    {
        return stockType;
    }
    public void setProductId(Long productId)
    {
        this.productId = productId;
    }

    public Long getProductId()
    {
        return productId;
    }
    public void setSaleOrderId(Long saleOrderId)
    {
        this.saleOrderId = saleOrderId;
    }

    public Long getSaleOrderId()
    {
        return saleOrderId;
    }
    public void setSaleorderCode(String saleorderCode)
    {
        this.saleorderCode = saleorderCode;
    }

    public String getSaleorderCode()
    {
        return saleorderCode;
    }
    public void setTotalAmount(BigDecimal totalAmount)
    {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getTotalAmount()
    {
        return totalAmount;
    }
    public void setOccupyAmount(BigDecimal occupyAmount)
    {
        this.occupyAmount = occupyAmount;
    }

    public BigDecimal getOccupyAmount()
    {
        return occupyAmount;
    }
    public void setFrozenAmount(BigDecimal frozenAmount)
    {
        this.frozenAmount = frozenAmount;
    }

    public BigDecimal getFrozenAmount()
    {
        return frozenAmount;
    }
    public void setApplyAmount(BigDecimal applyAmount)
    {
        this.applyAmount = applyAmount;
    }

    public BigDecimal getApplyAmount()
    {
        return applyAmount;
    }
    public void setOutstockAmount(BigDecimal outstockAmount)
    {
        this.outstockAmount = outstockAmount;
    }

    public BigDecimal getOutstockAmount()
    {
        return outstockAmount;
    }
    public void setConfirmAmount(BigDecimal confirmAmount)
    {
        this.confirmAmount = confirmAmount;
    }

    public BigDecimal getConfirmAmount()
    {
        return confirmAmount;
    }
    public void setCreateDate(Date createDate)
    {
        this.createDate = createDate;
    }

    public Date getCreateDate()
    {
        return createDate;
    }
    public void setUpdateDate(Date updateDate)
    {
        this.updateDate = updateDate;
    }

    public Date getUpdateDate()
    {
        return updateDate;
    }
    public void setActiveFlag(String activeFlag)
    {
        this.activeFlag = activeFlag;
    }

    public String getActiveFlag()
    {
        return activeFlag;
    }

    public String getMaterialCode() {
        return materialCode;
    }

    public void setMaterialCode(String materialCode) {
        this.materialCode = materialCode;
    }

    public String getMaterialName() {
        return materialName;
    }

    public void setMaterialName(String materialName) {
        this.materialName = materialName;
    }

    public BigDecimal getOrderAmount() {
        return orderAmount;
    }

    public void setOrderAmount(BigDecimal orderAmount) {
        this.orderAmount = orderAmount;
    }

    public String getWarehouseName() {
        return warehouseName;
    }

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

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("productStockSaleorderId", getProductStockSaleorderId())
            .append("warehouseId", getWarehouseId())
            .append("warehouseFloor", getWarehouseFloor())
            .append("stockType", getStockType())
            .append("productId", getProductId())
            .append("saleOrderId", getSaleOrderId())
            .append("saleorderCode", getSaleorderCode())
            .append("totalAmount", getTotalAmount())
            .append("occupyAmount", getOccupyAmount())
            .append("frozenAmount", getFrozenAmount())
            .append("applyAmount", getApplyAmount())
            .append("outstockAmount", getOutstockAmount())
            .append("confirmAmount", getConfirmAmount())
            .append("createBy", getCreateBy())
            .append("createDate", getCreateDate())
            .append("updateBy", getUpdateBy())
            .append("updateDate", getUpdateDate())
            .append("activeFlag", getActiveFlag())
            .toString();
    }
}
