54 lines
1.6 KiB
XML
54 lines
1.6 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.adc.da.slrs.sarEnterpriseStandardEvaluation.dao.QualityEvaluationDao">
|
|
|
|
<select id="getHistory"
|
|
resultType="com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.QualityEvaluation">
|
|
|
|
SELECT
|
|
`user`.UNAME AS userName,
|
|
eva.user_id,
|
|
`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 `index` ON eva.evaluation_index = `index`.id
|
|
${ew.customSqlSegment}
|
|
GROUP BY
|
|
userName,
|
|
eva.user_id,
|
|
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>
|