update 首页数据看板

This commit is contained in:
Lemon
2026-05-09 14:34:14 +08:00
parent f3300fb13b
commit ecded2ef39
11 changed files with 171 additions and 9 deletions

View File

@@ -770,4 +770,20 @@
and station_lng != ''
and station_lat != ''
</select>
<select id="getCityDeviceCount" resultType="com.jsowell.pile.vo.web.CityDeviceCountVO">
SELECT
CASE
WHEN address LIKE '%省%' AND address LIKE '%市%' THEN
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(address, '省', -1), '市', 1), '市')
WHEN address LIKE '%市%' THEN
LEFT(SUBSTRING_INDEX(address, '市', 1), 3)
ELSE '其他'
END AS cityName,
COUNT(*) AS deviceCount
FROM pile_station_info
WHERE del_flag = '0' AND address IS NOT NULL AND address != ''
GROUP BY cityName
ORDER BY deviceCount DESC
</select>
</mapper>