package com.hw.qms.domain;

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

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

/**
 * 条码信息对象 mes_base_barcode_info
 *
 * @author xins
 * @date 2024-01-15
 */
public class MesBaseBarcodeInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键标识 */
    private Long barcodeId;

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

    /** 打印人 */
    @Excel(name = "打印人")
    private String printPerson;

    /** 批次标识(0否，1是);在打印时，如果物料已设置，则根据物料的批次信息，如果没有设置则在此需要选择，选择物料等信息保存后同步设置物料信息。 */
    @Excel(name = "批次标识(0否，1是);在打印时，如果物料已设置，则根据物料的批次信息，如果没有设置则在此需要选择，选择物料等信息保存后同步设置物料信息。")
    private String batchFlag;

    /** 条码类型（1原材料,2半成品,3成品,4背板） */
    @Excel(name = "条码类型", readConverterExp = "1=原材料,2半成品,3成品,4背板")
    private String barcodeType;

    /** 条码内容;如果是按单个物料贴，则一个物料一个条码，如果是按批次贴，则条码跟批次代码相同 */
    @Excel(name = "条码内容;如果是按单个物料贴，则一个物料一个条码，如果是按批次贴，则条码跟批次代码相同")
    private String barcodeInfo;

    /** 批次代码 */
    @Excel(name = "批次代码")
    private String batchCode;

    /** 托盘RFID代码 */
    @Excel(name = "托盘RFID代码")
    private String palletInfoCode;

    /** 物料ID，关联mes_base_material_info的material_id */
    @Excel(name = "物料ID，关联mes_base_material_info的material_id")
    private Long materialId;

    /** 供应商ID */
    @Excel(name = "供应商ID")
    private Long manufacturerId;

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

    /** 打印机台名称，打印时获取 */
    @Excel(name = "打印机台名称，打印时获取")
    private String machineName;

    /** 采购订单号;适合原材料入库时 */
    @Excel(name = "采购订单号;适合原材料入库时")
    private String poNo;

    /** 生产日期;打印时根据领料单选择输入 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生产日期;打印时根据领料单选择输入", width = 30, dateFormat = "yyyy-MM-dd")
    private Date productionDate;

    /** 接受日期;打印时的系统日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "接受日期;打印时的系统日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date acceptedDate;

    /** 最晚出库日期;可以直接输入，也可以根据日限计算 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最晚出库日期;可以直接输入，也可以根据日限计算", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastOutstockDate;

    /** 生产计划编号，关联mes_pd_product_plan的plan_code;适合生产出入库等 */
    @Excel(name = "生产计划编号，关联mes_pd_product_plan的plan_code;适合生产出入库等")
    private String planCode;

    /** 生产计划明细编号，关联mes_product_plan_detail的plan_detail_code;适合生产出入库等 */
    @Excel(name = "生产计划明细编号，关联mes_product_plan_detail的plan_detail_code;适合生产出入库等")
    private String planDetailCode;

    /** 销售订单ID;适合生产出入库等 */
    private String saleOrderId;

    /** 销售订单编号;适合生产出入库等 */
    @Excel(name = "销售订单编号;适合生产出入库等")
    private String saleorderCode;

    /** 项目号 */
    @Excel(name = "项目号")
    private String projectNo;

    /** 流水号 */
    @Excel(name = "流水号")
    private String serialNumber;

    /** 绑定状态(1绑定，0解绑) */
    @Excel(name = "绑定状态(1绑定，0解绑)")
    private String bindStatus;

    /** 绑定托盘的人 */
    @Excel(name = "绑定托盘的人")
    private String bindBy;

    /** 绑定托盘时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "绑定托盘时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date bindTime;

    private String materialCode;

    private String materialName;

    public void setBarcodeId(Long barcodeId)
    {
        this.barcodeId = barcodeId;
    }

    public Long getBarcodeId()
    {
        return barcodeId;
    }
    public void setPrintTime(Date printTime)
    {
        this.printTime = printTime;
    }

    public Date getPrintTime()
    {
        return printTime;
    }
    public void setPrintPerson(String printPerson)
    {
        this.printPerson = printPerson;
    }

    public String getPrintPerson()
    {
        return printPerson;
    }
    public void setBatchFlag(String batchFlag)
    {
        this.batchFlag = batchFlag;
    }

    public String getBatchFlag()
    {
        return batchFlag;
    }
    public void setBarcodeType(String barcodeType)
    {
        this.barcodeType = barcodeType;
    }

    public String getBarcodeType()
    {
        return barcodeType;
    }
    public void setBarcodeInfo(String barcodeInfo)
    {
        this.barcodeInfo = barcodeInfo;
    }

    public String getBarcodeInfo()
    {
        return barcodeInfo;
    }
    public void setBatchCode(String batchCode)
    {
        this.batchCode = batchCode;
    }

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

    public String getPalletInfoCode()
    {
        return palletInfoCode;
    }
    public void setMaterialId(Long materialId)
    {
        this.materialId = materialId;
    }

    public Long getMaterialId()
    {
        return materialId;
    }
    public void setManufacturerId(Long manufacturerId)
    {
        this.manufacturerId = manufacturerId;
    }

    public Long getManufacturerId()
    {
        return manufacturerId;
    }
    public void setAmount(BigDecimal amount)
    {
        this.amount = amount;
    }

    public BigDecimal getAmount()
    {
        return amount;
    }
    public void setMachineName(String machineName)
    {
        this.machineName = machineName;
    }

    public String getMachineName()
    {
        return machineName;
    }
    public void setPoNo(String poNo)
    {
        this.poNo = poNo;
    }

    public String getPoNo()
    {
        return poNo;
    }
    public void setProductionDate(Date productionDate)
    {
        this.productionDate = productionDate;
    }

    public Date getProductionDate()
    {
        return productionDate;
    }
    public void setAcceptedDate(Date acceptedDate)
    {
        this.acceptedDate = acceptedDate;
    }

    public Date getAcceptedDate()
    {
        return acceptedDate;
    }
    public void setLastOutstockDate(Date lastOutstockDate)
    {
        this.lastOutstockDate = lastOutstockDate;
    }

    public Date getLastOutstockDate()
    {
        return lastOutstockDate;
    }
    public void setPlanCode(String planCode)
    {
        this.planCode = planCode;
    }

    public String getPlanCode()
    {
        return planCode;
    }
    public void setPlanDetailCode(String planDetailCode)
    {
        this.planDetailCode = planDetailCode;
    }

    public String getPlanDetailCode()
    {
        return planDetailCode;
    }

    public String getSaleOrderId() {
        return saleOrderId;
    }

    public void setSaleOrderId(String saleOrderId) {
        this.saleOrderId = saleOrderId;
    }

    public void setSaleorderCode(String saleorderCode)
    {
        this.saleorderCode = saleorderCode;
    }

    public String getSaleorderCode()
    {
        return saleorderCode;
    }
    public void setProjectNo(String projectNo)
    {
        this.projectNo = projectNo;
    }

    public String getProjectNo()
    {
        return projectNo;
    }
    public void setSerialNumber(String serialNumber)
    {
        this.serialNumber = serialNumber;
    }

    public String getSerialNumber()
    {
        return serialNumber;
    }
    public void setBindStatus(String bindStatus)
    {
        this.bindStatus = bindStatus;
    }

    public String getBindStatus()
    {
        return bindStatus;
    }
    public void setBindBy(String bindBy)
    {
        this.bindBy = bindBy;
    }

    public String getBindBy()
    {
        return bindBy;
    }
    public void setBindTime(Date bindTime)
    {
        this.bindTime = bindTime;
    }

    public Date getBindTime()
    {
        return bindTime;
    }

    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;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("barcodeId", getBarcodeId())
            .append("printTime", getPrintTime())
            .append("printPerson", getPrintPerson())
            .append("batchFlag", getBatchFlag())
            .append("barcodeType", getBarcodeType())
            .append("barcodeInfo", getBarcodeInfo())
            .append("batchCode", getBatchCode())
            .append("palletInfoCode", getPalletInfoCode())
            .append("materialId", getMaterialId())
            .append("manufacturerId", getManufacturerId())
            .append("amount", getAmount())
            .append("machineName", getMachineName())
            .append("poNo", getPoNo())
            .append("productionDate", getProductionDate())
            .append("acceptedDate", getAcceptedDate())
            .append("lastOutstockDate", getLastOutstockDate())
            .append("planCode", getPlanCode())
            .append("planDetailCode", getPlanDetailCode())
            .append("saleorderCode", getSaleorderCode())
            .append("projectNo", getProjectNo())
            .append("serialNumber", getSerialNumber())
            .append("remark", getRemark())
            .append("bindStatus", getBindStatus())
            .append("bindBy", getBindBy())
            .append("bindTime", getBindTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
