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_sale_order
 *
 * @author Yinq
 * @date 2024-02-19
 */
public class MesSaleOrder extends BaseEntity {
    private static final long serialVersionUID = 1L;

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

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

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

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

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

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

    /**
     * 所属工厂,关联mes_base_factory_info的factory_id
     */
    @Excel(name = "所属工厂,关联mes_base_factory_info的factory_id")
    private Long factoryId;

    /**
     * 所属产线，关联mes_base_prodline_info的prodline_id
     */
    @Excel(name = "所属产线，关联mes_base_prodline_info的prodline_id")
    private Long prodlineId;

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

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

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

    /**
     * 物料组
     */
    @Excel(name = "物料组")
    private String matkl;

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

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

    /**
     * 已发布数量（或叫已派工数量）
     */
    @Excel(name = "已发布数量", readConverterExp = "或=叫已派工数量")
    private BigDecimal releaseQty;

    /**
     * 是否已下达计划（1-是，0-否）
     */
    @Excel(name = "是否已下达计划", readConverterExp = "1=-是，0-否")
    private String isRelease;

    /**
     * 审核日期;对应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;

    /**
     * 计划交货日期;对应FMinPlanDeliveryDate
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "计划交货日期;对应FMinPlanDeliveryDate", 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;

    /**
     * 完成日期
     */
    @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 setSaleOrderId(Long saleOrderId) {
        this.saleOrderId = saleOrderId;
    }

    public Long getSaleOrderId() {
        return saleOrderId;
    }

    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 setSaleorderCode(String saleorderCode) {
        this.saleorderCode = saleorderCode;
    }

    public String getSaleorderCode() {
        return saleorderCode;
    }

    public void setSaleorderLinenumber(String saleorderLinenumber) {
        this.saleorderLinenumber = saleorderLinenumber;
    }

    public String getSaleorderLinenumber() {
        return saleorderLinenumber;
    }

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

    public String getDocumentStatus() {
        return documentStatus;
    }

    public void setFactoryId(Long factoryId) {
        this.factoryId = factoryId;
    }

    public Long getFactoryId() {
        return factoryId;
    }

    public void setProdlineId(Long prodlineId) {
        this.prodlineId = prodlineId;
    }

    public Long getProdlineId() {
        return prodlineId;
    }

    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 setMatkl(String matkl) {
        this.matkl = matkl;
    }

    public String getMatkl() {
        return matkl;
    }

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

    public BigDecimal getReleaseQty() {
        return releaseQty;
    }

    public void setIsRelease(String isRelease) {
        this.isRelease = isRelease;
    }

    public String getIsRelease() {
        return isRelease;
    }

    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 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("saleOrderId", getSaleOrderId())
                .append("erpId", getErpId())
                .append("fentryId", getFentryId())
                .append("saleorderCode", getSaleorderCode())
                .append("saleorderLinenumber", getSaleorderLinenumber())
                .append("documentStatus", getDocumentStatus())
                .append("factoryId", getFactoryId())
                .append("prodlineId", getProdlineId())
                .append("materialId", getMaterialId())
                .append("materialCode", getMaterialCode())
                .append("materialName", getMaterialName())
                .append("matkl", getMatkl())
                .append("orderAmount", getOrderAmount())
                .append("completeAmount", getCompleteAmount())
                .append("releaseQty", getReleaseQty())
                .append("isRelease", getIsRelease())
                .append("approveDate", getApproveDate())
                .append("erpModifyDate", getErpModifyDate())
                .append("planDeliveryDate", getPlanDeliveryDate())
                .append("beginDate", getBeginDate())
                .append("endDate", getEndDate())
                .append("completeDate", getCompleteDate())
                .append("isFlag", getIsFlag())
                .append("remark", getRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
