feiyu02
2022-11-15 909fd8929d7906f1dca68acc05e36e29b0b9192c
src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColSceneName.kt
@@ -4,16 +4,26 @@
import cn.flightfeather.supervision.business.report.DataSource
import cn.flightfeather.supervision.common.utils.ExcelUtil
//名称
class ColSceneName() : BaseCols() {
//场景名称及类型
class ColSceneName(chooseIndexList: List<Int> = emptyList()) : BaseCols(chooseIndexList) {
    override fun onHeads(dataSource: DataSource): MutableList<MutableList<ExcelUtil.MyCell>> {
        return mutableListOf(
            mutableListOf(ExcelUtil.MyCell("表单编号"), ExcelUtil.MyCell("唯一序号"), ExcelUtil.MyCell("场景名称"))
            mutableListOf(
                ExcelUtil.MyCell("表单编号"),
                ExcelUtil.MyCell("唯一序号"),
                ExcelUtil.MyCell("场景类型"),
                ExcelUtil.MyCell("场景名称")
            )
        )
    }
    override fun onOneRow(rowData: DataSource.RowData): List<Any> {
//        return listOf(rowData.scene?.index ?: -99, rowData.scene?.extension2 ?: "", rowData.scene?.name ?: "")
        return listOf(rowData.index + 1, rowData.scene?.index ?: -99, rowData.scene?.name ?: "")
        return listOf(
            rowData.index + 1,
            rowData.scene?.index ?: -99,
            rowData.scene?.type ?: "",
            rowData.scene?.name ?: ""
        )
    }
}