package com.hw.mes.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;

/**
 * 采购订单信息对象 mes_purchase_order
 *
 * @author Yinq
 * @date 2024-02-19
 */
public class MesPurchaseOrder extends BaseEntity {
    private static final long serialVersionUID = 1L;

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

    /**
     * ERP主键信息;对应FID
     */
    @Excel(name = "ERP主键信息")
    private Long erpId;

    /**
     * 金蝶ERP订单明细ID;对应FPOOrderEntry.FEntryID
     */
    @Excel(name = "金蝶ERP订单明细ID")
    private Long fentryId;

    /**
     * 采购订单编号;对应FBillNo
     */
    @Excel(name = "采购订单编号")
    private String poNo;

    /**
     * 单据状态;FDocumentStatus
     */
    @Excel(name = "单据状态")
    private String documentStatus;

    /**
     * 物料ID,关联物料信息主键
     */
    @Excel(name = "物料ID")
    private Long materialId;

    /**
     * 物料编码;对应FMaterialId.FNumber
     */
    @Excel(name = "物料编码")
    private String materialCode;

    /**
     * 物料名称;对应FMaterialId.FName
     */
    @Excel(name = "物料名称")
    private String materialName;

    /**
     * 订单计划数量;对应FQty
     */
    @Excel(name = "订单计划数量")
    private BigDecimal orderAmount;

    /**
     * 完成采购数量
     */
    @Excel(name = "完成采购数量")
    private BigDecimal completeAmount;

    /**
     * 审核日期;对应FApproveDate
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审核日期;对应FApproveDate", width = 30, dateFormat = "yyyy-MM-dd")
    private Date approveDate;

    /**
     * ERP最后修改日期;对应FModifyDate
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "ERP最后修改日期;对应FModifyDate", width = 30, dateFormat = "yyyy-MM-dd")
    private Date erpModifyDate;

    /**
     * 计划交货日期;对应FDeliveryDate
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "计划交货日期;对应FDeliveryDate", width = 30, dateFormat = "yyyy-MM-dd")
    private Date planDeliveryDate;

    /**
     * 计划开始日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "计划开始日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date beginDate;

    /**
     * 计划结束日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "计划结束日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endDate;

    /**
     * 订单状态(1待采购2采购中3采购完成)
     */
    @Excel(name = "订单状态(1待采购2采购中3采购完成)")
    private String orderStatus;

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

    /**
     * 是否标识：1-是；0-否
     */
    @Excel(name = "是否标识：1-是；0-否")
    private String isFlag;

    public void setPurchaseOrderId(Long purchaseOrderId) {
        this.purchaseOrderId = purchaseOrderId;
    }

    public Long getPurchaseOrderId() {
        return purchaseOrderId;
    }

    public void setErpId(Long erpId) {
        this.erpId = erpId;
    }

    public Long getErpId() {
        return erpId;
    }

    public void setFentryId(Long fentryId) {
        this.fentryId = fentryId;
    }

    public Long getFentryId() {
        return fentryId;
    }

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

    public String getPoNo() {
        return poNo;
    }

    public void setDocumentStatus(String documentStatus) {
        this.documentStatus = documentStatus;
    }

    public String getDocumentStatus() {
        return documentStatus;
    }

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

    public Long getMaterialId() {
        return materialId;
    }

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

    public String getMaterialCode() {
        return materialCode;
    }

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

    public String getMaterialName() {
        return materialName;
    }

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

    public BigDecimal getOrderAmount() {
        return orderAmount;
    }

    public void setCompleteAmount(BigDecimal completeAmount) {
        this.completeAmount = completeAmount;
    }

    public BigDecimal getCompleteAmount() {
        return completeAmount;
    }

    public void setApproveDate(Date approveDate) {
        this.approveDate = approveDate;
    }

    public Date getApproveDate() {
        return approveDate;
    }

    public void setErpModifyDate(Date erpModifyDate) {
        this.erpModifyDate = erpModifyDate;
    }

    public Date getErpModifyDate() {
        return erpModifyDate;
    }

    public void setPlanDeliveryDate(Date planDeliveryDate) {
        this.planDeliveryDate = planDeliveryDate;
    }

    public Date getPlanDeliveryDate() {
        return planDeliveryDate;
    }

    public void setBeginDate(Date beginDate) {
        this.beginDate = beginDate;
    }

    public Date getBeginDate() {
        return beginDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus;
    }

    public String getOrderStatus() {
        return orderStatus;
    }

    public void setCompleteDate(Date completeDate) {
        this.completeDate = completeDate;
    }

    public Date getCompleteDate() {
        return completeDate;
    }

    public void setIsFlag(String isFlag) {
        this.isFlag = isFlag;
    }

    public String getIsFlag() {
        return isFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("purchaseOrderId", getPurchaseOrderId())
                .append("erpId", getErpId())
                .append("fentryId", getFentryId())
                .append("poNo", getPoNo())
                .append("documentStatus", getDocumentStatus())
                .append("materialId", getMaterialId())
                .append("materialCode", getMaterialCode())
                .append("materialName", getMaterialName())
                .append("orderAmount", getOrderAmount())
                .append("completeAmount", getCompleteAmount())
                .append("approveDate", getApproveDate())
                .append("erpModifyDate", getErpModifyDate())
                .append("planDeliveryDate", getPlanDeliveryDate())
                .append("beginDate", getBeginDate())
                .append("endDate", getEndDate())
                .append("orderStatus", getOrderStatus())
                .append("completeDate", getCompleteDate())
                .append("isFlag", getIsFlag())
                .append("remark", getRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
