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_daywork_auxiliary_item
 *
 * @author ezhizao
 * @date 2024-08-20
 */
@Data
@TableName(value = "biz_daywork_auxiliary_item")
public class BizDayworkAuxiliaryItem extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 报工外键
     */
    @ApiModelProperty(value = "${comment}")
    private Long dayworkId;

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

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

    /**
     * 计划单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（通过工艺id，获取版本号）
     */
    @ApiModelProperty(value = "${comment}")
    private Long technologicalProcessId;

    /**
     * 工艺版本明细id
     */
    @ApiModelProperty(value = "${comment}")
    private Long technologicalProcessDetailId;

    /**
     * 工序id
     */
    @ApiModelProperty(value = "${comment}")
    private Long processId;

    /**
     * 工段id（状态为：0、1、2、3时，dept_id,是当前工段，其它是下一工段id）
     */
    @ApiModelProperty(value = "${comment}")
    private Long deptId;

    /**
     * 工段名称
     */
    @Excel(name = "工段名称")
    @ApiModelProperty(value = "工段名称")
    private String deptName;

    /**
     * 生产状态 0:未开始, 1: 生产中, 2: 报工结束 ,3: 工序已完成, 4: 待周转，5: 周转中，6: 已送达，7：已接收
     */
    @Excel(name = "生产状态 0:未开始, 1: 生产中, 2: 报工结束 ,3: 工序已完成, 4: 待周转，5: 周转中，6: 已送达，7：已接收")
    @ApiModelProperty(value = "生产状态 0:未开始, 1: 生产中, 2: 报工结束 ,3: 工序已完成, 4: 待周转，5: 周转中，6: 已送达，7：已接收")
    private String status;

    /**
     * 员工编码
     */
    @Excel(name = "员工编码")
    @ApiModelProperty(value = "员工编码")
    private String userName;

    /**
     * 员工姓名
     */
    @Excel(name = "员工姓名")
    @ApiModelProperty(value = "员工姓名")
    private String nickName;

    /**
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "开始时间")
    private Date startTime;

    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "结束时间")
    private Date endTime;

    @ApiModelProperty(value = "报公工时")
    private Long workingHours;

    @ApiModelProperty("辅助工序外键")
    private Long auxiliaryProcessId;

    @ApiModelProperty("工序序号")
    private String processStepNumber;

    @ApiModelProperty("批次号")
    private String lotCode;

    @ApiModelProperty("产品id")
    private Long productId;
    @TableField(exist = false)
    private String processAlias;
    @TableField(exist = false)
    private String auxiliaryProcessAlias;
    @TableField(exist = false)
    private Integer rejectSum;
    @TableField(exist = false)
    private Integer isAmend;
    @TableField(exist = false)
    private Integer isWasteRecycling;
    @TableField(exist = false)
    private String productDescription;

    @TableField(exist = false)
    private List<BizDayworkAuxiliaryItemReject> rejectList;

    private Integer rejectNum;
    private Integer qualifiedNum;
    private Integer prodNum;
}
