feiyu02
2024-04-25 0392c333ed3d987cb2ab3dac4e1a972cff405f21
src/main/kotlin/cn/flightfeather/supervision/business/bgtask/AopTaskCtrl.kt
@@ -4,7 +4,7 @@
import cn.flightfeather.supervision.business.autooutput.datasource.AopDataConfig
import cn.flightfeather.supervision.business.autooutput.score.AopCreditCode
import cn.flightfeather.supervision.business.autooutput.score.AopEvaluation
import cn.flightfeather.supervision.common.exception.ResponseErrorException
import cn.flightfeather.supervision.common.exception.BizException
import cn.flightfeather.supervision.common.executor.BackgroundTaskCtrl
import cn.flightfeather.supervision.common.executor.BgTaskStatus
import cn.flightfeather.supervision.common.executor.BgTaskType
@@ -46,10 +46,10 @@
            val districtCode = areaVo.districtcode
            val districtName = areaVo.districtname
//            val d = LocalDateTime.parse(areaVo.starttime, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))
            val d = areaVo.starttime ?: throw ResponseErrorException("自动评估任务必须设定时间")
            val d = areaVo.starttime ?: throw BizException("自动评估任务必须设定时间")
            val year = d.year
            val month = d.monthValue
            val sceneType = areaVo.scensetypeid?.toInt() ?: throw ResponseErrorException("场景类型未设置,无法评估")
            val sceneType = areaVo.scensetypeid?.toInt() ?: throw BizException("场景类型未设置,无法评估")
            val id = "${BgTaskType.AUTO_SCORE.name}-${districtCode}-${sceneType}"
            val name = "${districtName}${Constant.SceneType.getDes(sceneType)}自动评分"
@@ -69,7 +69,7 @@
            }
            return bgTask.taskStatus
        } else {
            throw ResponseErrorException("巡查总任务不存在,无法评估")
            throw BizException("巡查总任务不存在,无法评估")
        }
    }