package cn.ezhizao.project.business.domain;

import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
import cn.ezhizao.framework.web.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

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

/**
 * 外协单主
带箱方式，是整单的。如果换新箱子，明细中，都需要更换箱子对象 biz_outsourced_order
 *
 * @author 庄德政
 * date    2024-04-26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "biz_return_receipt")
public class BizReturnReceipt extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 租户（厂别）id */
    @ApiModelProperty(value = "${comment}")
    private Long tenantId;

    /** 单据号 */
    @Excel(name = "单据号")
    @ApiModelProperty(value = "单据号")
    private String formCode;

    /** 表单日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "表单日期", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "表单日期")
    private Date formDate;

    /** 外协商id */
    @ApiModelProperty(value = "表单日期")
    private Long supplierId;

    /** 外协商名称 */
    @Excel(name = "外协商名称")
    @ApiModelProperty(value = "外协商名称")
    private String supplierName;
    /** 收回类型 */
    @ApiModelProperty(value = "收回类型 0 - 默认 1 - 内部外协收回")
    private Integer category;
    /** 对应的收回明细 **/
    @TableField(exist = false)
    private List<BizReturnReceiptDetail> details;
    @TableField(exist = false)
    private List<BizReturnReceiptDetail> detailInfo;

    /** 前端查询用 开始日期 **/
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(exist = false)
    private Date formStartDate;

    /** 前端查询用 结束日期 **/
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(exist = false)
    private Date formEndDate;
    @TableField(exist = false)
    private String startTime;
    @TableField(exist = false)
    private String endTime;

    private Integer status;

    /** 打印使用 */
    @TableField(exist = false)
    private String supplierCode;
    private Integer isSubmit;
    @TableField(exist = false)
    private Integer isAudit;

    @TableField(exist = false)
    private List<List<BizReturnReceiptDetail>> detailLists;
    @TableField(exist = false)
    private String stringDate;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date submitTime;

}
