diff --git a/src/main/resources/egovframework/sqlmap/let/sym/log/clg/EgovLoginLog_SQL_Postgresql.xml b/src/main/resources/egovframework/sqlmap/let/sym/log/clg/EgovLoginLog_SQL_Postgresql.xml index 80c7628f..98350640 100644 --- a/src/main/resources/egovframework/sqlmap/let/sym/log/clg/EgovLoginLog_SQL_Postgresql.xml +++ b/src/main/resources/egovframework/sqlmap/let/sym/log/clg/EgovLoginLog_SQL_Postgresql.xml @@ -253,9 +253,9 @@ , LETTNADMINLOG b , COMVNUSERMASTER c WHERE 1=1 - /* + AND a.use_yn='Y' - */ + AND a.method_cd='A' AND a.METHOD_NM =b.PROGRM_FILE_NM AND b.CONECT_ID =c.ESNTL_ID diff --git a/src/main/resources/egovframework/sqlmap/ve/prcs/VEPrcsAplctPrd_SQL_Postgresql.xml b/src/main/resources/egovframework/sqlmap/ve/prcs/VEPrcsAplctPrd_SQL_Postgresql.xml index fb089817..01e6e49e 100644 --- a/src/main/resources/egovframework/sqlmap/ve/prcs/VEPrcsAplctPrd_SQL_Postgresql.xml +++ b/src/main/resources/egovframework/sqlmap/ve/prcs/VEPrcsAplctPrd_SQL_Postgresql.xml @@ -1785,7 +1785,9 @@ /* 설문지 정보 */ - I10.qustnr_tmplat_id AS qustnrTmplatId , + /* + I10.qustnr_tmplat_id AS qustnrTmplatId , + */ COALESCE(qustnr01.QESTNR_ID_10, I10.qestnr_id_10) AS qestnrId10 , COALESCE(qustnr01.QESTNR_ID_20, I20.qestnr_id_20) AS qestnrId20 , @@ -1863,34 +1865,71 @@ LEFT OUTER JOIN ( /* 현재 진행가능한 설문 정보(기본, 선생님, 강사) 여러개가 있는 경우는 최근 등록된 설문 정보를 가져온다.*/ + /* SELECT a.QUSTNR_TMPLAT_ID , a.SITE_ID , - /* - (CASE WHEN a.STTUS = '1' THEN a.QESTNR_ID END) AS QESTNR_ID_10 - */ + (CASE WHEN a.STTUS = '1' THEN a.QESTNR_ID ELSE a.QESTNR_ID END) AS QESTNR_ID_10 FROM LETTNQESTNRINFO a WHERE a.SITE_ID IN ('60','70','80') - /* - 각 개별적인 분류를 볼때 - a.SITE_ID = siteId - */ - /* - AND a.SITE_ID_CD IN ('10') - */ - /* - AND a.STTUS IN ('1') - */ AND TO_CHAR(NOW(), 'YYYY.MM.DD') BETWEEN COALESCE(a.qustnr_bgnde, '2000.01.01') AND COALESCE(a.qustnr_endde, '9999.12.31') - ORDER BY coalesce(a.qustnr_bgnde,'9999.12.31') + ORDER BY coalesce(a.qustnr_bgnde,'9999.12.31') + */ + + + SELECT site_id, min(qestnr_id_10) as qestnr_id_10 + FROM ( + select + a.QUSTNR_TMPLAT_ID , + a.SITE_ID , + /* (CASE WHEN a.STTUS = '1' THEN a.QESTNR_ID END) AS QESTNR_ID_10 */ + (case + when a.STTUS = '1' then a.QESTNR_ID + else a.QESTNR_ID + end) as QESTNR_ID_10 + from + LETTNQESTNRINFO a + , ( + + select + b.edu_strt_pnttm + , b.lctr_div_cd + from + ve_edu_aplct a + , ve_prcs_aplct_prd b + where + 1 = 1 + and a.user_id = #userId# + and a.prcs_ord=b.prcs_aplct_prd_ord + + )b0 + where + a.SITE_ID in ('60', '70', '80')/* 각 개별적인 분류를 볼때 a.SITE_ID = siteId */ + and a.site_id=b0.lctr_div_cd + /* + AND a.SITE_ID_CD IN ('10') */ + /* + AND a.STTUS IN ('1') */ + + and b0.edu_strt_pnttm between coalesce(a.qustnr_bgnde, + '2000.01.01') + and coalesce(a.qustnr_endde, + '9999.12.31') + + order by + coalesce(a.qustnr_bgnde, + '9999.12.31') + )a0 + group by a0.site_id + ) I10 ON (1 = 1 and a.lctr_div_cd = I10.site_id)