| | |
| | | override fun getTotalPoints(userId: String, evaluatorType: Int, startTime: String, endTime: String, sceneTypeId: Int?, erGuid: String?, eId: String?): List<Evaluation> { |
| | | val example = Example(Evaluation::class.java) |
| | | val criteria = example.createCriteria() |
| | | val startDate = DateUtil().StringToDate(startTime) |
| | | val endDate = DateUtil().StringToDate(endTime) |
| | | val startDate = DateUtil.StringToDate(startTime) |
| | | val endDate = DateUtil.StringToDate(endTime) |
| | | criteria.andEqualTo("iguid", userId) |
| | | .andBetween("createdate", startDate, endDate) |
| | | example.and(example.createCriteria().apply { |
| | |
| | | else -> null |
| | | } |
| | | |
| | | result.publishTime = DateUtil().DateToString(overallEvaluation.oePublishTime, "YYYY年MM月") |
| | | result.updateTime = DateUtil().DateToString(overallEvaluation.oeUpdateTime, "YYYY年MM月") |
| | | result.publishTime = DateUtil.DateToString(overallEvaluation.oePublishTime, "YYYY年MM月") |
| | | result.updateTime = DateUtil.DateToString(overallEvaluation.oeUpdateTime, "YYYY年MM月") |
| | | result.creditLevel = creditLevel |
| | | result.creditLevelDes = creditLevelDes |
| | | result.codeLevel = codeLevel |
| | |
| | | } |
| | | |
| | | //分类别的得分(每个评分表的评分大项的得分)和失分条目 |
| | | val ruleMap = result.loseScore |
| | | rule1List.forEach { |
| | | val evaluation = evaluationMapper.selectByExample(Example(Evaluation::class.java).apply { |
| | | createCriteria().andEqualTo("iguid", userId) |
| | |
| | | }) |
| | | val itemEvaluations = itemevaluationService.getItemEvaluationList(e.guid!!) |
| | | |
| | | itemEvaluations.forEach {item -> |
| | | itemEvaluations.sortedBy { it.ertype }.forEach {item -> |
| | | when (item.ertype) { |
| | | //分类别的得分 |
| | | 2 -> { |
| | | ruleMap[item.name] = mutableMapOf() |
| | | for (s in subRules) { |
| | | if (s.guid == item.esrguid) { |
| | | val score = if ((item.value?.toInt() ?: 0) <= 0) { |
| | |
| | | } |
| | | } |
| | | } |
| | | 3 -> { |
| | | if ((item.value?.toInt() ?: 0) != 0 && item.extension1 == "true") { |
| | | for (s in subRules) { |
| | | if (s.guid == item.esrguid) { |
| | | if (!ruleMap.containsKey(s.fathername)) { |
| | | ruleMap[s.fathername] = mutableMapOf() |
| | | } |
| | | ruleMap[s.fathername]?.put(item.name, mutableListOf()) |
| | | break |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //失分条目 |
| | | 4 -> { |
| | | if ((item.value?.toInt() ?: 0) != 0 && item.extension1 == "true") { |
| | | for (s in subRules) { |
| | | if (s.guid == item.esrguid) { |
| | | result.loseScore.add( |
| | | val d = |
| | | Triple( |
| | | item.name ?: "", |
| | | if ((item.value?.toInt() ?: 0) < 0) { |
| | |
| | | }, |
| | | s.remark ?: "" |
| | | ) |
| | | ) |
| | | val rule3Name = s.fathername |
| | | for (s1 in subRules) { |
| | | if (s1.itemname == rule3Name) { |
| | | val rule2Name = s1.fathername |
| | | ruleMap[rule2Name]?.get(rule3Name)?.add(d) |
| | | break |
| | | } |
| | | } |
| | | |
| | | break |
| | | } |
| | | } |
| | | } |