feat(performance): 新增分组绩效统计功能
- 在性能监控页面添加菜单分类总览模块,显示各模块操作量对比 - 实现菜单分组柱状图可视化,支持点击筛选功能 - 添加分类模块明细折叠面板,展示具体模块统计数据 - 集成后端菜单分组绩效接口,支持按一级菜单路径过滤 - 添加当前分类筛选标签显示,增强用户体验 - 优化图表渲染逻辑,增加空数据情况下的图表清理 - 完善响应式布局,适配不同屏幕尺寸调整
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.klp.system.domain.vo.OperModuleStatVO" id="OperModuleStatResult">
|
||||
<result property="menuGroup" column="menu_group"/>
|
||||
<result property="operName" column="oper_name"/>
|
||||
<result property="title" column="title"/>
|
||||
<result property="totalCount" column="total_count"/>
|
||||
@@ -90,6 +91,9 @@
|
||||
<if test="title != null and title != ''">
|
||||
AND l.title LIKE CONCAT('%', #{title}, '%')
|
||||
</if>
|
||||
<if test="operPagePrefix != null and operPagePrefix != ''">
|
||||
AND l.oper_page LIKE CONCAT(#{operPagePrefix}, '%')
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY l.title
|
||||
ORDER BY total_count DESC
|
||||
@@ -126,6 +130,9 @@
|
||||
<if test="title != null and title != ''">
|
||||
AND l.title LIKE CONCAT('%', #{title}, '%')
|
||||
</if>
|
||||
<if test="operPagePrefix != null and operPagePrefix != ''">
|
||||
AND l.oper_page LIKE CONCAT(#{operPagePrefix}, '%')
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY l.oper_name, l.dept_name
|
||||
ORDER BY total_count DESC
|
||||
@@ -159,6 +166,9 @@
|
||||
<if test="title != null and title != ''">
|
||||
AND l.title LIKE CONCAT('%', #{title}, '%')
|
||||
</if>
|
||||
<if test="operPagePrefix != null and operPagePrefix != ''">
|
||||
AND l.oper_page LIKE CONCAT(#{operPagePrefix}, '%')
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY l.oper_name, l.title
|
||||
ORDER BY l.oper_name, total_count DESC
|
||||
@@ -190,7 +200,57 @@
|
||||
<if test="title != null and title != ''">
|
||||
AND l.title LIKE CONCAT('%', #{title}, '%')
|
||||
</if>
|
||||
<if test="operPagePrefix != null and operPagePrefix != ''">
|
||||
AND l.oper_page LIKE CONCAT(#{operPagePrefix}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- 按菜单分组+模块明细统计(基于 oper_page 匹配一级菜单 path) -->
|
||||
<select id="selectMenuGroupDetail" parameterType="com.klp.system.domain.bo.OperPerformanceQuery" resultMap="OperModuleStatResult">
|
||||
SELECT
|
||||
CASE
|
||||
WHEN l.oper_page LIKE '/post%' THEN '驾驶舱'
|
||||
WHEN l.oper_page LIKE '/wip%' THEN '生产管控'
|
||||
WHEN l.oper_page LIKE '/stock%' THEN '数字仓储'
|
||||
WHEN l.oper_page LIKE '/quality%' THEN '质量管理'
|
||||
WHEN l.oper_page LIKE '/crm%' THEN '销售中心'
|
||||
WHEN l.oper_page LIKE '/helper%' THEN '生产辅助'
|
||||
WHEN l.oper_page LIKE '/aps%' THEN '科学排产'
|
||||
WHEN l.oper_page LIKE '/file%' THEN '文件夹'
|
||||
ELSE '其他'
|
||||
END AS menu_group,
|
||||
l.title,
|
||||
COUNT(1) AS total_count,
|
||||
SUM(CASE WHEN l.business_type = 1 THEN 1 ELSE 0 END) AS add_count,
|
||||
SUM(CASE WHEN l.business_type = 2 THEN 1 ELSE 0 END) AS edit_count,
|
||||
SUM(CASE WHEN l.business_type = 3 THEN 1 ELSE 0 END) AS delete_count,
|
||||
SUM(CASE WHEN l.business_type = 0 THEN 1 ELSE 0 END) AS other_count,
|
||||
ROUND(SUM(CASE WHEN l.status = 0 THEN 1 ELSE 0 END) * 100.0 / COUNT(1), 2) AS success_rate,
|
||||
COUNT(DISTINCT l.oper_name) AS person_count
|
||||
FROM sys_oper_log l
|
||||
<where>
|
||||
<if test="beginTime != null and beginTime != ''">
|
||||
AND l.oper_time >= #{beginTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND l.oper_time <= #{endTime}
|
||||
</if>
|
||||
<if test="deptName != null and deptName != ''">
|
||||
AND l.dept_name LIKE CONCAT('%', #{deptName}, '%')
|
||||
</if>
|
||||
<if test="operName != null and operName != ''">
|
||||
AND l.oper_name LIKE CONCAT('%', #{operName}, '%')
|
||||
</if>
|
||||
<if test="title != null and title != ''">
|
||||
AND l.title LIKE CONCAT('%', #{title}, '%')
|
||||
</if>
|
||||
<if test="operPagePrefix != null and operPagePrefix != ''">
|
||||
AND l.oper_page LIKE CONCAT(#{operPagePrefix}, '%')
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY menu_group, l.title
|
||||
ORDER BY FIELD(menu_group, '驾驶舱','生产管控','数字仓储','质量管理','销售中心','生产辅助','科学排产','文件夹','其他'), total_count DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user