package com.aucma.report.domain.vo;

import com.fasterxml.jackson.annotation.JsonIgnore;

import java.io.Serializable;

/**
 * Board4 设备开模数VO（列表项）
 *
 * @author YinQ
 */
public class Board4DeviceOpeningCountVo implements Serializable {
    
    private static final long serialVersionUID = 1L;

    /** 设备名称 */
    private String deviceName;

    /** 开模数，统计口径为昨日07:00到今日07:00的“机台状态-实际产出数量”增量 */
    private Long openingCount;

    /** 设备编码，仅用于后端识别OLD设备，接口不返回 */
    @JsonIgnore
    private String deviceCode;

    /** 窗口内源表是否存在采集数据，仅用于判断OLD设备是否需要临时估算，接口不返回 */
    @JsonIgnore
    private Integer windowDataFlag;

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public Long getOpeningCount() {
        return openingCount;
    }

    public void setOpeningCount(Long openingCount) {
        this.openingCount = openingCount;
    }

    @JsonIgnore
    public String getDeviceCode() {
        return deviceCode;
    }

    public void setDeviceCode(String deviceCode) {
        this.deviceCode = deviceCode;
    }

    @JsonIgnore
    public Integer getWindowDataFlag() {
        return windowDataFlag;
    }

    public void setWindowDataFlag(Integer windowDataFlag) {
        this.windowDataFlag = windowDataFlag;
    }

    /**
     * 是否在统计窗口内读取到了源表数据。
     */
    @JsonIgnore
    public boolean hasWindowData() {
        return windowDataFlag != null && windowDataFlag.intValue() > 0;
    }
}
