From baf2cc2ce3dfd1235c012a3750132769fcd9ad2f Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 18 九月 2025 17:02:05 +0800
Subject: [PATCH] 2025.9.18 1. 联合前端调试数据产品接口(待完成)

---
 src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/ScoreItem.kt |   24 ++++++++----------------
 1 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/ScoreItem.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/ScoreItem.kt
index 4a50913..266c0a3 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/ScoreItem.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/ScoreItem.kt
@@ -1,13 +1,10 @@
 package cn.flightfeather.supervision.business.autooutput.score
 
 import cn.flightfeather.supervision.business.autooutput.datasource.AopDataSource
-import cn.flightfeather.supervision.common.utils.DateUtil
 import cn.flightfeather.supervision.domain.ds1.entity.Evaluationsubrule2
-import cn.flightfeather.supervision.domain.ds1.entity.Problemlist
 import cn.flightfeather.supervision.domain.ds1.mapper.ProblemlistMapper
+import cn.flightfeather.supervision.lightshare.vo.EvaluationSubRuleVo
 import org.springframework.beans.factory.annotation.Autowired
-import tk.mybatis.mapper.entity.Example
-import kotlin.math.abs
 
 /**
  * 鑷姩璇勫垎鏉$洰
@@ -23,13 +20,12 @@
     //鏈�灏忓垎鍊硷紙榛樿0鍒嗭級
     var minScore: Int = 0
 
-    val dateUtil = DateUtil()
     // 璇勫垎椤规槸鍚﹁眮鍏嶄笉鎵e垎
     var exemption = false
 
     lateinit var evaluationScene: AopDataSource.EvaluationScene
 
-    private var rulePair: Pair<Evaluationsubrule2, MutableList<Evaluationsubrule2>>? = null
+    private var rulePair: Pair<EvaluationSubRuleVo, MutableList<EvaluationSubRuleVo>>? = null
 
     @Autowired
     lateinit var problemlistMapper: ProblemlistMapper
@@ -40,6 +36,7 @@
     fun execute(evaluationScene: AopDataSource.EvaluationScene) {
         this.evaluationScene = evaluationScene
         if (!exemption && !evaluationScene.noRecord()) {
+            val a = evaluationScene.topRules.value
             getRule(evaluationScene.rules.value)
             calScore()
         }
@@ -48,7 +45,7 @@
     /**
      * 鑾峰彇璇勫垎瑙勫垯
      */
-    private fun getRule(eList: MutableList<Pair<Evaluationsubrule2, MutableList<Evaluationsubrule2>>>?) {
+    private fun getRule(eList: MutableList<Pair<EvaluationSubRuleVo, MutableList<EvaluationSubRuleVo>>>?) {
         if (eList == null) return
         for (e in eList) {
             if (e.first.guid == id) {
@@ -66,7 +63,7 @@
      * @param size 浼犲叆璇勫垎鏉$洰鐨勬暟閲忥紝璇勫垎鏉$洰鎸夌収涓�瀹氳鍒欒繘琛屾帓搴�
      * @return 杩斿洖闇�瑕佹墸鍒嗙殑璇勫垎鏉$洰鐨勫簭鍙�
      */
-    abstract fun otherProblem(size: Int): Int?
+    abstract fun otherProblem(size: Int): List<Int>?
 
     /**
      * 鑷姩璇勫垎璁$畻閫昏緫
@@ -77,15 +74,10 @@
             return
         }
 
-        otherProblem(rulePair?.second!!.size)?.let {i-> rulePair?.second!![i].getScore() }
+        otherProblem(rulePair?.second!!.size)?.let { it.forEach {i ->
+            rulePair?.second!![i].setMaxScore()
+        } }
 
         ScoreUtil.subRuleCal(rulePair)
-    }
-
-    /**
-     * 鍑忓垎妯″紡涓嬶紝璁$畻鍏蜂綋閫夐」鐨勫緱鍒�
-     */
-    fun Evaluationsubrule2.getScore() {
-        extension1 = (0 - (maxscore ?: 0)).toString()
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3