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

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

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * @Description:
 * @Author: jokelin
 * @Date: 2020/7/28 2:37 下午
 * @Modify:
 */
@Data
public class BiModel implements Serializable {
    @ApiParam("工作中心代码")
    private String workCenterCode;

    @ApiParam("工作中心名称")
    private String workCenterName;

    @ApiParam("工作单元代码")
    private String workCellCode;

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

    @ApiParam(value = "物料名称")
    private String partName;

    @ApiParam(value = "计划数量")
    private double planQty = 0;

    @ApiParam(value = "合格数量")
    private double passQty = 0;

    @ApiParam(value = "不良数量")
    private double ngQty = 0;

    @ApiParam(value = "实际数量")
    private double actualQty = 0;

    @ApiParam(value = "合格率")
    private double passRate;

    @ApiParam(value = "不良率")
    private double ngRate;

    @ApiParam(value = "警戒值")
    private double sentinelValue;

    @ApiParam(value = "总数")
    private double total;

    @ApiParam(value = "合格数")
    private double qualifiedQty = 0;

    @ApiParam(value = "不合格数")
    private double unQualifiedQty = 0;

    @ApiParam(value = "合格率")
    private double qualifiedRate = 0;

    @ApiParam(value = "一次合格率")
    private double onceQualifiedRate = 0;

    @ApiParam(value = "不合格率")
    private double unQualifiedRate = 0;

    @ApiParam("目标合格率")
    private double targetPassRate;

    @ApiParam("颜色标识")
    private Integer colorFlag = 0;

    @ApiParam("首检")
    private Integer firstCheck;

    @ApiParam("巡检")
    private Integer onSiteCheck;

    @ApiParam("首件")
    private Integer firstArticle;

    @ApiParam("中件")
    private Integer mediumSized;

    @ApiParam("末件")
    private Integer lastPiece;

    @ApiParam("末检")
    private Integer endCheck;//首件、30中件、40末件

    private double qty;

    @ApiParam("比率")
    private double rate;

    @ApiParam("x坐标内容")
    private List<String> xAxis;

    @ApiParam("一些携带值 eg:异常类型，异常次数")
    private Map<String, Object> carryMap;

    @ApiParam("图表显示的数据")
    private List<ProductBiSeriesModel> series;

    @ApiParam("列名")
    private Map<String, String> colMap;

    public BiModel() {}

    public BiModel(Double qty, String partNo) {
        this.qty = qty;
        this.partNo = partNo;
    }
}
