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 org.checkerframework.checker.units.qual.A;

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

/**
 * 批次号对象 biz_lot
 *
 * @author ezhizao
 * @date 2023-12-04
 */
@Data
@TableName(value = "biz_lot")
public class BizLot extends BaseEntity {
    /**
     * 批次号
     */
    @Excel(name = "批次号")
    @ApiModelProperty(value = "批次号")
    private String lotCode;

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

    /**
     * 计划单明细id
     */
    @ApiModelProperty(value = "计划单明细id")
    private Long productionPlanDetailId;

    /**
     * 工艺id
     */
    @ApiModelProperty(value = "工艺id")
    private Long technologicalProcessId;

    /**
     * 工艺版本
     */
    @ApiModelProperty(value = "工艺版本")
    private String technologyVersion;


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

    /**
     * 产品编码
     */
    @Excel(name = "产品编码")
    @ApiModelProperty(value = "产品编码")
    private String productCode;

    /**
     * 产品规格
     */
    @Excel(name = "产品规格")
    @ApiModelProperty(value = "产品规格")
    private String specification;

    /**
     * 产品图号
     */
    @Excel(name = "产品图号")
    @ApiModelProperty(value = "产品图号")
    private String drawingNumber;

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

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

    private String remark;

    // 是否尾批
    private Integer isLast;

    private Long isFallback;
    /**
     * 是否废品回收
     */
    private Long isWasteRecycling;

    /**
     * 是否批废（0：否；1：是）
     */
    @ApiModelProperty(value = "是否批废")
    private Integer isWaste;

    /**
     * 是否修改
     */
    @ApiModelProperty(value = "是否修改")
    private Integer isAmend;
    /**
     * 母批号
     */
    @TableField(exist = false)
    private String fromCode;
    private Long fromId;
    @TableField(exist = false)
    private Long deptId;


    @TableField(exist = false)
    private String productShaftCategoryName;

    // 炉号信息
    @TableField(exist = false)
    private BizFurnaceNoInfo furnaceNoInfo;

    //生产计划信息
    @TableField(exist = false)
    private BizProductionPlanDetail productionPlanDetail;

    //报工信息
    @TableField(exist = false)
    private BizDaywork daywork;

    //当前箱号
    @TableField(exist = false)
    private String carrierName;

    @TableField(exist = false)
    private List<BizTechnologicalProcessDetail> technologicalProcessDetailList;

    @TableField(exist = false)
    private String[] lotCodeList;
    //批废工序
//    @TableField(exist = false)
//    private List<BizTechnologicalWasteRecyclingDetail> processList;
    //领料部门id
    private Long requisitionDepartmentId;
    //领料部门名称
    private String requisitionDepartmentName;

    @TableField(exist = false)
    private String productionPlanNo;

    @TableField(exist = false)
    private Long  lineNumber;

    @TableField(exist = false)
    private List<BizLotTechnologicalProcessDetail> processList;

    @TableField(exist = false)
    @ApiModelProperty("下达日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date issueDate;

    @TableField(exist = false)
    @ApiModelProperty("当前工段")
    private String currentDept;

    @TableField(exist = false)
    @ApiModelProperty("当前工序投产量")
    private Integer prodNum;

    @TableField(exist = false)
    private List<BizLot> sparateList;
    @TableField(exist = false)
    private BizLotWaste lotWaste;

    // 当前关联载具
    @TableField(exist = false)
    private List<BizCarrier> carriers;
    // 合格数
    @TableField(exist = false)
    private Integer qualifiedNum;

    @TableField(exist = false)
    private String latestLotCode;

    @TableField(exist = false)
    private Integer lotNumber;

}
