package com.hw.wms.domain;

import java.math.BigDecimal;
import java.util.List;
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
 *
 * @author xs
 * @date 2023-12-20
 */
public class WmsRawOutstock extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 原材料出库记录ID
     */
    private Long rawOutstockId;

    /**
     * 原材料出库记录ID,兼容PDA使用，实际也是raw_outstock_id
     */
    private Long rawOutstockDetailId;
    /**
     * 任务编号;移库时必须
     */
    @Excel(name = "任务编号;移库时必须")
    private String taskCode;

    /**
     * 仓库ID;领料时需要保存
     */
    @Excel(name = "仓库ID;领料时需要保存")
    private Long warehouseId;

    /**
     * 库位编码;移库和合库时需要保存
     */
    @Excel(name = "库位编码;移库和合库时需要保存")
    private String locationCode;

    /**
     * 工单ID,关联pd_base_order_info的order_id
     */
    @Excel(name = "销售订单ID")
    private Long orderId;

    /**
     * 计划编号,关联pd_base_plan_info的plan_id
     */
    @Excel(name = "计划编号,关联pd_base_plan_info的plan_code")
    private String planCode;

    /**
     * 计划明细ID,关联pd_base_plan_detail的plan_detail_id
     */
    @Excel(name = "计划明细编号,关联pd_base_plan_detail的plan_detail_code")
    private String planDetailCode;

    /**
     * 所属工位，关联pd_base_station_info的station_id
     */
    @Excel(name = "所属工位，关联pd_base_station_info的station_id")
    private Long stationId;

    /**
     * 成品ID,关联物料表物料id
     */
    @Excel(name = "物料ID,关联物料表物料id")
    private Long materialId;

    /** 物料批次 */
    @Excel(name = "物料批次")
    private String materialBatch;

    /** 物料批次，转换兼容PDA使用 */
    @Excel(name = "物料批次")
    private String instockBatch;

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

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

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

    /** 出库目的地 */
    @Excel(name = "出库目的地")
    private String endStationCode;

    /**
     * 操作类型(0自动,1手动,2强制,3调度)
     */
    @Excel(name = "操作类型(0自动,1手动,2强制,3调度)")
    private String operationType;

    /**
     * 任务类型(1生产领料,2移库出库,3合库出库,9其他领料)
     */
    @Excel(name = "任务类型(1生产领料,2移库出库,3合库出库,9其他领料)")
    private String taskType;

    /**
     * 申请原因
     */
    @Excel(name = "申请原因")
    private String applyReason;

    /**
     * 审核原因
     */
    @Excel(name = "审核原因")
    private String auditReason;

    /**
     * 审核状态(0待审核,1审核通过,2审核未通过)
     */
    @Excel(name = "审核状态(0待审核,1审核通过,2审核未通过)")
    private String auditStatus;

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

    /**
     * 申请人
     */
    @Excel(name = "申请人")
    private String applyBy;

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

    /**
     * 审核人
     */
    @Excel(name = "审核人")
    private String auditBy;

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

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

    /**
     * 执行开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "执行开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date beginTime;

    /**
     * 执行结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "执行结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

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

    /** 同步给ERP的数量 */
    @Excel(name = "同步给ERP的数量")
    private BigDecimal erpAmount;

    private String warehouseName;

    private String materialCode;

    private String materialName;

    private BigDecimal planAmount;

    /**
     * 执行状态(0待执行,1执行中,2执行完成)多个使用，以,隔开
     */
    private String executeStatusStr;

    private String materialBarcode;

    /**
     * 原材料出库记录明细信息
     */
    private List<WmsRawOutstockDetail> wmsRawOutstockDetailList;

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

    public Long getRawOutstockId() {
        return rawOutstockId;
    }

    public Long getRawOutstockDetailId() {
        return rawOutstockDetailId;
    }

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

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

    public String getTaskCode() {
        return taskCode;
    }

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

    public Long getWarehouseId() {
        return warehouseId;
    }

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

    public String getLocationCode() {
        return locationCode;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Long getOrderId() {
        return orderId;
    }

    public String getPlanCode() {
        return planCode;
    }

    public void setPlanCode(String planCode) {
        this.planCode = planCode;
    }

    public String getPlanDetailCode() {
        return planDetailCode;
    }

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

    public void setStationId(Long stationId) {
        this.stationId = stationId;
    }

    public Long getStationId() {
        return stationId;
    }

    public Long getMaterialId() {
        return materialId;
    }

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

    public String getMaterialBatch() {
        return materialBatch;
    }

    public void setMaterialBatch(String materialBatch) {
        this.materialBatch = materialBatch;
    }

    public String getInstockBatch() {
        return instockBatch;
    }

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

    public String getPalletInfoCode() {
        return palletInfoCode;
    }

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

    public BigDecimal getOutstockAmount() {
        return outstockAmount;
    }

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

    public BigDecimal getRealOutstockAmount() {
        return realOutstockAmount;
    }

    public void setRealOutstockAmount(BigDecimal realOutstockAmount) {
        this.realOutstockAmount = realOutstockAmount;
    }

    public String getEndStationCode() {
        return endStationCode;
    }

    public void setEndStationCode(String endStationCode) {
        this.endStationCode = endStationCode;
    }

    public void setOperationType(String operationType) {
        this.operationType = operationType;
    }

    public String getOperationType() {
        return operationType;
    }

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

    public String getTaskType() {
        return taskType;
    }

    public void setApplyReason(String applyReason) {
        this.applyReason = applyReason;
    }

    public String getApplyReason() {
        return applyReason;
    }

    public void setAuditReason(String auditReason) {
        this.auditReason = auditReason;
    }

    public String getAuditReason() {
        return auditReason;
    }

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

    public String getAuditStatus() {
        return auditStatus;
    }

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

    public String getExecuteStatus() {
        return executeStatus;
    }

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

    public String getApplyBy() {
        return applyBy;
    }

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

    public Date getApplyDate() {
        return applyDate;
    }

    public void setAuditBy(String auditBy) {
        this.auditBy = auditBy;
    }

    public String getAuditBy() {
        return auditBy;
    }

    public void setAuditDate(Date auditDate) {
        this.auditDate = auditDate;
    }

    public Date getAuditDate() {
        return auditDate;
    }

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

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setBeginTime(Date beginTime) {
        this.beginTime = beginTime;
    }

    public String getErpStatus() {
        return erpStatus;
    }

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

    public BigDecimal getErpAmount() {
        return erpAmount;
    }

    public void setErpAmount(BigDecimal erpAmount) {
        this.erpAmount = erpAmount;
    }

    public Date getBeginTime() {
        return beginTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public List<WmsRawOutstockDetail> getWmsRawOutstockDetailList() {
        return wmsRawOutstockDetailList;
    }

    public void setWmsRawOutstockDetailList(List<WmsRawOutstockDetail> wmsRawOutstockDetailList) {
        this.wmsRawOutstockDetailList = wmsRawOutstockDetailList;
    }

    public String getWarehouseName() {
        return warehouseName;
    }

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

    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 getPlanAmount() {
        return planAmount;
    }

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

    public String getExecuteStatusStr() {
        return executeStatusStr;
    }

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

    public String getMaterialBarcode() {
        return materialBarcode;
    }

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

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("rawOutstockId", getRawOutstockId())
                .append("taskCode", getTaskCode())
                .append("warehouseId", getWarehouseId())
                .append("locationCode", getLocationCode())
                .append("orderId", getOrderId())
                .append("planCode", getPlanCode())
                .append("planDetailCode", getPlanDetailCode())
                .append("stationId", getStationId())
                .append("materialId", getMaterialId())
                .append("operationType", getOperationType())
                .append("taskType", getTaskType())
                .append("applyReason", getApplyReason())
                .append("auditReason", getAuditReason())
                .append("auditStatus", getAuditStatus())
                .append("executeStatus", getExecuteStatus())
                .append("applyBy", getApplyBy())
                .append("applyDate", getApplyDate())
                .append("auditBy", getAuditBy())
                .append("auditDate", getAuditDate())
                .append("updateBy", getUpdateBy())
                .append("updateDate", getUpdateDate())
                .append("beginTime", getBeginTime())
                .append("endTime", getEndTime())
                .append("wmsRawOutstockDetailList", getWmsRawOutstockDetailList())
                .toString();
    }
}
