| | |
| | | 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 |
| | |
| | | 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 { |
| | |
| | | } |
| | | |
| | | 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) |