|
|
@ -756,10 +756,11 @@ |
|
|
|
cg.mobile, |
|
|
|
<!-- 网格没有经纬度时获取客户根组织下的 --> |
|
|
|
IFNULL(cg.longitude,ca.longitude) longitude, |
|
|
|
IFNULL(cg.latitude,ca.latitude) latitude |
|
|
|
IFNULL(cg.latitude,ca.latitude) latitude, |
|
|
|
ca.organization_name |
|
|
|
FROM |
|
|
|
customer_grid cg |
|
|
|
INNER JOIN customer_agency ca ON ca.pid = '0' AND ca.customer_id = cg.customer_id |
|
|
|
INNER JOIN customer_agency ca ON (ca.ID = cg.PID AND ca.customer_id = cg.customer_id) |
|
|
|
WHERE |
|
|
|
cg.del_flag = '0' |
|
|
|
AND ca.del_flag = '0' |
|
|
|