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

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

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

/**
 * @DESCRIPTION:
 * @USER: wangjie
 * @DATE: 2022-11-01 15:54
 */
@Data
@ApiModel("日常点检报表确认记录报表数据MODEL")
public class SxDailyCheckConfirmRecordDataModel implements Serializable {

    private static final long serialVersionUID = -148839403309668115L;

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

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

    @ApiParam(value = "单据类型")
    public Integer orderType;

    @ApiParam("设备编号")
    private String equNo;

    @ApiParam("设备名称")
    private String equName;

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

    @ApiParam("作业时间(年月日时分秒)")
    private String workTimeStart;

    @ApiParam("作业时间(年月日时分秒)")
    private String workTimeEnd;

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

    @ApiParam("工作中心代码")
    private String workCenterCode;

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

    @ApiParam("确认记录")
    private List<SxDailyCheckConfirmRecordModel> confirmList;

    @ApiParam("列名")
    private Map<String, String> cellFieldMap = new LinkedHashMap<>();

    @ApiParam("行数据")
    private List<LinkedHashMap<String, String>> rowDataList;

    public SxDailyCheckConfirmRecordDataModel basic(String organizeCode, String userInfo) {
        this.organizeCode = organizeCode;
        this.userInfo = userInfo;
        return this;
    }

    public SxDailyCheckConfirmRecordDataModel equName(String equName) {
        this.equName = equName;
        return this;
    }

    public SxDailyCheckConfirmRecordDataModel confirmList(List<SxDailyCheckConfirmRecordModel> confirmList) {
        this.confirmList = confirmList;
        return this;
    }

    public SxDailyCheckConfirmRecordDataModel rowDataList(List<LinkedHashMap<String, String>> rowDataList) {
        this.rowDataList = rowDataList;
        return this;
    }

    public SxDailyCheckConfirmRecordDataModel addCellField(String field, String name) {
        this.cellFieldMap.put(field, name);
        return this;
    }

}
