From 582bb2627712f66157b5608c8f5798775fc38266 Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期五, 22 八月 2025 15:20:31 +0800 Subject: [PATCH] 设备管理首页 --- lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamEquipmentMapper.xml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 48 insertions(+), 0 deletions(-) diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamEquipmentMapper.xml b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamEquipmentMapper.xml index bea93b0..b32141a 100644 --- a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamEquipmentMapper.xml +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamEquipmentMapper.xml @@ -77,4 +77,52 @@ on e.id = ext.id ${ew.customSqlSegment} </select> + <select id="echartsList" resultType="org.jeecg.modules.eam.dto.EchartsDto"> + SELECT COUNT + ( t.technology_status ) AS "value", + item.item_text AS "name", + item.item_value AS "code", + ( SELECT COUNT ( a.id ) FROM eam_equipment_extend a WHERE a.technology_status IS NOT NULL + <if test="ids != null and ids != ''"> + AND a.id IN + <foreach collection="ids" item="id" index="index" open="(" close=")" separator=","> + #{id} + </foreach> + </if> + ) AS "total", + concat ( + round( + ISNULL ( + COUNT ( t.id ) / ( SELECT COUNT ( a.id ) FROM eam_equipment_extend a WHERE a.technology_status IS NOT NULL + <if test="ids != null and ids != ''"> + AND a.id IN + <foreach collection="ids" item="id" index="index" open="(" close=")" separator=","> + #{id} + </foreach> + </if>), + 0 + ) * 100, + 2 + ), + '%' + ) AS "percentage" + FROM + sys_dict c + LEFT JOIN sys_dict_item item ON c.id = item.dict_id + LEFT JOIN eam_equipment_extend t ON t.technology_status = item.item_value + <if test="ids != null and ids != ''"> + AND t.id IN + <foreach collection="ids" item="id" index="index" open="(" close=")" separator=","> + #{id} + </foreach> + </if> + WHERE + c.dict_code = 'equipment_technology_status' + GROUP BY + item.item_text, + t.technology_status, + item.item_value + ORDER BY + item.item_value + </select> </mapper> -- Gitblit v1.9.3