package cn.sagacloud.server.algorithm.models.excel.report

import cn.sagacloud.server.algorithm.models.excel.ExcelRowData
import cn.sagacloud.server.algorithm.models.excel.PreciseCellValue
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Component

/**
 *
 * 报告基类
 * @author jxing
 */
@Component
@Scope("prototype")
abstract class ModelQualityExcelReport {
    open var sheetIndex = 0

    var cellValues : ArrayList<PreciseCellValue> = ArrayList()

    abstract var rowValue : ArrayList<ExcelRowData>

    open var excelStartRow = 0

    // 检查总数文字坐标
    open var checkCntRowIdx = 4
    open var checkCntClmIdx = 0

    /**
     * 添加检查总数
     */
    fun addCheckTitle(value : Int){
        cellValues.clear()
        val cell = PreciseCellValue()
        cell.rowIndex = checkCntRowIdx
        cell.columnIndex = checkCntClmIdx
        cell.obj = "共检查${value}条数据，未通过检查的如下"
        cellValues.add(cell)
    }
}