lidongdong
2022-11-22 93d416fba4fca702ae00d1f1747f999f8291617d
修改部门数据统计导办人员排行榜问题
1个文件已修改
24 ■■■■■ 已修改文件
flower_city/src/main/resources/mapper/HomeStatisticsMapper.xml 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/resources/mapper/HomeStatisticsMapper.xml
@@ -36,14 +36,22 @@
            user_name,
            (SELECT organization_name FROM automessage_organization_chart WHERE  automessage_organization_chart.id=department_id) as departmentNmae,
            ((select sum(IF(evaluate_state='1',10,IF(evaluate_state='2',5,0))) from automessage_guide_repair_order
            WHERE automessage_guide_repair_order.guide_user_id=automessage_sys_user.user_id)/(select count(id) from automessage_guide_repair_order
            WHERE automessage_guide_repair_order.guide_user_id=automessage_sys_user.user_id)
            <if test="ids != null">
                and guide_department_id IN
                <foreach collection="ids" item="param"  open="(" close=")" separator=",">
                    #{param}
                </foreach>
            </if>) as num
            WHERE automessage_guide_repair_order.guide_user_id=automessage_sys_user.user_id
                <if test="ids != null">
                    and guide_department_id IN
                    <foreach collection="ids" item="param"  open="(" close=")" separator=",">
                        #{param}
                    </foreach>
                </if>
                )/(select count(id) from automessage_guide_repair_order
            WHERE automessage_guide_repair_order.guide_user_id=automessage_sys_user.user_id
                <if test="ids != null">
                    and guide_department_id IN
                    <foreach collection="ids" item="param"  open="(" close=")" separator=",">
                        #{param}
                    </foreach>
                </if>)
            ) as num
        FROM automessage_sys_user
        <where>
            user_type=2