fix (farm): 大屏

- 统计图bug
This commit is contained in:
达富斌
2025-10-09 19:01:01 +08:00
parent 8989ccf1ab
commit 2fe5577931
9 changed files with 87 additions and 25 deletions

View File

@@ -46,5 +46,24 @@
</if>
</where>
</select>
<select id="selectDeviceTypeCount"
resultType="cn.iocoder.yudao.module.farm.controller.admin.digitalcockpit.vo.DeviceInfoRespVO$DeviceInfo">
SELECT
device_type as deviceTypeName,
COUNT(*) as deviceCount
FROM farm_device_info
<where>
deleted = b'0'
<if test="baseId != null and baseId != ''">
AND base_id = #{baseId}
</if>
</where>
GROUP BY device_type
ORDER BY deviceCount DESC
</select>
</mapper>