xiangpei
2024-07-31 f63535115eff538f30b1004faf90a428ebdca963
ycl-server/src/main/resources/mapper/zgyw/CheckScoreMapper.xml
@@ -114,4 +114,23 @@
        (#{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,
            AVG(score) AS score,
            #{startDate} AS startDate,
            #{endDate} AS endDate
        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>