From b212ef0208cb094f63ea8a239a1361f8e859c839 Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期一, 08 七月 2024 17:40:39 +0800 Subject: [PATCH] 2024.7.8 --- src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt index c7be139..51c20ef 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt @@ -12,6 +12,7 @@ import cn.flightfeather.supervision.domain.ds1.mapper.* import cn.flightfeather.supervision.domain.ds1.repository.EvaluationRep import cn.flightfeather.supervision.domain.ds1.repository.EvaluationRuleRep +import cn.flightfeather.supervision.domain.ds1.repository.SceneRep import cn.flightfeather.supervision.domain.ds2.mapper.LedgerRecordMapper import cn.flightfeather.supervision.domain.ds2.mapper.LedgerSubTypeMapper import cn.flightfeather.supervision.domain.ds2.mapper.UserMapMapper @@ -62,6 +63,7 @@ val taskService: TaskService, private val evaluationRep: EvaluationRep, private val evaluationRuleRep: EvaluationRuleRep, + private val sceneRep: SceneRep, @Value("\${filePath}") var filePath: String, @Value("\${imgPath}") var imgPath: String, ) : SearchService { @@ -560,15 +562,22 @@ } override fun getScoreDetail(subTaskId: String): ScoreDetail { + //鍦烘櫙淇℃伅 + val scene = sceneRep.findBySubTask(subTaskId) + //鎬诲垎 + val evaluation = evaluationRep.findBySubtask(subTaskId) //瀛愯鍒欓�愭潯寰楀垎 val subRuleScores = evaluationRep.findItemEvaluation(subTaskId) + if (subRuleScores.isEmpty()) throw BizException("鏃犺瘎浼拌褰�") //璇勫垎鎬昏鍒� val rule = evaluationRuleRep.findAutoEvaluationRule(subTaskId) ?: throw BizException("鏈壘鍒扮浉鍏宠嚜鍔ㄨ瘎浼拌鍒�") //鎬昏鍒欏搴旂殑璇勫垎瀛愯鍒� val subRules = evaluationRuleRep.findSubRule(rule.guid) //鏌ヨ缁撴灉 val result = ScoreDetail() + result.status = if (scene?.extension1.equals("1")) "鍦ㄥ缓" else "瀹屽伐" + result.updateTime = evaluation?.updatedate subRules.forEach { it.ertype ?: return@forEach result.addDetail(result.details, it, it.ertype!! - 1, subRuleScores, true) -- Gitblit v1.9.3