package com.dk.mdm.model.response.ivt;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.annotation.TableField;
import com.dk.common.infrastructure.annotaiton.ExportTitle;
import com.dk.common.infrastructure.handler.JsonTypeHandler;
import com.dk.common.infrastructure.handler.UuidTypeHandler;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
 *  入库明细
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ExportTitle("入库明细")
public class InboundItemResponse  {

    /*
     * 数据库字段
     */

    /**
     * 明细ID
     */
    @ApiModelProperty(value = "明细ID")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String itemId;

    /**
     * 采购价
     */
    @Excel(name = "采购价")
    @ApiModelProperty(value = "采购价")
    private BigDecimal pricePurchase;
    /**
     * 商品图片 (index（显示顺序）、name（文件名）、path（路径）、type（类型）、time（上传时间）...)
     */
    @Excel(name = "商品图片 (index（显示顺序）、name（文件名）、path（路径）、type（类型）、time（上传时间）...)")
    @ApiModelProperty(value = "商品图片 (index（显示顺序）、name（文件名）、path（路径）、type（类型）、time（上传时间）...)")
    @TableField(typeHandler = JsonTypeHandler.class)
    private JSONArray skuImages;


    /**
     * 入库ID
     */
    @ApiModelProperty(value = "入库ID")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String intoId;

    /**
     * 采购订单
     */
    @ApiModelProperty(value = "采购订单")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String purId;
    /**
     * 采购订单号
     */
    @ApiModelProperty(value = "采购订单号")
    private String purNo;
    /**
     * 商品规格
     */
    @Excel(name = "商品规格")
    @ApiModelProperty(value = "商品规格")
    private String skuSpec;


    /**
     * 入库类型 (【系统字典】采购入库、销退入库、其他入库)
     */
    @Excel(name = "入库类型 (【系统字典】采购入库、销退入库、其他入库)")
    @ApiModelProperty(value = "入库类型 (【系统字典】采购入库、销退入库、其他入库)")
    private String intoType;


    /**
     * 来源单ID (采购订单、出库退货)
     */
    @ApiModelProperty(value = "来源单ID (采购订单、出库退货)")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String fromId;


    /**
     * 来源单明细ID (采购订单、出库退货)
     */
    @ApiModelProperty(value = "来源单明细ID (采购订单、出库退货)")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String fromItemId;


    /**
     * 商品顺序
     */
    @Excel(name = "商品顺序")
    @ApiModelProperty(value = "商品顺序")
    private Integer itemIndex;


    /**
     * 商品ID
     */
    @ApiModelProperty(value = "商品ID")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String skuId;


    /**
     * 入库价
     */
    @Excel(name = "入库价")
    @ApiModelProperty(value = "入库价")
    private BigDecimal priceInto;


    /**
     * 非标号
     */
    @Excel(name = "非标号")
    @ApiModelProperty(value = "非标号")
    private String nonStdCode;


    /**
     * 入库状态 (【系统字典】)
     */
    @Excel(name = "入库状态 (【系统字典】)")
    @ApiModelProperty(value = "入库状态 (【系统字典】)")
    private String intoStatus;


    /**
     * 入库中数量
     */
    @Excel(name = "入库中数量")
    @ApiModelProperty(value = "入库中数量")
    private BigDecimal intoingQty;

    /**
     * 入库明细 对应来源订单明细中的商品数量
     */
    @Excel(name = "入库明细 对应来源订单明细中的商品数量")
    @ApiModelProperty(value = "入库明细 对应来源订单明细中的商品数量")
    private BigDecimal purItemQty;

    /**
     * 入库明细 对应来源订单明细中的商品数量
     */
    @Excel(name = "入库明细 对应来源订单明细中的入库中数量")
    @ApiModelProperty(value = "入库明细 对应来源订单明细中的入库中数量")
    private BigDecimal purItemIntoingQty;

    /**
     * 入库明细 对应来源订单明细中的商品数量
     */
    @Excel(name = "入库明细 对应来源订单明细中的已入库数量")
    @ApiModelProperty(value = "入库明细 对应来源订单明细中的已入库数量")
    private BigDecimal purItemIntoQty;

    /**
     * 入库中金额
     */
    @Excel(name = "入库中金额")
    @ApiModelProperty(value = "入库中金额")
    private BigDecimal intoingAmt;


    /**
     * 已入库数量
     */
    @Excel(name = "已入库数量")
    @ApiModelProperty(value = "已入库数量")
    private BigDecimal intoQty;


    /**
     * 已入库金额
     */
    @Excel(name = "已入库金额")
    @ApiModelProperty(value = "已入库金额")
    private BigDecimal intoAmt;


    /**
     * 已入库退货数量
     */
    @Excel(name = "已入库退货数量")
    @ApiModelProperty(value = "已入库退货数量")
    private BigDecimal returnQty;


    /**
     * 已入库退货金额
     */
    @Excel(name = "已入库退货金额")
    @ApiModelProperty(value = "已入库退货金额")
    private BigDecimal returnAmt;


    /**
     * 备注
     */
    @Excel(name = "备注")
    @ApiModelProperty(value = "备注")
    private String remarks;


    /**
     * 库存ID
     */
    @ApiModelProperty(value = "库存ID")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String invId;


    /**
     * 入库核对单价
     */
    @Excel(name = "入库核对单价")
    @ApiModelProperty(value = "入库核对单价")
    private BigDecimal costPrice;


    /**
     * 入库核对金额
     */
    @Excel(name = "入库核对金额")
    @ApiModelProperty(value = "入库核对金额")
    private BigDecimal costAmt;


    /**
     * 出库数量
     */
    @Excel(name = "出库数量")
    @ApiModelProperty(value = "出库数量")
    private BigDecimal outQty;


    /**
     * 库存数量 (库存数量=商品数量-出库数量)
     */
    @Excel(name = "库存数量 (库存数量=商品数量-出库数量)")
    @ApiModelProperty(value = "库存数量 (库存数量=商品数量-出库数量)")
    private BigDecimal invQty;


    /**
     * 有效标识 (1：正常 0：停用)
     */
    @Excel(name = "有效标识 (1：正常 0：停用)")
    @ApiModelProperty(value = "有效标识 (1：正常 0：停用)")
    private Boolean flgValid;


    /**
     * 企业ID
     */
    @ApiModelProperty(value = "企业ID")
    private Integer cpId;

    @ApiModelProperty(value = "源入库单ID")
    @JsonProperty(value = "sIntoId")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String sIntoId;

    @ApiModelProperty(value = "源入库单明细ID")
    @JsonProperty(value = "sIntoItemId")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String sIntoItemId;

    @ApiModelProperty(value = "源采购订单ID")
    @JsonProperty(value = "sPurId")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String sPurId;

    @ApiModelProperty(value = "源采购明细ID")
    @JsonProperty(value = "sPurItemId")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String sPurItemId;
    /**
     * 商品编号
     */
    @Excel(name = "商品编号")
    @ApiModelProperty(value = "商品编号")
    private String skuCode;

    /**
     * 商品名称
     */
    @Excel(name = "商品名称")
    @ApiModelProperty(value = "商品名称")
    private String skuName;

    /**
     * 商品型号
     */
    @Excel(name = "商品型号")
    @ApiModelProperty(value = "商品型号")
    private String skuModel;


    /**
     * 商品型号
     */
    @Excel(name = "商品品牌名称")
    @ApiModelProperty(value = "商品品牌名称")
    private String brandName;

    /**
     * 商品型号
     */
    @Excel(name = "品牌简称")
    @ApiModelProperty(value = "商品品牌简称")
    private String shortName;
    /*
     * 相关属性
     * @TableField(exist = false)
     */

    /*
     * 关联属性 + 查询条件
     * @TableField(exist = false)
     */

    /**
     * 仓库ID
     */
    @ApiModelProperty(value = "仓库ID")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String whId;


    /**
     * 仓库编号
     */
    @Excel(name = "仓库编号")
    @ApiModelProperty(value = "仓库编号")
    private String whCode;


    /**
     * 仓库名称
     */
    @Excel(name = "仓库名称")
    @ApiModelProperty(value = "仓库名称")
    private String whName;



    @ApiModelProperty(value = "库存类型（入库，出库）")
    private String inventoryType;

    @ApiModelProperty(value = "库存业务类型（入库4种，出库4中）")
    private String inventoryDocCode;


    @ApiModelProperty(value = "源入库单明细入库中数量")
    private BigDecimal sIntoItemIntoingQty;

    @ApiModelProperty(value = "源入库单明细入库中金额")
    private BigDecimal sIntoItemIntoingAmt;

    @ApiModelProperty(value = "源入库单明细入库数量")
    private BigDecimal sIntoItemIntoQty;

    @ApiModelProperty(value = "源入库单明细入库金额")
    private BigDecimal sIntoItemIntoAmt;

    @ApiModelProperty(value = "源入库单明细已入库退货数量")
    private BigDecimal sIntoItemReturnQty;

    @ApiModelProperty(value = "源入库单明细已入库退货金额")
    private BigDecimal sIntoItemReturnAmt;


    @ApiModelProperty(value = "源采购单明细入库中数量")
    private BigDecimal sPurItemIntoingQty;

    @ApiModelProperty(value = "源采购单明细入库中金额")
    private BigDecimal sPurItemIntoingAmt;

    @ApiModelProperty(value = "源采购单明细入库数量")
    private BigDecimal sPurItemIntoQty;

    @ApiModelProperty(value = "源采购单明细入库金额")
    private BigDecimal sPurItemIntoAmt;

    @ApiModelProperty(value = "源采购单明细已入库退货数量")
    private BigDecimal sPurItemReturnQty;

    @ApiModelProperty(value = "源采购单明细已入库退货金额")
    private BigDecimal sPurItemReturnAmt;

    @ApiModelProperty(value = "可售量")
    private BigDecimal usableQty;

    @ApiModelProperty(value = "新建编辑标识true:新建,false:编辑")
    private Boolean addOrEditFlag;
    /**
     * 入库单号
     */
    @Excel(name = "入库单号")
    @ApiModelProperty(value = "入库单号")
    private String intoNo;

    /**
     * 供应商编号
     */
    @Excel(name = "供应商编号")
    @ApiModelProperty(value = "供应商编号")
    private String supCode;


    /**
     * 供应商名称
     */
    @Excel(name = "供应商名称")
    @ApiModelProperty(value = "供应商名称")
    private String supName;



    private static final long serialVersionUID = 1L;

}
