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

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

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

/**
 * @author wangjie
 * @version 1.0
 * @date 2021/1/15 15:32
 **/
@Data
@ApiModel("BU出货检验质量预警报表 MODEL")
public class JxOqcCheckQualityEarlyWarningReportModel implements Serializable {

    private static final long serialVersionUID = -3402596554658100525L;

    @ApiParam("查询维度")
    private Integer dimension;

    @ApiParam("查询维度")
    private Integer dimension1;

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

    @ApiParam("发生时间起始")
    private String happenTimeStart;

    @ApiParam("发生时间结束")
    public String happenTimeEnd;

    @ApiParam("检验时间起始")
    private String checkTimeStart;

    @ApiParam("检验时间结束")
    public String checkTimeEnd;

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

    @ApiParam("table动态列名")
    private List<SxDynamicAttributeModel> attributeList = new ArrayList<>();

    @ApiParam("table数据")
    private List<Map<String, Object>> dataList;

    public String toBaseString() {
        return "BuOqcCheckQualityEarlyWarningReportModel{" +
                "dimension=" + dimension +
                ", dimension1=" + dimension1 +
                ", workCenterCode='" + workCenterCode + '\'' +
                ", happenTimeStart='" + happenTimeStart + '\'' +
                ", happenTimeEnd='" + happenTimeEnd + '\'' +
                ", organizeCode='" + organizeCode + '\'' +
                '}';
    }

    public JxOqcCheckQualityEarlyWarningReportModel addAttribute(SxDynamicAttributeModel attribute) {
        this.attributeList.add(attribute);
        return this;
    }
}
