package com.inkasso.factoring.settlement.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.inkasso.factoring.common.util.excel.ExcelCell;
import org.springframework.format.annotation.DateTimeFormat;

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

@TableName("c_settlement_goods_info")
public class SettlementGoodsInfo extends BaseGoods {
    /**
     * 结算单基础信息表ID
     */
    @TableField("c_settlement_basic_info_id")
    private Long settlementBasicInfoId;
    /**
     *
     * 验收单编号
     */
    @TableField("acceptance_goods_number")
    private String acceptanceGoodsNumber;
    /**
     * 销售单价
     */
    @ExcelCell(index = 9)
    @TableField("sales_price")
    private BigDecimal salesPrice;
    /***
     * 货物名称
     */
    @ExcelCell(index = 2)
    @TableField(exist = false)
    private String goodsName;
    /**
     * 型号
     */
    @ExcelCell(index = 4)
    @TableField(exist = false)
    private String goodsType;
    /**
     * 厂家
     */
    @ExcelCell(index = 3)
    @TableField(exist = false)
    private String goodsFactory;
    /**
     * 单位
     */
    @ExcelCell(index = 5)
    @TableField(exist = false)
    private String goodsUnit;
    /**
     * 数量
     */
    @ExcelCell(index = 6)
//    @TableField(exist = false)
    @TableField("goods_quantity")
    private BigDecimal goodsQuantity;
    /**
     * 验收日期
     */
    @ExcelCell(index = 1)
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @TableField(exist = false)
    private Date acceptanceDate;
    /**
     * 验收单号
     */
    @ExcelCell(index = 0)
    @TableField(exist = false)
    private String acceptanceNumber;
    /**
     * 对账开始时间
     */
    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd" )
    private Date settlementDateBegin;
    /**
     * 对账结束时间
     */
    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd" )
    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("reference_price")
    @ExcelCell(index = 7)
    private BigDecimal referencePrice;

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

    //价格计算方式
//    @TableField(exist = false)
//    private PurchContractPriceRule priceRule;

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

    public String getAcceptanceGoodsNumber() {
        return acceptanceGoodsNumber;
    }

    public void setAcceptanceGoodsNumber(String acceptanceGoodsNumber) {
        this.acceptanceGoodsNumber = acceptanceGoodsNumber;
    }
    //    public PurchContractPriceRule getPriceRule() {
//        return priceRule;
//    }
//
//    public void setPriceRule(PurchContractPriceRule priceRule) {
//        this.priceRule = priceRule;
//    }
}

