| | |
| | | |
| | | import cn.flightfeather.supervision.business.Info |
| | | import cn.flightfeather.supervision.business.ScoreItem |
| | | import cn.flightfeather.supervision.business.storage.item.StScoreItem_1 |
| | | import cn.flightfeather.supervision.business.storage.item.StScoreItem_2 |
| | | import cn.flightfeather.supervision.business.storage.item.* |
| | | import cn.flightfeather.supervision.common.utils.Constant |
| | | import cn.flightfeather.supervision.common.utils.DateUtil |
| | | import cn.flightfeather.supervision.common.utils.ExcelUtil |
| | |
| | | @Component |
| | | |
| | | class StAutoScore( |
| | | csScoreItem_1: CsScoreItem_1, |
| | | csScoreItem_2: CsScoreItem_2, |
| | | mpScoreItem_1: MpScoreItem_1, |
| | | mpScoreItem_2: MpScoreItem_2, |
| | | stScoreItem_1: StScoreItem_1, |
| | | stScoreItem_2: StScoreItem_2, |
| | | whScoreItem_1: WhScoreItem_1, |
| | | whScoreItem_2: WhScoreItem_2, |
| | | var sceneType: Constant.ScenseType = Constant.ScenseType.TYPE1, ) |
| | | { |
| | | companion object { |
| | |
| | | private val rows = mutableListOf<Array<Any>>() |
| | | |
| | | init { |
| | | itemList.add(stScoreItem_1) |
| | | itemList.add(stScoreItem_2) |
| | | itemList.apply { |
| | | add(csScoreItem_1) |
| | | add(csScoreItem_2) |
| | | add(mpScoreItem_1) |
| | | add(mpScoreItem_2) |
| | | add(stScoreItem_1) |
| | | add(whScoreItem_1) |
| | | add(whScoreItem_2) |
| | | } |
| | | } |
| | | |
| | | @PostConstruct |
| | |
| | | */ |
| | | fun topTaskGrade(topTaskId:String) { |
| | | rows.clear() |
| | | getScoreItem() |
| | | subtaskMapper.selectByTopTask2(topTaskId, sceneType.value.toInt()).forEach { |
| | | sceneGrade(it) |
| | | sceneGradeP(it) |
| | | // sceneGradeToFile(it) |
| | | } |
| | | // toFile() |
| | |
| | | // 获取评分规则 |
| | | getScoreItem() |
| | | |
| | | sceneGradeP(subtask) |
| | | } |
| | | |
| | | private fun sceneGradeP(subtask: Subtask) { |
| | | val info = itemGrade(subtask) |
| | | val result = totalGrade(info) ?: return |
| | | toDb(info, result) |
| | |
| | | val info = itemGrade(subtask) |
| | | val result = totalGrade(info) ?: return |
| | | addToFile(rows, info, result.first) |
| | | } |
| | | |
| | | fun grade(subtask: Subtask) { |
| | | |
| | | } |
| | | |