package com.sunxung.factoring.entity.settlement;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.sunxung.factoring.entity.acceptance.BaseGoods;
import com.sunxung.factoring.entity.customerinformation.Customer;
import com.sunxung.factoring.entity.purchcontractmanagement.PurchContractPriceRule;

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

/**
 * 结算单货物管理
 *
 * @author liutao
 * @date 2021.09.22
 */
@TableName("c_settlement_goods_info")
public class SettlementGoodsInfo extends BaseGoods {
    /**
     * 结算单基础信息表ID
     */
    @TableField("c_settlement_basic_info_id")
    private Long settlementBasicInfoId;
    /**
     * 销售单价
     */
    @TableField("sales_price")
    private BigDecimal salesPrice;
    /***
     * 货物名称
     */
    @TableField(exist = false)
    private String goodsName;
    /**
     * 型号
     */
    @TableField(exist = false)
    private String goodsType;
    /**
     * 厂家
     */
    @TableField(exist = false)
    private String goodsFactory;
    /**
     * 单位
     */
    @TableField(exist = false)
    private String goodsUnit;
    /**
     * 数量
     */
    @TableField("goods_quantity")
    private BigDecimal goodsQuantity;
    /**
     * 验收日期
     */
    @JsonFormat(pattern="yyyy-MM-dd")
    @TableField(exist = false)
    private Date acceptanceDate;
    /**
     * 验收单号
     */
    @TableField(exist = false)
    private String acceptanceNumber;
    /**
     * 对账开始时间
     */
    @TableField(exist = false)
    private Date settlementDateBegin;
    /**
     * 对账结束时间
     */
    @TableField(exist = false)
    private Date settlementDateEnd;
    /**
     * 供应商
     */
    @TableField(exist = false)
    private Customer customer;

    /**
     * 销售质保金比例
     **/
    @TableField(exist = false)
    private BigDecimal salesRetentionPercent;

    /**
     * 销售质保金比例
     **/
    @TableField(exist = false)
    private BigDecimal purchRetentionPercent;

    @TableField(exist = false)
    private Boolean isClear;

    //价格计算方式
    @TableField(exist = false)
    private PurchContractPriceRule priceRule;
    /**
     * 参考价格
     */
    @TableField("reference_price")
    private BigDecimal referencePrice;

    /**
     * 浮动价格
     */
    @TableField("floating_price")
    private BigDecimal floatingPrice;

    public SettlementGoodsInfo() {
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public String getGoodsType() {
        return goodsType;
    }

    public void setGoodsType(String goodsType) {
        this.goodsType = goodsType;
    }

    public String getGoodsFactory() {
        return goodsFactory;
    }

    public void setGoodsFactory(String goodsFactory) {
        this.goodsFactory = goodsFactory;
    }

    public String getGoodsUnit() {
        return goodsUnit;
    }

    public void setGoodsUnit(String goodsUnit) {
        this.goodsUnit = goodsUnit;
    }

    public BigDecimal getGoodsQuantity() {
        return goodsQuantity;
    }

    public void setGoodsQuantity(BigDecimal goodsQuantity) {
        this.goodsQuantity = goodsQuantity;
    }

    public Date getAcceptanceDate() {
        return acceptanceDate;
    }

    public void setAcceptanceDate(Date acceptanceDate) {
        this.acceptanceDate = acceptanceDate;
    }

    public String getAcceptanceNumber() {
        return acceptanceNumber;
    }

    public void setAcceptanceNumber(String acceptanceNumber) {
        this.acceptanceNumber = acceptanceNumber;
    }

    public Long getSettlementBasicInfoId() {
        return settlementBasicInfoId;
    }

    public void setSettlementBasicInfoId(Long settlementBasicInfoId) {
        this.settlementBasicInfoId = settlementBasicInfoId;
    }

    public BigDecimal getSalesPrice() {
        return salesPrice;
    }

    public void setSalesPrice(BigDecimal salesPrice) {
        this.salesPrice = salesPrice;
    }

    public Date getSettlementDateBegin() {
        return settlementDateBegin;
    }

    public void setSettlementDateBegin(Date settlementDateBegin) {
        this.settlementDateBegin = settlementDateBegin;
    }

    public Date getSettlementDateEnd() {
        return settlementDateEnd;
    }

    public void setSettlementDateEnd(Date settlementDateEnd) {
        this.settlementDateEnd = settlementDateEnd;
    }

    public Customer getCustomer() {
        return customer;
    }

    public void setCustomer(Customer customer) {
        this.customer = customer;
    }

    public BigDecimal getSalesRetentionPercent() {
        return salesRetentionPercent;
    }

    public void setSalesRetentionPercent(BigDecimal salesRetentionPercent) {
        this.salesRetentionPercent = salesRetentionPercent;
    }

    public BigDecimal getPurchRetentionPercent() {
        return purchRetentionPercent;
    }

    public void setPurchRetentionPercent(BigDecimal purchRetentionPercent) {
        this.purchRetentionPercent = purchRetentionPercent;
    }

    public Boolean getClear() {
        return isClear;
    }

    public void setClear(Boolean clear) {
        isClear = clear;
    }

    public PurchContractPriceRule getPriceRule() {
        return priceRule;
    }

    public void setPriceRule(PurchContractPriceRule priceRule) {
        this.priceRule = priceRule;
    }

    public BigDecimal getReferencePrice() {
        return referencePrice;
    }

    public void setReferencePrice(BigDecimal referencePrice) {
        this.referencePrice = referencePrice;
    }

    public BigDecimal getFloatingPrice() {
        return floatingPrice;
    }

    public void setFloatingPrice(BigDecimal floatingPrice) {
        this.floatingPrice = floatingPrice;
    }
}
