update 首页地图显示站点数量-->显示枪口数量

This commit is contained in:
Lemon
2026-05-25 09:28:03 +08:00
parent ecded2ef39
commit 8e665212dd
3 changed files with 23 additions and 10 deletions

View File

@@ -23,4 +23,9 @@ public class StationMapVO {
* 纬度
*/
private String stationLat;
/**
* 充电枪口数量
*/
private Integer connectorCount;
}

View File

@@ -760,15 +760,23 @@
</select>
<select id="getStationMapData" resultType="com.jsowell.pile.vo.web.StationMapVO">
select station_name as stationName,
station_lng as stationLng,
station_lat as stationLat
from pile_station_info
where del_flag = '0'
and station_lng is not null
and station_lat is not null
and station_lng != ''
and station_lat != ''
select s.station_name as stationName,
s.station_lng as stationLng,
s.station_lat as stationLat,
COALESCE(c.connector_count, 0) as connectorCount
from pile_station_info s
left join (
select p.station_id, count(*) as connector_count
from pile_basic_info p
inner join pile_connector_info c on p.sn = c.pile_sn and c.del_flag = '0'
where p.del_flag = '0'
group by p.station_id
) c on s.id = c.station_id
where s.del_flag = '0'
and s.station_lng is not null
and s.station_lat is not null
and s.station_lng != ''
and s.station_lat != ''
</select>
<select id="getCityDeviceCount" resultType="com.jsowell.pile.vo.web.CityDeviceCountVO">