ÎļþÃû´Ó src/main/kotlin/cn/flightfeather/supervision/business/autooutput/AopTaskCtrl.kt ÐÞ¸Ä |
| | |
| | | package cn.flightfeather.supervision.business.autooutput |
| | | package cn.flightfeather.supervision.business.bgtask |
| | | |
| | | import cn.flightfeather.supervision.business.autooutput.dataanalysis.* |
| | | 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.executor.BackgroundTaskCtrl |
| | | import cn.flightfeather.supervision.common.executor.BgTaskStatus |
| | | import cn.flightfeather.supervision.common.executor.BgTaskType |
| | |
| | | import cn.flightfeather.supervision.domain.ds1.repository.TaskRep |
| | | import cn.flightfeather.supervision.lightshare.vo.AreaVo |
| | | import org.springframework.stereotype.Component |
| | | import java.time.LocalDate |
| | | |
| | | /** |
| | | * èªå¨è¯ä¼°ä»»å¡ç®¡ç |
| | |
| | | if (taskId != null) { |
| | | val districtCode = areaVo.districtcode |
| | | val districtName = areaVo.districtname |
| | | val d = LocalDate.parse(areaVo.starttime) |
| | | // val d = LocalDateTime.parse(areaVo.starttime, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) |
| | | val d = areaVo.starttime ?: throw ResponseErrorException("èªå¨è¯ä¼°ä»»å¡å¿
é¡»è®¾å®æ¶é´") |
| | | val year = d.year |
| | | val month = d.monthValue |
| | | val sceneType = areaVo.scensetypeid?.toInt() ?: throw IllegalStateException("åºæ¯ç±»åæªè®¾ç½®ï¼æ æ³è¯ä¼°") |
| | | val sceneType = areaVo.scensetypeid?.toInt() ?: throw ResponseErrorException("åºæ¯ç±»åæªè®¾ç½®ï¼æ æ³è¯ä¼°") |
| | | |
| | | val id = "${BgTaskType.AUTO_SCORE.name}-${districtCode}-${sceneType}" |
| | | val name = "${districtName}${Constant.SceneType.getDes(sceneType)}èªå¨è¯å" |
| | |
| | | } |
| | | return bgTask.taskStatus |
| | | } else { |
| | | throw IllegalStateException("å·¡æ¥æ»ä»»å¡ä¸åå¨ï¼æ æ³è¯ä¼°") |
| | | throw ResponseErrorException("å·¡æ¥æ»ä»»å¡ä¸åå¨ï¼æ æ³è¯ä¼°") |
| | | } |
| | | } |
| | | |