src/main/kotlin/cn/flightfeather/supervision/business/bgtask/ReportTaskCtrl.kt
@@ -9,6 +9,7 @@
import cn.flightfeather.supervision.common.executor.BackgroundTaskCtrl
import cn.flightfeather.supervision.common.executor.BgTaskStatus
import cn.flightfeather.supervision.common.executor.BgTaskType
import cn.flightfeather.supervision.domain.ds1.repository.DataProductRep
import cn.flightfeather.supervision.lightshare.vo.ExcelConfigVo
import org.springframework.beans.factory.annotation.Value
import org.springframework.stereotype.Component
@@ -22,6 +23,7 @@
class ReportTaskCtrl(
    private val backgroundTaskCtrl: BackgroundTaskCtrl,
    private val dbMapper: DbMapper,
    private val mapper: DataProductRep,
    @Value("\${filePath}") private val filePath: String,
) {
@@ -32,6 +34,11 @@
        val bgTask = backgroundTaskCtrl.startNewTask(BgTaskType.DOCUMENT, id, taskName) {
            val p = "$filePath/autoscore/"
            baseExcel.toFile(p)
            baseExcel.templates.forEach {
                it.toDBEntity()
                it.toDBBaseInfoEntity()
                mapper.insertDataProduct(it.dataProduct, it.entities)
            }
            true
        }
        bgTask.taskStatus.extra = downloadUrl