From aed297a5fbc8df9dab01b28da21f872ee546b43c Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期一, 13 十月 2025 16:15:11 +0800
Subject: [PATCH] 2025.10.13 1. 统一调整controller层的返回类型,通过添加全局响应增强器GlobalResponseAdvice来管理返回结果; 2. 新增mybatis-generator自定义插件,实现给数据库实体entity自动添加swagger注解@ApiModel和@ApiModelProperty
---
src/main/kotlin/cn/flightfeather/supervision/business/AutoScore2.kt | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/AutoScore2.kt b/src/main/kotlin/cn/flightfeather/supervision/business/AutoScore2.kt
index 1b2a38f..f718ce3 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/AutoScore2.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/AutoScore2.kt
@@ -16,7 +16,7 @@
* @author riku
* Date: 2020/8/7
*/
-
+@Deprecated("2024.9.25 姝よ嚜鍔ㄨ瘎鍒嗚垗寮�")
@Component
class AutoScore2 {
@@ -42,7 +42,7 @@
private var problems: ArrayList<ProblemListVo> = ArrayList()
- private var allRules: ArrayList<Evaluationsubrule> = ArrayList()
+ private var allRules = listOf<Evaluationsubrule2>()
private var inspection = InspectionVo()
@@ -81,12 +81,12 @@
if (evaluationrule === null) return
this.evaluationrule = evaluationrule
//鑾峰彇瀵瑰簲鐨勫叿浣撹瘎鍒嗙粏鍒�
- allRules = autoScore.evaluationsubruleService.findByRuleId(evaluationrule.guid!!) as ArrayList<Evaluationsubrule>
+ allRules = autoScore.evaluationsubruleService.findByRuleId(evaluationrule.guid!!)
//鑾峰彇宸℃煡淇℃伅
inspection = autoScore.inspectionService.findBySubTaskID(subtask.stguid!!)
- val titleRule = Evaluationsubrule()
+ val titleRule = Evaluationsubrule2()
val titleOptionRange = ArrayList<Int>()
val titleIsGood = true
@@ -106,7 +106,7 @@
* @param rule 褰撳墠璇勫垎椤�
* @param maxScore 鐖堕」鐨勬渶澶у垎
*/
- fun autoGeneration(rule: Evaluationsubrule, maxScore: Int): Int? {
+ fun autoGeneration(rule: Evaluationsubrule2, maxScore: Int): Int? {
val nextSubRules = getSubRulesByFatherId(allRules, rule.guid)
//鏃犲瓙椤圭殑鏈�灏忚瘎鍒嗛」锛岀粰鍑哄緱鍒�
@@ -139,7 +139,7 @@
}
//濉啓璇︾粏璇勫垎椤圭殑鍒嗘暟
- fun writeScore4th(rule: Evaluationsubrule, maxScore: Int): Pair<Int, Boolean> {
+ fun writeScore4th(rule: Evaluationsubrule2, maxScore: Int): Pair<Int, Boolean> {
problems.forEach {
if (it.guid != null) {
@@ -153,8 +153,8 @@
}
//鎸夌収鐖秈d鏌ユ壘瀛愯瘎鍒嗛」
- fun getSubRulesByFatherId(rules: ArrayList<Evaluationsubrule>, fatherId: String?): List<Evaluationsubrule> {
- val subRules = mutableListOf<Evaluationsubrule>()
+ fun getSubRulesByFatherId(rules: List<Evaluationsubrule2>, fatherId: String?): List<Evaluationsubrule2> {
+ val subRules = mutableListOf<Evaluationsubrule2>()
rules.forEach {
if (it.fatherid == fatherId
|| (fatherId.isNullOrBlank() && it.fatherid.isNullOrBlank())) {
@@ -166,7 +166,7 @@
}
//鍒涘缓鍗曢」璇勫垎瀵硅薄
- fun createNewChildScore(subRule: Evaluationsubrule, score: Int, isSelected: Boolean): Int? {
+ fun createNewChildScore(subRule: Evaluationsubrule2, score: Int, isSelected: Boolean): Int? {
val itemevaluation = Itemevaluation()
itemevaluation.ieguid = UUIDGenerator.generate16ShortUUID()
itemevaluation.iguid = inspection.guid
@@ -218,7 +218,7 @@
}
//鑾峰彇鎬诲垎
- fun getTotalPoint(rules: ArrayList<Evaluationsubrule>, fatherId: String?): Int {
+ fun getTotalPoint(rules: List<Evaluationsubrule2>, fatherId: String?): Int {
val rules1 = getSubRulesByFatherId(rules, fatherId)
var point = 0
rules1.forEach {
--
Gitblit v1.9.3