package com.jsh.erp.datasource.entities;

import com.jsh.erp.datasource.vo.UnitListVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

@Data
@Accessors(chain = true)
public class MaterialVo4Unit extends Material{


    private String unitName;

    private BigDecimal ratio;

    private String categoryName;

    private String materialOther;

    private BigDecimal stock;

    private BigDecimal purchaseDecimal;

    private BigDecimal commodityDecimal;

    private BigDecimal wholesaleDecimal;

    private BigDecimal lowDecimal;

    private BigDecimal billPrice;

    private String mBarCode;

    private String commodityUnit;

    private Long meId;

    private BigDecimal initialStock;

    private BigDecimal currentUnitPrice;

    private BigDecimal currentStock;

    private BigDecimal currentStockPrice;

    private BigDecimal currentStockMovePrice;

    private BigDecimal currentWeight;

    private String sku;

//    private Long depotId;

    /**
     * 换算为大单位的库存
     */
    private String bigUnitStock;

    /**
     * 换算为大单位的初始库存
     */
    private String bigUnitInitialStock;

    private String imgSmall;

    private String imgLarge;

    @ApiModelProperty("生产日期")
    private String productionDate;

    @ApiModelProperty("保质期天数")
    private Integer expiryNum;

    @ApiModelProperty("供应商id")
    private Long supplierId;

    @ApiModelProperty("商品条码")
    private String barCode;

    @ApiModelProperty("批次号")
    private String batchNumber;

    @ApiModelProperty("库存")
    private BigDecimal inventory;

    @ApiModelProperty("仓库id")
    private Long depotId;

    @ApiModelProperty("仓位货架")
    private String position;

    @ApiModelProperty("供应商名称")
    private String supplierName;

    @ApiModelProperty("仓库名称")
    private String depotName;

    @ApiModelProperty("实际出入库数量")
    private BigDecimal actualQuantityInStorage;

    @ApiModelProperty("出入库差异")
    private BigDecimal warehousingVariance;

    @ApiModelProperty("出入库差异原因")
    private String reasonOfDifference;

    @ApiModelProperty("出入库用户")
    private Long warehousingUser;

    @ApiModelProperty("出入库时间")
    private Date warehousingTime;

    @ApiModelProperty("多单位集合")
    private List<UnitListVo> unitList;

    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    public BigDecimal getRatio() {
        return ratio;
    }

    public void setRatio(BigDecimal ratio) {
        this.ratio = ratio;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public String getMaterialOther() {
        return materialOther;
    }

    public void setMaterialOther(String materialOther) {
        this.materialOther = materialOther;
    }

    public BigDecimal getStock() {
        return stock;
    }

    public void setStock(BigDecimal stock) {
        this.stock = stock;
    }

    public BigDecimal getPurchaseDecimal() {
        return purchaseDecimal;
    }

    public void setPurchaseDecimal(BigDecimal purchaseDecimal) {
        this.purchaseDecimal = purchaseDecimal;
    }

    public BigDecimal getCommodityDecimal() {
        return commodityDecimal;
    }

    public void setCommodityDecimal(BigDecimal commodityDecimal) {
        this.commodityDecimal = commodityDecimal;
    }

    public BigDecimal getWholesaleDecimal() {
        return wholesaleDecimal;
    }

    public void setWholesaleDecimal(BigDecimal wholesaleDecimal) {
        this.wholesaleDecimal = wholesaleDecimal;
    }

    public BigDecimal getLowDecimal() {
        return lowDecimal;
    }

    public void setLowDecimal(BigDecimal lowDecimal) {
        this.lowDecimal = lowDecimal;
    }

    public BigDecimal getBillPrice() {
        return billPrice;
    }

    public void setBillPrice(BigDecimal billPrice) {
        this.billPrice = billPrice;
    }

    public String getmBarCode() {
        return mBarCode;
    }

    public void setmBarCode(String mBarCode) {
        this.mBarCode = mBarCode;
    }

    public String getCommodityUnit() {
        return commodityUnit;
    }

    public void setCommodityUnit(String commodityUnit) {
        this.commodityUnit = commodityUnit;
    }

    public Long getMeId() {
        return meId;
    }

    public void setMeId(Long meId) {
        this.meId = meId;
    }

    public BigDecimal getInitialStock() {
        return initialStock;
    }

    public void setInitialStock(BigDecimal initialStock) {
        this.initialStock = initialStock;
    }

    public BigDecimal getCurrentUnitPrice() {
        return currentUnitPrice;
    }

    public void setCurrentUnitPrice(BigDecimal currentUnitPrice) {
        this.currentUnitPrice = currentUnitPrice;
    }

    public BigDecimal getCurrentStock() {
        return currentStock;
    }

    public void setCurrentStock(BigDecimal currentStock) {
        this.currentStock = currentStock;
    }

    public BigDecimal getCurrentStockPrice() {
        return currentStockPrice;
    }

    public void setCurrentStockPrice(BigDecimal currentStockPrice) {
        this.currentStockPrice = currentStockPrice;
    }

    public BigDecimal getCurrentStockMovePrice() {
        return currentStockMovePrice;
    }

    public void setCurrentStockMovePrice(BigDecimal currentStockMovePrice) {
        this.currentStockMovePrice = currentStockMovePrice;
    }

    public BigDecimal getCurrentWeight() {
        return currentWeight;
    }

    public void setCurrentWeight(BigDecimal currentWeight) {
        this.currentWeight = currentWeight;
    }

    public String getSku() {
        return sku;
    }

    public void setSku(String sku) {
        this.sku = sku;
    }

//    public Long getDepotId() {
//        return depotId;
//    }
//
//    public void setDepotId(Long depotId) {
//        this.depotId = depotId;
//    }

    public String getBigUnitStock() {
        return bigUnitStock;
    }

    public void setBigUnitStock(String bigUnitStock) {
        this.bigUnitStock = bigUnitStock;
    }

    public String getImgSmall() {
        return imgSmall;
    }

    public void setImgSmall(String imgSmall) {
        this.imgSmall = imgSmall;
    }

    public String getImgLarge() {
        return imgLarge;
    }

    public void setImgLarge(String imgLarge) {
        this.imgLarge = imgLarge;
    }

    public String getBigUnitInitialStock() {
        return bigUnitInitialStock;
    }

    public void setBigUnitInitialStock(String bigUnitInitialStock) {
        this.bigUnitInitialStock = bigUnitInitialStock;
    }

    public void setProductionDate(Date productionDate) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        String date = productionDate == null ? null : sdf.format(productionDate);
        this.productionDate = productionDate == null ? null : date;
    }
}