package cn.ezhizao.project.business.domain;

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

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


/**
 * 外协单从对象 biz_return_receipt_detail
 *
 * @author ezhizao
 * @date 2024-05-08
 */
@Data
@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
     */
    @ApiModelProperty(value = "${comment}")
    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 = "表单日期")
    private Long outsourceDetailId;

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

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

    /**
     * 批次id
     */
    @ApiModelProperty(value = "外协商名称")
    private Long lotId;

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

    /**
     * 对应的daywork表的id，是添加外协工序的时候，带过来的
     */
    @ApiModelProperty(value = "批次号")
    private Long dayworkId;

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

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

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

    /**
     * 收回数量（外协商填写，如果未填写，则为0）
     */
    @Excel(name = "收回数量", readConverterExp = "外=协商填写，如果未填写，则为0")
    @ApiModelProperty(value = "收回数量")
    private Integer receiptNum;

    /**
     * 收回的审核数量（由德迈仕填写，不允许0）
     */
    @Excel(name = "收回的审核数量", readConverterExp = "由=德迈仕填写，不允许0")
    @ApiModelProperty(value = "收回的审核数量")
    private Integer auditNum;

    /**
     * 原箱号，以英文“,”分割
     */
    @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 String processNames;
    @TableField(exist = false)
    private String startTime;
    @TableField(exist = false)
    private String endTime;
    @TableField(exist = false)
    private String productionDeptName;
    @TableField(exist = false)
    private List<BizCarrier> carriers;
    @TableField(exist = false)
    private Integer packagingMethod;
    @TableField(exist = false)
    private List<Long> carrierIds;
    @TableField(exist = false)
    private List<BizDayworkCarrier> dayworkCarrierList;
    private Long technologicalProcessId;
    private String technologyVersion;
    private Long technologicalProcessDetailId;
    private Long processId;
    private String processAlias;
    private String processStepNumber;
    private String processCode;
    private Integer status;
    @TableField(exist = false)
    private List<BizReturnReceiptDetail> detailList;
    @TableField(exist = false)
    private Integer alreadyAddFlag;
    private Integer isAudit;
    @TableField(exist = false)
    private Long productionDeptId;
    @TableField(exist = false)
    private List<BizProcessInspecion> processInspecionList;
    @TableField(exist = false)
    private Long productionPlanDetailId;
    @TableField(exist = false)
    private Long dayworkItemId;

    @ApiModelProperty("是否免检")
    private Integer isApproved;
    @ApiModelProperty("是否已结算")
    @TableField(exist = false)
    private Integer isCheckout;
    @ApiModelProperty("已结算前审核")
    @TableField(exist = false)
    private Integer isProvedForCheck;
    @ApiModelProperty("是否解绑")
    @TableField(exist = false)
    private Integer unbind;
    @TableField(exist = false)
    private String carrierNames;
    @TableField(exist = false)
    private List<BizCarrier>  newCarriers;

    public BizReturnReceiptDetail() {
    }
}
