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.FieldFill;
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 java.util.Date;
import java.util.List;

/**
 * 废品原因对象 biz_daywork_item_reject
 *
 * @author ezhizao
 * @date 2023-12-28
 */
@Data
@TableName(value = "biz_daywork_item_reject")
public class BizDayworkItemReject extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 用户id */
    @ApiModelProperty(value = "${comment}")
    private Long userId;

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

    /** daywork的id */
    @ApiModelProperty(value = "${comment}")
    private Long dayworkId;

    /** 计划单id */
    @ApiModelProperty(value = "${comment}")
    private Long productionPlanId;

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

    /** 子计划id */
    @ApiModelProperty(value = "${comment}")
    private Long productionPlanDetailSubDetailId;

    /** 子计划工序对应的设备id？？？？？？？？？ */
    @ApiModelProperty(value = "${comment}")
    private Long productionPlanDetailSubDetailEquipmentId;

    /** 批次号 */
    @ApiModelProperty(value = "${comment}")
    private Long lotId;

    /** 报工明细id */
    @ApiModelProperty(value = "${comment}")
    private Long dayworkItemId;

    /** 废品原因 */
    @ApiModelProperty(value = "废品原因")
    private String reason;

    /** 废品数 */
    @ApiModelProperty(value = "废品数")
    private Long rejectNum;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value="create_time",fill= FieldFill.INSERT)
    @Excel(name = "废品提交时间",dateFormat = "yyyy-MM-dd",sort = 6)
    private Date createTime;

    @TableField(exist = false)
    private String remark;
    private Long deptId;
    @Excel(name = "工段",sort = 5)
    @TableField(exist = false)
    private String deptName;
    @Excel(name = "批次号",sort = 1)
    @TableField(exist = false)
    private String lotCode;
    @Excel(name = "产品描述",sort = 2)
    @TableField(exist = false)
    private String productDescription;
    @Excel(name = "废品数",sort = 4)
    @TableField(exist = false)
    private Integer totalRejectNum;
    @TableField(exist = false)
    private String startTime;
    @TableField(exist = false)
    private String endTime;
    @TableField(exist = false)
    private String nickName;
    @TableField(exist = false)
    private String processAlias;
    private Long processId;
    @Excel(name = "工艺版本",sort = 3)
    @TableField(exist = false)
    private String technologyVersion;
    private String checkStandard;
    private String checkResult;
    private Integer type;
    private Long inspectionInstructionId;
    @TableField(exist = false)
    private List<BizDayworkItemReject> sortCheckList;
    @TableField(exist = false)
    private String specification;
    @TableField(exist = false)
    private Integer lineNumber;
    @TableField(exist = false)
    private String date;
    @TableField(exist = false)
    private List<BizDayworkItemReject> checkStandardList;
    @TableField(exist = false)
    private List<Long> lotIds;
    //分选量
    @TableField(exist = false)
    private Integer firstSortProd;
    //实际量
    @TableField(exist = false)
    private Integer actualQuantity;
    //不明量
    @TableField(exist = false)
    private Integer unknownQuantity;
    //不良率
    @TableField(exist = false)
    private Float rejectRate;
    //不明率
    @TableField(exist = false)
    private Float unknownRate;
    //批次率
    @TableField(exist = false)
    private Float lotRate;

    private Long dayworkAuxiliaryItemId;

    private Long dayworkAuxiliaryItemRejectId;

}
