| | |
| | | <if test="deptId != null "> and tcs.dept_id = #{deptId}</if> |
| | | ${params.dataScope} |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | <select id="selectCheckScoreById" parameterType="Long" resultMap="CheckScoreResult"> |
| | |
| | | (#{score.score},#{score.deptId},#{score.templateId},#{score.examineTag},#{score.examineCategory},#{score.createTime}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <select id="selectCheckScoreMap" resultType="com.ycl.platform.domain.entity.CheckScore"> |
| | | SELECT |
| | | tcs.dept_id, |
| | | examine_category, |
| | | ROUND(AVG(score), 2) AS score, |
| | | #{startDate} AS startDate, |
| | | #{endDate} AS endDate, |
| | | ANY_VALUE(tcs.create_time) AS createTime |
| | | FROM |
| | | t_check_score tcs |
| | | LEFT JOIN sys_dept d ON tcs.dept_id = d.dept_id |
| | | WHERE |
| | | examine_tag = #{examineTag} |
| | | AND tcs.create_time BETWEEN #{startDate} AND #{endDate} |
| | | GROUP BY |
| | | tcs.dept_id, |
| | | examine_category |
| | | </select> |
| | | |
| | | </mapper> |