Browse Source

Merge branch 'dev_bugfix_ljj' of http://git.elinkit.com.cn:7070/r/epmet-cloud into develop

master
jianjun 4 years ago
parent
commit
78043ae8ac
  1. 36
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml

36
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml

@ -323,22 +323,8 @@
agency.ORGANIZATION_NAME AS agencyName,
agency.LEVEL AS level,
agency.CUSTOMER_ID as customerId,
( CASE WHEN agency.longitude is null THEN
( SELECT longitude FROM customer_agency
WHERE del_flag = '0' AND customer_id = (SELECT customer_id FROM customer_agency WHERE id = agency.id)
ORDER BY pid ASC LIMIT 1
)
ELSE agency.longitude
END
) longitude,
( CASE WHEN agency.latitude is null THEN
( SELECT latitude FROM customer_agency
WHERE del_flag = '0' AND customer_id = (SELECT customer_id FROM customer_agency WHERE id = agency.id)
ORDER BY pid ASC LIMIT 1
)
ELSE agency.latitude
END
) latitude
agency.longitude,
agency.latitude
FROM
CUSTOMER_AGENCY agency
WHERE
@ -423,22 +409,8 @@
ca.pids pids,
ca.pid pid,
ca.level level,
( CASE WHEN ca.longitude is null THEN
( SELECT longitude FROM customer_agency
WHERE del_flag = '0' AND customer_id = (SELECT customer_id FROM customer_agency WHERE id = ca.id)
ORDER BY pid ASC LIMIT 1
)
ELSE ca.longitude
END
) longitude,
( CASE WHEN ca.latitude is null THEN
( SELECT latitude FROM customer_agency
WHERE del_flag = '0' AND customer_id = (SELECT customer_id FROM customer_agency WHERE id = ca.id)
ORDER BY pid ASC LIMIT 1
)
ELSE ca.latitude
END
) latitude
ca.longitude,
ca.latitude
FROM
customer_agency ca
INNER JOIN customer_staff_agency csa ON ca.id = csa.agency_id

Loading…
Cancel
Save