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

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dk.common.infrastructure.annotaiton.ExportTitle;
import com.dk.common.infrastructure.handler.JsonTypeHandler;
import com.dk.common.infrastructure.handler.TimestampTypeHandler;
import com.dk.common.infrastructure.handler.UuidTypeHandler;
import com.dk.common.model.pojo.PageInfo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 *  入库退货
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ExportTitle("入库退货")
public class IntoReturnResponse  {

    /*
     * 数据库字段
     */

    /**
     * 退货单ID
     */
    @ApiModelProperty(value = "退货单ID")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String returnId;


    /**
     * 退货单号
     */
    @Excel(name = "退货单号")
    @ApiModelProperty(value = "退货单号")
    private String returnNo;


    /**
     * 退货类型 (【系统字典】销售退货)
     */
    @Excel(name = "退货类型 (【系统字典】销售退货)")
    @ApiModelProperty(value = "退货类型 (【系统字典】销售退货)")
    private String returnType;





    /**
     * 采购订单
     */
    @ApiModelProperty(value = "采购订单")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String purId;


    /**
     * 入库单号
     */
    @Excel(name = "入库单号")
    @ApiModelProperty(value = "入库单号")
    private String intoNo;


    /**
     * 采购订单号
     */
    @Excel(name = "采购订单号")
    @ApiModelProperty(value = "采购订单号")
    private String purNo;


    /**
     * 部门
     */
    @ApiModelProperty(value = "部门")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String orgId;


    /**
     * 员工
     */
    @ApiModelProperty(value = "员工")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String staffId;


    /**
     * 供应商
     */
    @ApiModelProperty(value = "供应商")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String supId;


    /**
     * 联系人
     */
    @Excel(name = "联系人")
    @ApiModelProperty(value = "联系人")
    private String contactName;


    /**
     * 联系电话
     */
    @Excel(name = "联系电话")
    @ApiModelProperty(value = "联系电话")
    private String contactPhone;


    /**
     * 送货日期
     */
    @Excel(name = "送货日期")
    @ApiModelProperty(value = "送货日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @TableField(typeHandler = TimestampTypeHandler.class)
    private LocalDate deliveryDate;


    /**
     * 商品总数量
     */
    @Excel(name = "商品总数量")
    @ApiModelProperty(value = "商品总数量")
    private BigDecimal sumQuantity;


    /**
     * 标价合计
     */
    @Excel(name = "标价合计")
    @ApiModelProperty(value = "标价合计")
    private BigDecimal sumStandard;


    /**
     * 合计金额
     */
    @Excel(name = "合计金额")
    @ApiModelProperty(value = "合计金额")
    private BigDecimal sumAmount;


    /**
     * 销售折扣 (合计金额/标价合计)
     */
    @Excel(name = "销售折扣 (合计金额/标价合计)")
    @ApiModelProperty(value = "销售折扣 (合计金额/标价合计)")
    private BigDecimal saleDiscount;


    /**
     * 退货状态 (【系统字典】)
     */
    @ApiModelProperty(value = "退货状态 (【系统字典】)")
    private String returnStatus;


    /**
     * 出库状态 (【系统字典】)
     */
    @ApiModelProperty(value = "出库状态 (【系统字典】)")
    private String outStatus;


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


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


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


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


    /**
     * 应付金额
     */
    @Excel(name = "应付金额")
    @ApiModelProperty(value = "应付金额")
    private BigDecimal amtPayable;


    /**
     * 还款金额
     */
    @Excel(name = "还款金额")
    @ApiModelProperty(value = "还款金额")
    private BigDecimal amtHandle;


    /**
     * 剩余应付
     */
    @Excel(name = "剩余应付")
    @ApiModelProperty(value = "剩余应付")
    private BigDecimal amtResidue;


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


    /**
     * 附件 (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 annexPaths;


    /**
     * 制单员
     */
    @ApiModelProperty(value = "制单员")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String makeStaff;


    /**
     * 制单时间
     */
    @Excel(name = "制单时间")
    @ApiModelProperty(value = "制单时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(typeHandler = TimestampTypeHandler.class)
    private LocalDateTime makeTime;


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


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

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

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

    @Excel(name = "员工名称")
    @ApiModelProperty(value = "员工名称")
    private String staffName;

    @Excel(name = "员工编码")
    @ApiModelProperty(value = "员工编码")
    private String staffCode;

    @Excel(name = "部门名称")
    @ApiModelProperty(value = "部门名称")
    private String orgName;

    @Excel(name = "部门编码")
    @ApiModelProperty(value = "部门编码")
    private String orgCode;

    @Excel(name = "供应商地址")
    @ApiModelProperty(value = "供应商地址")
    private String returnAddress;

    @Excel(name = "出库状态")
    @ApiModelProperty(value = "出库状态")
    private String outStatusName;

    @Excel(name = "退货状态")
    @ApiModelProperty(value = "退货状态")
    private String returnStatusName;

    /**
     * 入库ID
     */
    @Excel(name = "入库ID")
    @ApiModelProperty(value = "入库ID")
    private String intoId;

    private static final long serialVersionUID = 1L;

}
