package cn.estsh.i3plus.ext.mes.pcn.pojo.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiParam;
import lombok.Data;

import java.io.Serializable;

/**
 * @author wangjie
 * @version 1.0
 * @date 2021/1/15 15:32
 **/
@Data
@ApiModel("总检验结果 MODEL")
public class OqcLastCheckModel implements Serializable {

    private static final long serialVersionUID = -8739206192092737302L;

    @ApiParam("生产工单")
    private String workOrderNo;

    @ApiParam("生产线")
    private String workCenterCode;

    @ApiParam("物料号")
    private String partNo;

    @ApiParam("物料名称")
    private String partNameRdd;

    @ApiParam("作业时间")
    private String workTime;

    @ApiParam("班次代码")
    private String shiftCode;

    @ApiParam("工单计划数量")
    private Double planQty;

    @ApiParam("班次完工数量")
    private Double qty;

    @ApiParam("抽检数量")
    private Double spotCheckQty;

    @ApiParam("检测范围")
    private Double checkLimit;

    @ApiParam("总检测单号")
    private String checkNo;

    @ApiParam("总检测结果")
    private Integer checkResult;

    @ApiParam("总检测结果名称")
    private String checkResultName;

    @ApiParam("备注")
    private String remark;

    @ApiParam("检测时间")
    private String confirmTime;

    @ApiParam("检测人员")
    private String checkUser;

    @ApiParam("组织代码")
    public String organizeCode;

    @ApiParam("操作人")
    public String userInfo;

    @ApiParam("产量统计ID")
    private Long id;

    @ApiParam("产量统计PID")
    private Long pid;

    @ApiParam("作业时间开始")
    private String workTimeStart;

    @ApiParam("作业时间结束")
    private String workTimeEnd;

    @ApiParam("组件抽检只读状态")
    private Boolean zjCheckReadOnly = true;

    @ApiParam("总检合格只读状态")
    private Boolean qcReadOnly = true;

    @ApiParam("总检不合格只读状态")
    private Boolean unQcReadOnly = true;

    @ApiParam("颜色")
    private String color;

    public OqcLastCheckModel() {
    }

    public OqcLastCheckModel(Long id, Long pid, String organizeCode, String workOrderNo, String workCenterCode, String partNo, String partNameRdd, String workTime, String shiftCode,
                             Double spotCheckQty, Double checkLimit, String checkNo, Integer checkResult, String remark, String confirmTime, String checkUser, Double planQty, Double qty) {
        this.id = id;
        this.pid = pid;
        this.organizeCode = organizeCode;
        this.workOrderNo = workOrderNo;
        this.workCenterCode = workCenterCode;
        this.partNo = partNo;
        this.partNameRdd = partNameRdd;
        this.workTime = workTime;
        this.shiftCode = shiftCode;
        this.spotCheckQty = spotCheckQty;
        this.checkLimit = checkLimit;
        this.checkNo = checkNo;
        this.checkResult = checkResult;
        this.remark = remark;
        this.confirmTime = confirmTime;
        this.checkUser = checkUser;
        this.planQty = planQty;
        this.qty = qty;
    }

    public OqcLastCheckModel(Boolean boo) {
        this.qcReadOnly = boo;
        this.unQcReadOnly = boo;
    }

}
