From 41f95342c3b08f6ba5929899834d11b8f2657a95 Mon Sep 17 00:00:00 2001 From: leebj Date: Mon, 1 Jul 2024 16:45:02 +0900 Subject: [PATCH] no message --- .../java/cokr/xit/applib/ogdp/dao/OgdpMapper.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/cokr/xit/applib/ogdp/dao/OgdpMapper.java b/src/main/java/cokr/xit/applib/ogdp/dao/OgdpMapper.java index d7202ca..b7b9937 100644 --- a/src/main/java/cokr/xit/applib/ogdp/dao/OgdpMapper.java +++ b/src/main/java/cokr/xit/applib/ogdp/dao/OgdpMapper.java @@ -26,7 +26,7 @@ public interface OgdpMapper extends AbstractMapper { @Select(SQLUtil.SCRIPT_START+""" /* 전체 기관,부서 목록 조회(ogdpMapper.selectAllOgdpList) */ SELECT CONCAT(A.INST_CD,'/',B.DEPT_CD) AS OGDP_CD - , CONCAT(A.INST_NM,' / ',B.DEPT_NM) AS OGDP_NM + , CONCAT(A.SGG_NM, ' / ', A.INST_NM, ' : ', B.DEPT_NM) AS OGDP_NM , A.INST_CD , A.INST_NM , B.DEPT_CD @@ -37,7 +37,7 @@ public interface OgdpMapper extends AbstractMapper { LEFT OUTER JOIN TB_DEPT B ON (A.INST_CD = B.INST_CD) UNION SELECT ('default/default') AS OGDP_CD - , CONCAT('기본 기관',' / ','기본 부서') AS OGDP_NM + , CONCAT('기본 시군구',' / ','기본 기관', ' : ', '기본 부서') AS OGDP_NM , 'default' AS INST_CD , '기본 기관' AS INST_NM , 'default' AS DEPT_CD @@ -56,7 +56,7 @@ public interface OgdpMapper extends AbstractMapper { @Select(SQLUtil.SCRIPT_START+""" /* 사용가능한 기관,부서 목록 조회(ogdpMapper.selectAbleOgdpList) */ SELECT CONCAT(A.INST_CD,'/',B.DEPT_CD) AS OGDP_CD - , CONCAT(A.INST_NM,' / ',B.DEPT_NM) AS OGDP_NM + , CONCAT(A.SGG_NM, ' / ', A.INST_NM, ' : ', B.DEPT_NM) AS OGDP_NM , A.INST_CD , A.INST_NM , B.DEPT_CD @@ -76,7 +76,7 @@ public interface OgdpMapper extends AbstractMapper { UNION SELECT 'default/default' AS OGDP_CD - , CONCAT('기본 기관',' / ','기본 부서') AS OGDP_NM + , CONCAT('기본 시군구',' / ','기본 기관', ' : ', '기본 부서') AS OGDP_NM , 'default' AS INST_CD , '기본 기관' AS INST_NM , 'default' AS DEPT_CD @@ -134,7 +134,8 @@ public interface OgdpMapper extends AbstractMapper { /* 모든 시군구 조회(ogdpMapper.selectAllSggList) */ SELECT SGG_CD , SGG_NM - FROM TB_SGG + , (SELECT (CASE WHEN COUNT(*) > 0 THEN 'Y' ELSE 'N' END) FROM TB_USER WHERE NSTT_CD = A.INST_CD) AS USER_USE_YN + FROM TB_SGG A WHERE USE_YN = 'Y' """+SQLUtil.SCRIPT_END) List selectAllSggList();