场站列表增肌经纬度,距离数据压缩为2位小数
This commit is contained in:
parent
b48c2d48c1
commit
1fd977cfd8
@ -252,6 +252,8 @@
|
||||
select
|
||||
cs.charging_station_id as chargingStationId,
|
||||
cs.name as name,
|
||||
cs.longitude as longitude,
|
||||
cs.latitude as latitude,
|
||||
cs.parking_instructions as parkingInstructions,
|
||||
cs.detailed_address as detailedAddress,
|
||||
cs.service_facilities as serviceFacilities,
|
||||
@ -274,7 +276,7 @@
|
||||
= 'service_facilities' and parent_id > 0 and del_flag = 0) as serviceFacilitiesName,
|
||||
ROUND(ACOS(SIN((#{latitude} * 3.141593) / 180 ) *SIN((cs.latitude * 3.141593) / 180 ) +
|
||||
COS((#{latitude} * 3.141593) / 180 ) * COS((cs.latitude * 3.141593) / 180 ) *
|
||||
COS((#{longitude} * 3.141593) / 180 - (cs.longitude * 3.141593) / 180 ) ) * 6370.9968,4)AS distance
|
||||
COS((#{longitude} * 3.141593) / 180 - (cs.longitude * 3.141593) / 180 ) ) * 6370.9968,2)AS distance
|
||||
from xhpc_charging_station as cs
|
||||
where cs.del_flag =0 and cs.status =0
|
||||
and FIND_IN_SET(#{clientVisible},cs.client_visible)>0
|
||||
@ -307,6 +309,7 @@
|
||||
|
||||
<select id="getWXXhpcChargingStationMessage" resultType="java.util.Map">
|
||||
select charging_station_id as chargingStationId,
|
||||
longitude,latitude,
|
||||
(select type
|
||||
from xhpc_charging_pile
|
||||
where charging_station_id = charging_station_id
|
||||
@ -324,7 +327,7 @@
|
||||
img_id as imgId,
|
||||
remark as remark,
|
||||
ROUND(ACOS(SIN((#{latitude} * 3.141593) / 180) * SIN((latitude * 3.141593) / 180) + COS((#{latitude} * 3.141593) / 180) * COS((latitude * 3.141593) / 180) * COS((#{longitude} * 3.141593) / 180 - (longitude * 3.141593) / 180)) * 6370.9968,
|
||||
4) AS distance
|
||||
2) AS distance
|
||||
from xhpc_charging_station
|
||||
|
||||
where charging_station_id = #{chargingStationId}
|
||||
|
||||
@ -57,7 +57,7 @@ public class XhpcChargingStation extends BaseEntity {
|
||||
@Excel(name = "详细地址")
|
||||
private String detailedAddress;
|
||||
|
||||
/** 进度 */
|
||||
/** 经度 */
|
||||
@Excel(name = "经度")
|
||||
private String longitude;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user