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 io.swagger.models.auth.In;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;
import java.util.List;

/**
 * 外协单从对象 biz_outsourced_order_detail
 *
 * @author 庄德政
 * date    2024-04-26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "biz_return_receipt_detail")
public class BizReturnReceiptDetail extends BaseEntity
{
    private static final long serialVersionUID = 1L;

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

    /** 主表id */
    @Excel(name = "主表id")
    @ApiModelProperty(value = "主表id")
    private Long masterId;

    /** 单据号 */
    @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 = "外协明细id")
    private Long outsourceDetailId;

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

    /** 外协商名称 */
    @Excel(name = "外协商名称")
    @ApiModelProperty(value = "外协商名称")
    private String supplierName;

    /** 批次id */
    @ApiModelProperty(value = "带箱方式：0：原箱；1：新箱")
    private Long lotId;

    /** 批次号 */
    @Excel(name = "批次号")
    @ApiModelProperty(value = "批次号")
    private String lotCode;

    /** 报工主表id */
    @ApiModelProperty(value = "报工主表id")
    private Long dayworkId;

    /** 产品id */
    @ApiModelProperty(value = "产品id")
    private Long productId;

    /** 产品描述 */
    @Excel(name = "产品描述")
    @ApiModelProperty(value = "产品描述")
    private String productDescription;

    /** 产品数量 */
    @Excel(name = "产品数量")
    @ApiModelProperty(value = "产品数量")
    private Integer productNum;

    /** 产品数量 */
    @Excel(name = "产收回数量")
    @ApiModelProperty(value = "产收回数量")
    private Integer receiptNum;

    /** 外协工序名称字符串，以英文逗号分割 **/
    @TableField(exist = false)
    private String processNames;

    @TableField(exist = false)
    private String furnaceNumber;

    /** 原箱号，以英文“,”分割 */
    @Excel(name = "原箱号，以英文“,”分割")
    @ApiModelProperty(value = "原箱号，以英文“,”分割")
    private String originalCarrier;

    /** 原箱数 */
    @Excel(name = "原箱数")
    @ApiModelProperty(value = "原箱数")
    private Integer originalCarrierCount;

    /** 新箱号，以英文“,”分割 */
    @Excel(name = "新箱号，以英文“,”分割")
    @ApiModelProperty(value = "新箱号，以英文“,”分割")
    private String newCarrier;

    /** 新箱数 */
    @Excel(name = "新箱数")
    @ApiModelProperty(value = "新箱数")
    private Integer newCarrierCount;

    /** 对应的产品对应的工序明细 **/
    @TableField(exist = false)
    private List<BizOutsourcedOrderDetailProcess> processes;
    private Long technologicalProcessId;
    private String technologyVersion;
    private Long technologicalProcessDetailId;
    @TableField(exist = false)
    private Integer deliveryMethod;
    @TableField(exist = false)
    private Long packagingMethod;
    private Long processId;
    private String processAlias;
    private String processStepNumber;
    private String processCode;
    private Integer auditNum;
    private Integer isAudit;

    /** 打印 */
    //发出总数量 只在打印时用到
    @TableField(exist = false)
    private Integer sum;
    @ApiModelProperty("是否解绑")
    @TableField(exist = false)
    private Integer unbind;

}
