|
|
@ -2464,8 +2464,11 @@ |
|
|
a.id id, |
|
|
a.id id, |
|
|
a.item_content itemContent, |
|
|
a.item_content itemContent, |
|
|
a.issue_latitude latitude, |
|
|
a.issue_latitude latitude, |
|
|
a.issue_longitude longitude, |
|
|
a.issue_longitude longitude |
|
|
round((st_distance_sphere(point(#{longitude}, #{latitude}), point(a.ISSUE_LONGITUDE, a.ISSUE_LATITUDE))) / 1000 ,1) as km |
|
|
<if test="longitude != null and longitude != '' and latitude != null and latitude != ''"> |
|
|
|
|
|
, |
|
|
|
|
|
round((st_distance_sphere(point(#{longitude}, #{latitude}), point(a.ISSUE_LONGITUDE, a.ISSUE_LATITUDE))) / 1000 ,1) as km |
|
|
|
|
|
</if> |
|
|
FROM |
|
|
FROM |
|
|
epdc_item a |
|
|
epdc_item a |
|
|
INNER JOIN ( |
|
|
INNER JOIN ( |
|
|
@ -2491,7 +2494,9 @@ |
|
|
<if test="statDate != null and statDate != ''"> |
|
|
<if test="statDate != null and statDate != ''"> |
|
|
AND DATE_FORMAT(a.created_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{statDate} |
|
|
AND DATE_FORMAT(a.created_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{statDate} |
|
|
</if> |
|
|
</if> |
|
|
HAVING km <![CDATA[ <= ]]> 10 |
|
|
<if test="longitude != null and longitude != '' and latitude != null and latitude != ''"> |
|
|
|
|
|
HAVING km <![CDATA[ <= ]]> 10 |
|
|
|
|
|
</if> |
|
|
ORDER BY |
|
|
ORDER BY |
|
|
a.created_time DESC, |
|
|
a.created_time DESC, |
|
|
a.all_dept_ids ASC |
|
|
a.all_dept_ids ASC |
|
|
|