package com.persagy.revit.models.excel.nonBlockingReport

import com.persagy.revit.models.excel.ExcelRowData
import com.persagy.revit.models.excel.PreciseCellValue

import com.persagy.revit.models.excel.report.ModelQualityExcelReport
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Component

/**
 *
 *
 * @author jxing
 */
@Component
@Scope("prototype")
class NonBlockingTotalReport : ModelQualityExcelReport() {

    // excel中sheet的索引, 从0开始
    override var sheetIndex = 0

    //var cellValues : ArrayList<PreciseCellValue> = ArrayList()

    override var rowValue : ArrayList<ExcelRowData> = ArrayList()
    // 在excel中开始插入数据的索引(真实行数减1)
    override var excelStartRow = 14

    /**
     * 添加任意单元格需要写入数据
     */
    fun addCellValue(rowIndex : Int, columnIndex : Int, value : Any){
        val cell = PreciseCellValue()
        cell.rowIndex = rowIndex
        cell.columnIndex = columnIndex
        cell.obj = value
        cellValues.add(cell)
    }

}