package com.sunxung.factoring.entity.acceptance;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.sunxung.factoring.component.util.excel.ExcelCell;
import com.sunxung.factoring.entity.BaseEntity;
import com.sunxung.factoring.entity.steelwaiter.SellBillItem;

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

/**
 * 验收单管理货物
 *
 * @author liutao
 * @date 2021.9.10
 */
@TableName("c_acceptance_goods_info")
public class AcceptanceGoodsInfo extends BaseEntity {

    /**
     * 验收单编号
     */
    @TableField("acceptance_goods_number")
    private String acceptanceGoodsNumber;
    /***
     * 货物名称
     */
    @ExcelCell(index = 0)
    @TableField("goods_name")
    private String goodsName;
    /***
     * 货物材质
     */
    @ExcelCell(index = 1)
    @TableField("goods_material")
    private String goodsMaterial;
    /**
     * 型号
     */
    @ExcelCell(index = 2)
    @TableField("goods_type")
    private String goodsType;
    /**
     * 厂家
     */
    @ExcelCell(index = 3)
    @TableField("goods_factory")
    private String goodsFactory;
    /**
     * 单位
     */
    @ExcelCell(index = 4)
    @TableField("goods_unit")
    private String goodsUnit;
    /**
     * 数量
     */
    @ExcelCell(index = 5)
    @TableField("goods_quantity")
    private BigDecimal goodsQuantity;
    /**
     * 验收日期
     */
    @ExcelCell(index = 7)
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField("acceptance_date")
    private Date acceptanceDate;
    /**
     * 验收单基础信息表id
     */
    @TableField("c_acceptance_basic_info_id")
    private Long acceptanceBasicInfoId;
    /**
     * 销售单价
     */
    @TableField("sales_price")
    @ExcelCell(index = 6, defaultValue = "")
    private BigDecimal salesPrice;


    /**
     * 参考价格
     */
    @TableField("reference_price")
    private BigDecimal referencePrice;

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



    @TableField(exist = false)
    private String salesPriceStr;
    /**
     * 销售总价
     */
    @TableField(exist = false)
    private BigDecimal salesTotalPrice;
    /**
     * 销售质保金
     */
    @TableField(exist = false)
    private BigDecimal salesGuaranteeMoney;
    /**
     * 采购单价
     */
    @TableField(exist = false)
    private BigDecimal purchasePrice;
    /**
     * 采购总价
     */
    @TableField(exist = false)
    private BigDecimal purchaseTotalPrice;
    /**
     * 采购质保金
     */
    @TableField(exist = false)
    private BigDecimal purchGuaranteeMoney;

    @TableField(exist = false)
    private Long settlementBasicInfoId;

    public Long getSettlementBasicInfoId() {
        return settlementBasicInfoId;
    }

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

    public AcceptanceGoodsInfo() {
    }

    public AcceptanceGoodsInfo(SellBillItem sellBillItem) {
        this.goodsName = sellBillItem.getProductName();
        this.goodsMaterial = sellBillItem.getMaterialName();
        this.goodsType = sellBillItem.getSpecificationName();
        this.goodsFactory = sellBillItem.getOriginName();
        this.goodsUnit = sellBillItem.getUnitText();
        this.goodsQuantity = sellBillItem.getAuditQuantity();
        this.salesPrice = sellBillItem.getAuditPrice();
    }



    public String getGoodsName() {
        return goodsName;
    }

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

    public String getGoodsMaterial() {
        return goodsMaterial;
    }

    public void setGoodsMaterial(String goodsMaterial) {
        this.goodsMaterial = goodsMaterial;
    }

    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 Long getAcceptanceBasicInfoId() {
        return acceptanceBasicInfoId;
    }

    public void setAcceptanceBasicInfoId(Long acceptanceBasicInfoId) {
        this.acceptanceBasicInfoId = acceptanceBasicInfoId;
    }

    public BigDecimal getSalesPrice() {
        return salesPrice;
    }

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

    public BigDecimal getSalesTotalPrice() {
        return salesTotalPrice;
    }

    public void setSalesTotalPrice(BigDecimal salesTotalPrice) {
        this.salesTotalPrice = salesTotalPrice;
    }

    public BigDecimal getSalesGuaranteeMoney() {
        return salesGuaranteeMoney;
    }

    public void setSalesGuaranteeMoney(BigDecimal salesGuaranteeMoney) {
        this.salesGuaranteeMoney = salesGuaranteeMoney;
    }

    public BigDecimal getPurchasePrice() {
        return purchasePrice;
    }

    public void setPurchasePrice(BigDecimal purchasePrice) {
        this.purchasePrice = purchasePrice;
    }

    public BigDecimal getPurchaseTotalPrice() {
        return purchaseTotalPrice;
    }

    public void setPurchaseTotalPrice(BigDecimal purchaseTotalPrice) {
        this.purchaseTotalPrice = purchaseTotalPrice;
    }

    public BigDecimal getPurchGuaranteeMoney() {
        return purchGuaranteeMoney;
    }

    public void setPurchGuaranteeMoney(BigDecimal purchGuaranteeMoney) {
        this.purchGuaranteeMoney = purchGuaranteeMoney;
    }

    public String getSalesPriceStr() {
        return salesPriceStr;
    }

    public void setSalesPriceStr(String salesPriceStr) {
        this.salesPriceStr = salesPriceStr;
    }


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