2025-11-06 17:11 시정명령 설문 오류 수정

This commit is contained in:
myname 2025-11-06 17:11:41 +09:00
parent 3975b6df2e
commit ecba06bcd4
2 changed files with 56 additions and 17 deletions

View File

@ -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

View File

@ -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)