fuliqi
2024-09-25 9b55891e6dd57bc244e6c5654434b32e05c83496
ycl-server/src/main/resources/mapper/zgyw/CheckScoreMapper.xml
@@ -207,15 +207,21 @@
    </select>
    <select id="dashboard" resultType="com.ycl.platform.domain.entity.CheckScore">
        select s.*,d.area as deptName from t_check_score s
        select avg(s.score) as score,d.area as deptName from t_check_score s
        left join sys_dept d on s.dept_id = d.dept_id
        <where>
            s.create_time between #{startTime} and #{endTime}
            <if test="dataScope == 1">
                AND s.examine_tag = 0
            </if>
            <if test="dataScope == 2">
                AND s.examine_tag = 1
            </if>
            <if test="dataScope == 3">
                AND s.examine_tag = 2
            </if>
        </where>
        ORDER BY
        s.create_time DESC
        LIMIT 7
        GROUP BY s.dept_id
        ORDER BY s.create_time DESC
    </select>
</mapper>