From 5bff489eb92a807c25d3746d8088518bd259a50b Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期一, 13 十月 2025 16:15:10 +0800
Subject: [PATCH] Rename .java to .kt
---
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/ScoreUtil.kt | 43 ++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 42 insertions(+), 1 deletions(-)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/ScoreUtil.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/ScoreUtil.kt
index 12df325..84bb7e2 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/ScoreUtil.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/ScoreUtil.kt
@@ -7,6 +7,7 @@
import cn.flightfeather.supervision.domain.ds1.entity.Itemevaluation
import cn.flightfeather.supervision.lightshare.vo.EvaluationVo
import cn.flightfeather.supervision.lightshare.vo.ItemEvaluationVo
+import cn.flightfeather.supervision.lightshare.vo.SubRulePair
import java.util.*
/**
@@ -37,7 +38,47 @@
// 琛ュ厖鍚勬渶涓婄骇璇勫垎椤圭殑璁″垎
val fatherId = r.first.fatherid
- for (t in (evaluationScene.topRules.value ?: emptyList())) {
+ for (t in (topRules ?: emptyList())) {
+ if (t.guid == fatherId) {
+ t.score += r.first.score
+ break
+ }
+ }
+ }
+ }
+
+ /**
+ * 鏍规嵁鎵�閫夋渶娣卞眰璇勪及閫夐」锛屼互鍘熸湁璇勫垎涓哄熀纭�锛岀粰瑙勫垯璧嬪�煎搴斿垎鏁板強鑷姩璁$畻鍏朵綑鎵�鏈夋潯鐩緱鍒�
+ * @param evaluationScene 闇�瑕佽瘎浼扮殑瀵硅薄
+ * @param selected 璇勪及琛ㄤ腑閫変腑鐨勮瘎浼版潯鐩富閿甶d闆嗗悎锛堝繀椤绘槸鏈�娣变竴灞傜殑璇勪及鏉$洰锛�
+ */
+ fun scoreAssignSelected(evaluationScene: AopDataSource.EvaluationScene, selected: List<SubRulePair?>?) {
+ val topRules = evaluationScene.topRules.value
+ val subRules = evaluationScene.rules.value
+ val evaluation = evaluationScene.evaluation.value ?: return
+ val itemevaluationList = evaluationScene.itemevaluationList.value ?: return
+ subRules?.forEach { r ->
+
+ r.second.forEach { e ->
+ // 棣栧厛灏嗗師鏈夌殑鍒嗘暟璧嬪�肩粰瀵瑰簲瑙勫垯
+ val itemEva = itemevaluationList.find { it.esrguid == e.guid }
+ e.score = itemEva?.value?.toIntOrNull() ?: 0
+ e.selected = itemEva?.extension1 == "true"
+ // 鏍规嵁浼犲叆鐨勯�変腑璇勪及鏉$洰涓婚敭id锛屼慨鏀瑰叾寰楀垎
+ selected?.find { it?.id == e.guid }?.let {s ->
+ if (s.selected == true) {
+ e.setMaxScore()
+ } else {
+ e.clear()
+ }
+ }
+ }
+ // 鏍规嵁瀛愰」鐨勯�夋嫨鎯呭喌锛岃嚜鍔ㄨ绠楄鏉¤瘎浼扮殑鎬诲緱鍒�
+ subRuleCal(r)
+
+ // 琛ュ厖鍚勬渶涓婄骇璇勫垎椤圭殑璁″垎
+ val fatherId = r.first.fatherid
+ for (t in (topRules ?: emptyList())) {
if (t.guid == fatherId) {
t.score += r.first.score
break
--
Gitblit v1.9.3