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_raw_outstock_detail
 *
 * @author xs
 * @date 2023-12-20
 */
public class WmsRawOutstockDetail extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 原材料出库记录明细ID
     */
    private Long rawOutstockDetailId;

    /**
     * 原材料出库ID
     */
    @Excel(name = "原材料出库ID")
    private Long rawOutstockId;

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

    /**
     * 库位编码
     */
    @Excel(name = "库位编码")
    private String locationCode;

    /**
     * 物料条码
     */
    @Excel(name = "物料条码")
    private String materialBarcode;

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

    /**
     * 批次;扫描条码时，从打印条码记录表中获取
     */
    @Excel(name = "批次;扫描条码时，从打印条码记录表中获取")
    private String instockBatch;

    /**
     * 生产日期;扫描条码时，从打印条码记录表中获取
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生产日期;扫描条码时，从打印条码记录表中获取", width = 30, dateFormat = "yyyy-MM-dd")
    private Date materialProductionDate;

    /**
     * 计划数量
     */
    @Excel(name = "计划数量")
    private BigDecimal planAmount;

    /**
     * 出库数量
     */
    @Excel(name = "出库数量")
    private BigDecimal outstockAmount;

    /**
     * 执行状态(0待执行,1执行中,2执行完成)
     */
    @Excel(name = "执行状态(0待执行,1执行中,2执行完成)")
    private String executeStatus;

    /**
     * 同步ERP状态(0:失败,1成功)
     */
    @Excel(name = "同步ERP状态(0:失败,1成功)")
    private String erpStatus;

    /**
     * 出库人
     */
    @Excel(name = "出库人")
    private String outstockPerson;

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

    /**
     * 出库方式（ 0:PC出库 1:手持出库 2:AGV出库 ）
     */
    @Excel(name = "出库方式", readConverterExp = "0=:PC出库,1=:手持出库,2=:AGV出库")
    private String outstockWay;

    /**
     * 使用机台名称;出库扫描条码时，从打印条码记录表中获取
     */
    @Excel(name = "使用机台名称;出库扫描条码时，从打印条码记录表中获取")
    private String machineName;

    /**
     * 质检状态(0:待质检,1:合格,2:NG)
     */
    @Excel(name = "质检状态(0:待质检,1:合格,2:NG)")
    private String qualityStatus;

    /**
     * 创建时间
     */
    @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 BigDecimal stackAmount;


    private String materialCode;

    private String materialName;

    private String applyBy;

    private Date applyDate;
    private String taskType;

    private String taskCode;

    private String executeStatusStr;

    private String auditStatus;

    private String palletInfoCode;
    public void setRawOutstockDetailId(Long rawOutstockDetailId) {
        this.rawOutstockDetailId = rawOutstockDetailId;
    }

    public Long getRawOutstockDetailId() {
        return rawOutstockDetailId;
    }

    public void setRawOutstockId(Long rawOutstockId) {
        this.rawOutstockId = rawOutstockId;
    }

    public Long getRawOutstockId() {
        return rawOutstockId;
    }

    public Long getWarehouseId() {
        return warehouseId;
    }

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

    public void setLocationCode(String locationCode) {
        this.locationCode = locationCode;
    }

    public String getLocationCode() {
        return locationCode;
    }

    public void setMaterialBarcode(String materialBarcode) {
        this.materialBarcode = materialBarcode;
    }

    public String getMaterialBarcode() {
        return materialBarcode;
    }

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

    public Long getMaterialId() {
        return materialId;
    }

    public void setInstockBatch(String instockBatch) {
        this.instockBatch = instockBatch;
    }

    public String getInstockBatch() {
        return instockBatch;
    }

    public void setMaterialProductionDate(Date materialProductionDate) {
        this.materialProductionDate = materialProductionDate;
    }

    public Date getMaterialProductionDate() {
        return materialProductionDate;
    }

    public void setPlanAmount(BigDecimal planAmount) {
        this.planAmount = planAmount;
    }

    public BigDecimal getPlanAmount() {
        return planAmount;
    }

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

    public BigDecimal getOutstockAmount() {
        return outstockAmount == null ? BigDecimal.ZERO : outstockAmount;
    }

    public void setExecuteStatus(String executeStatus) {
        this.executeStatus = executeStatus;
    }

    public String getExecuteStatus() {
        return executeStatus;
    }

    public void setErpStatus(String erpStatus) {
        this.erpStatus = erpStatus;
    }

    public String getErpStatus() {
        return erpStatus;
    }

    public void setOutstockPerson(String outstockPerson) {
        this.outstockPerson = outstockPerson;
    }

    public String getOutstockPerson() {
        return outstockPerson;
    }

    public void setOutstockTime(Date outstockTime) {
        this.outstockTime = outstockTime;
    }

    public Date getOutstockTime() {
        return outstockTime;
    }

    public void setOutstockWay(String outstockWay) {
        this.outstockWay = outstockWay;
    }

    public String getOutstockWay() {
        return outstockWay;
    }

    public void setMachineName(String machineName) {
        this.machineName = machineName;
    }

    public String getMachineName() {
        return machineName;
    }

    public void setQualityStatus(String qualityStatus) {
        this.qualityStatus = qualityStatus;
    }

    public String getQualityStatus() {
        return qualityStatus;
    }

    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 setStackAmount(BigDecimal stackAmount) {
        this.stackAmount = stackAmount;
    }

    public BigDecimal getStackAmount() {
        return stackAmount;
    }

    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 String getApplyBy() {
        return applyBy;
    }

    public void setApplyBy(String applyBy) {
        this.applyBy = applyBy;
    }

    public Date getApplyDate() {
        return applyDate;
    }

    public void setApplyDate(Date applyDate) {
        this.applyDate = applyDate;
    }

    public String getTaskType() {
        return taskType;
    }

    public void setTaskType(String taskType) {
        this.taskType = taskType;
    }

    public String getTaskCode() {
        return taskCode;
    }

    public void setTaskCode(String taskCode) {
        this.taskCode = taskCode;
    }

    public String getExecuteStatusStr() {
        return executeStatusStr;
    }

    public void setExecuteStatusStr(String executeStatusStr) {
        this.executeStatusStr = executeStatusStr;
    }

    public String getAuditStatus() {
        return auditStatus;
    }

    public void setAuditStatus(String auditStatus) {
        this.auditStatus = auditStatus;
    }

    public String getPalletInfoCode() {
        return palletInfoCode;
    }

    public void setPalletInfoCode(String palletInfoCode) {
        this.palletInfoCode = palletInfoCode;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("rawOutstockDetailId", getRawOutstockDetailId())
                .append("rawOutstockId", getRawOutstockId())
                .append("locationCode", getLocationCode())
                .append("materialBarcode", getMaterialBarcode())
                .append("materialId", getMaterialId())
                .append("instockBatch", getInstockBatch())
                .append("materialProductionDate", getMaterialProductionDate())
                .append("planAmount", getPlanAmount())
                .append("outstockAmount", getOutstockAmount())
                .append("executeStatus", getExecuteStatus())
                .append("erpStatus", getErpStatus())
                .append("outstockPerson", getOutstockPerson())
                .append("outstockTime", getOutstockTime())
                .append("outstockWay", getOutstockWay())
                .append("machineName", getMachineName())
                .append("qualityStatus", getQualityStatus())
                .append("createBy", getCreateBy())
                .append("createDate", getCreateDate())
                .append("updateBy", getUpdateBy())
                .append("updateDate", getUpdateDate())
                .append("stackAmount", getStackAmount())
                .toString();
    }
}
