From 4b0264ef65356a21b868e6df855b8ef254b32cd4 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 23 Dec 2021 14:29:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=20=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E8=B7=9F=E7=BB=84=E7=BB=87=E7=9A=84=E4=B8=AD=E5=BF=83=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/CustomerAgencyDao.xml | 36 +++---------------- 1 file changed, 4 insertions(+), 32 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml index eeca702112..4e7660f651 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml @@ -315,22 +315,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 @@ -415,22 +401,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