This commit is contained in:
zhaokaiyao@91isoft.com
2021-12-07 17:46:12 +08:00
parent de2e2977a9
commit a018459ad1
5 changed files with 76 additions and 35 deletions
@@ -8,18 +8,46 @@
SELECT
`user`.UNAME AS userName,
eva.user_id,
iex.index_type as valueType,
avg(eva.score * iex.weight) AS score,
`index`.value_type as valueType,
eva.evaluation_type as evaluationType,
avg(eva.score * `index`.weight) AS score,
min(eva.create_time) as createTiem,
max(eva.modify_time) as modifyTime
FROM
quality_evaluation AS eva
LEFT JOIN ts_user `user` ON eva.user_id = `user`.USID
LEFT JOIN evaluation_index AS iex ON eva.evaluation_index = iex.id
LEFT JOIN evaluation_index AS `index` ON eva.evaluation_index = `index`.id
${ew.customSqlSegment}
GROUP BY
userName,
eva.user_id,
index_type
${ew.customSqlSegment}
index_type,
valueType,
evaluationType
ORDER BY modifyTime DESC
</select>
<select id="getEvaluationForm"
resultType="com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.QualityEvaluation">
SELECT
UNAME AS userName,
score,
reason,
evaluation_index as evaluationIndex,
quality_evaluation.create_time AS createTime,
quality_evaluation.modify_time AS modifyTime,
`index`.value_type AS valueType,
`index`.three_index_title as indexTitle
FROM
quality_evaluation
LEFT JOIN ts_user `user` ON quality_evaluation.user_id = `user` .USID
LEFT JOIN evaluation_index AS `index` ON `index`.id = quality_evaluation.evaluation_index
${ew.customSqlSegment}
ORDER BY `index`.index_sort
</select>
</mapper>