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

/**
 * 报工记录对象 biz_daywork_item
 *
 * @author ezhizao
 * @date 2023-12-04
 */
@Data
@TableName(value = "biz_daywork_item")
public class BizDayworkItem extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 租户（厂别）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;

    /** 箱数 */
    @Excel(name = "箱数")
    private Integer carrierNum;

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

    /** 载具id */
    @ApiModelProperty(value = "${comment}")
    private Long vehicleId;

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

    /** 合格数 */
    @Excel(name = "合格数")
    @ApiModelProperty(value = "合格数")
    private Integer qualifiedNum;

    /** 工艺id（通过工艺id，获取版本号） */
    @ApiModelProperty(value = "合格数")
    private Long technologicalProcessId;

    /** 工序id */
    @ApiModelProperty(value = "合格数")
    private Long processId;

    /** 设备id */
    @ApiModelProperty(value = "合格数")
    private Long equipmentDetailId;

    /** 设备编码 */
    @Excel(name = "设备编码")
    @ApiModelProperty(value = "设备编码")
    private String equipmentDetailCode;

    /** 生产状态0:未开始, 1:生产中 ,2:已完成 */
    @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 Integer isSpecial;

    @Excel(name = "特殊报工是否首序")
    @ApiModelProperty(value = "特殊报工是否首序")
    private Integer  specialIsFirst;

    /** 用户id */
    private Long userId;
    /** 接收人id */
    @ApiModelProperty(value = "接收人id")
    private Long recipientId;

    private Long deptId;

    private String deptName;

    @TableField(exist = false)
    private String deptCode;
    @TableField(exist = false)
    private String processCode;
    @TableField(exist = false)
    private String drawingNumber;

    @TableField(exist = false)
    private Long carrierId;

    @TableField(exist = false)
    private String carrierCode;
    /** 员工编码 */
    @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")
    @ApiModelProperty(value = "开始时间")
    private Date startTime;
    /** 批次号 */
    @TableField(exist = false)
    @ApiModelProperty(value = "${comment}")
    private String lotCode;
    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "结束时间")
    private Date endTime;

    //是否序检
    private Integer isProcessInspection;

    @ApiModelProperty(value = "来源")
    private Long formDayworkItemId;

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

    private Integer rejectNum;

    @TableField(exist = false)
    private Integer isAmend;

    private String reason;
    /** 前端传来的下一道工序Id */
    @TableField(exist = false)
    private Long processDemoId;

    /** 周转区 */
    private String turnoverArea;
    private String turnoverId;
    /** 周转类型 */
    private String turnoverType;

    private Long updaterId;

    @TableField(exist = false)
    private BizDaywork daywork;

    /** 载具 */
    @TableField(exist = false)
    private String carrierName;

    /** 产品描述 */
    @TableField(exist = false)
    private String productDescription;

    /** 查询非周转页面状态 */
    @TableField(exist = false)
    private String userStatus;

    /** 周转区字典*/
    @TableField(exist = false)
    private String dictDataLabel;

    /** 控制周转显示 */
    @TableField(exist = false)
    private String type;

    /** 上一部门 */
    @TableField(exist = false)
    private String preDeptName;
    /** 废品数*/
    @TableField(exist = false)
    private Integer rejectSum;

//    private Integer productionNum;

    private String placeId;

    private String place;

    @TableField(exist = false)
    private String nextDeptProcess;

    // 是否是首序
    @TableField(exist = false)
    private Boolean isPreProcess;

    @ApiModelProperty("工序外键")
    private Long technologicalProcessDetailId;


    @ApiModelProperty("是否快速报工")
    private Integer isQuick;

    @TableField(exist = false)
    private List<BizDayworkCarrier> dayworkCarriers;
    @TableField(exist = false)
    private List<Long> ids;
    @TableField(exist = false)
    private String productionPlanNo;

    @TableField(exist = false)
    private Long workshopId;

    private String processStepNumber;

    @TableField(exist = false)
    private Integer isWasteRecycling;


    @TableField(exist = true)
    private String remark;

    @TableField(exist = false)
    private String technicianName;

    @TableField(exist = false)
    private Long technicianId;
    @TableField(exist = false)
    private String keywords;
    @TableField(exist = false)
    private Long lastDeptId;
    @TableField(exist = false)
    private String processAlias;
    private Integer isSort;
    private Integer isInnerTurnover;
    @TableField(exist = false)
    private String protemProcessStepNumber;
    @TableField(exist = false)
    private Boolean isNextPacking;
    @TableField(exist = false)
    private String technologyVersion;
    private Long packageResourceGroupId;
    private String packageResourceGroupDetailUserId;
    @TableField(exist = false)
    private Integer lineNumber;
    @TableField(exist = false)
    private Integer adoptStatus;
    @TableField(exist = false)
    private String message;

    private String fromDeptName;
    private Long fromDeptId;
    //外协发出明细
    private Long  outsourceDetailId;
    private Integer isWx;
}
