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

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.dk.common.infrastructure.handler.StringListTypeHandler;
import com.dk.common.infrastructure.handler.TimestampTypeHandler;
import com.dk.common.infrastructure.handler.UuidListTypeHandler;
import com.dk.common.infrastructure.handler.UuidTypeHandler;
import com.dk.common.model.pojo.PageInfo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 *  入库单
 */
@Data
@Accessors(chain = true)
public class InboundQuery extends PageInfo<InboundQuery>{

    /*
     * 数据库字段
     */

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


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


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

    /**
     * 小程序的查询条件
     */
    @ApiModelProperty(value = "小程序的查询条件")
    private String searchText;

    /**
     * 入库类型-传入多个
     */
    @ApiModelProperty(value = "入库类型")
    @TableField(typeHandler = StringListTypeHandler.class)
    private List<String> intoTypes;

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


    /**
     * 来源单号
     */
    @ApiModelProperty(value = "来源单号")
    private String fromNo;


    /**
     * 部门
     */
    @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 cusId;


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


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





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


    /**
     * 制单时间
     */
    @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
     */
    @ApiModelProperty(value = "企业ID")
    private Integer cpId;





    /*
     * 相关属性
     * @TableField(exist = false)
     */

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


    @ApiModelProperty(value = "客户电话")
    private String cusPhone;

    @ApiModelProperty(value = "客户名称")
    private String cusName;

    @ApiModelProperty(value = "业务部门")
    private String orgName;

    @ApiModelProperty(value = "供应商")
    private String supName;

    @ApiModelProperty(value = "业务员")
    private String staffName;

    @ApiModelProperty(value = "部门List")
    private List<String> orgIdList;

    @ApiModelProperty(value = "业务员List")
    private List<String> staffIdList;

    @ApiModelProperty(value = "入库状态List")
    private List<String> intoStatusList;

    @ApiModelProperty(value = "入库原因List")
    @TableField(typeHandler = UuidListTypeHandler.class)
    private List<String> intoReasonList;


    @ApiModelProperty(value = "入库时间开始")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate makeTimeStart;

    @ApiModelProperty(value = "入库时间结束")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate makeTimeEnd;

    @ApiModelProperty(value = "入库时间开始")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate intoDateStart;

    @ApiModelProperty(value = "入库时间结束")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate intoDateEnd;

    /**
     * 收货仓库
     */
    @Excel(name = "仓库")
    @ApiModelProperty(value = "收货仓库")
    private String whName;
    /**
     * 商品型号
     */
    @Excel(name = "商品型号")
    @ApiModelProperty(value = "商品型号")
    private String skuModel;

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

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


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




    private static final long serialVersionUID = 1L;

}
