package com.yh.saas.plugin.yiliangyiyun.entity;

import java.util.Date;
import com.baomidou.mybatisplus.activerecord.Model;
import java.io.Serializable;
import java.util.List;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.annotations.Version;

import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yh.saas.common.support.entity.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 代收入库记录
 * </p>
 *
 * @author Gdc
 * @since 2022-01-12
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("collection_warehousing_record")
public class CollectionWarehousingRecord extends BaseModel<CollectionWarehousingRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(type = IdType.UUID)
    private String id;
    /**
     * 关联id
     */
    private String relationId;
    /**
     * 公司id
     */
    private String compId;
    /**
     * 类型
     */
    private String type;
    /**
     * 合同编号
     */
    private String contractNo;
    /**
     * 编号
     */
    private String paymentNo;
    /**
     * 客户
     */
    private String customerName;
    /**
     * identityId
     */
    private String identityId;
    /**
     * 身份证号
     */
    private String customerNumberCard;
    /**
     * 手机号
     */
    private String customerPhone;
    /**
     * 公司地址
     */
    private String compAddress;
    /**
     * 车牌号
     */
    private String carNo;
    /**
     * 品级
     */
    private String grade;
    /**
     * 货名
     */
    private String goodsName;
    /**
     * 净重（公斤）
     */
    private Float netWeight;
    /**
     * 应付金额
     */
    private Double amountIngPayable;
    /**
     * 已收金额
     */
    private Double amountEdCollectionable;
    /**
     * 应收金额
     */
    private Double amountNotCollectable;
    /**
     * 已付金额
     */
    private Double amountEdPayable;
    /**
     * 未付金额
     */
    private Double amountNotPayable;
    /**
     * 收款截图
     */
    private String collectionScreenshot;
    /**
     * 付款截图
     */
    private String paymentScreenshot;
    /**
     * 收款日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date collectionDate;
    /**
     * 付款日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date paymentDate;
    /**
     * 结算时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date settlementDate;
    /**
     * 入库时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date inDate;
    /**
     * 是否开自采票(0未开1已开)
     */
    private String invoicing;
    /**
     * 自采开票时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date invoicingDate;
    /**
     * 是否开销售票(0未开1已开)
     */
    private String invoicingSale;
    /**
     * 销售单价
     */
    private Double unitDeduction;
    /**
     * 收购单价
     */
    private Double unitHave;
    /**
     * 图片地址
     */
    private String pictureAddress;
    /**
     * 状态标识
     */
    private String statusFlag;
    /**
     * 状态
     */
    private String status;
    /**
     * 状态英文
     */
    private String statusEn;
    /**
     * 审核状态
     */
    private String approveStatus;
    /**
     * 审核流id
     */
    private String workflowId;
    @TableField(exist = false)
    private String taskId;
    /**
     *查询类型
     */
    @TableField(exist = false)
    private String searchType;
    /**
     * 模糊查询
     */
    @TableField(exist = false)
    private String searchKeyWord;
    /**
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @TableField(exist = false)
    private Date startDate;
    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @TableField(exist = false)
    private Date endDate;
    /**
     * 导入
     */
    @TableField(exist = false)
    private List<CollectionWarehousingRecord> excelList;
    /**
     * 批量
     */
    @TableField(exist = false)
    private List<CollectionWarehousingRecord> collectionWarehousingRecordList;
    @TableField(exist = false)
    private IdentityAuthenticationInfo identityAuthenticationInfo;
    /**
     *开票标识1开自采发票2开销售发票
     */
    @TableField(exist = false)
    private String flag;
    /**
     *付款金额/收款金额
     */
    @TableField(exist = false)
    private Double money;
    /**
     *累计送粮量
     */
    @TableField(exist = false)
    private Double num;
    /**
     * 代收费
     */
    @TableField(exist = false)
    private Double agencyCharge;
    /**
     * 买方
     */
    @TableField(exist = false)
    private String buyer;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
