2023-06-08 11:33 통계 쿼리 수정
This commit is contained in:
parent
f680e0ae4e
commit
49f212e169
@ -16,6 +16,9 @@ public interface VEEduMIXService {
|
||||
|
||||
//Page List
|
||||
List<VEEduAplctVO> selectPagingList(VEEduAplctVO paramVO) throws Exception;
|
||||
|
||||
/* 2023-0607 월별교육과정 통계와 데이터가 맞지 않아 쿼리 수정함 */
|
||||
List<VEEduAplctVO> selectPagingList_20230607(VEEduAplctVO paramVO) throws Exception;
|
||||
|
||||
List<VEEduAplctVO> selectAdultRsltPagingList(VEEduAplctVO paramVO) throws Exception;
|
||||
|
||||
|
||||
@ -43,6 +43,12 @@ public class VEEduMIXDAO extends EgovAbstractDAO {
|
||||
return tlist;
|
||||
}
|
||||
|
||||
public List<VEEduAplctVO> selectPagingList_20230607(VEEduAplctVO paramVO) throws Exception {
|
||||
@SuppressWarnings("unchecked")
|
||||
List<VEEduAplctVO> tlist = (List<VEEduAplctVO>) list("VEEduMIXDAO.selectPagingList_20230607", paramVO);
|
||||
return tlist;
|
||||
}
|
||||
|
||||
//성인 찾교 결과 페이지
|
||||
public List<VEEduAplctVO> selectAdultRsltPagingList(VEEduAplctVO paramVO) throws Exception {
|
||||
@SuppressWarnings("unchecked")
|
||||
|
||||
@ -41,6 +41,11 @@ public class VEEduMIXServiceImpl implements VEEduMIXService {
|
||||
return vEEduMIXDAO.selectPagingList(paramVO);
|
||||
}
|
||||
|
||||
//paging List
|
||||
public List<VEEduAplctVO> selectPagingList_20230607(VEEduAplctVO paramVO) throws Exception{
|
||||
return vEEduMIXDAO.selectPagingList_20230607(paramVO);
|
||||
}
|
||||
|
||||
public List<VEEduAplctVO> selectAdultRsltPagingList(VEEduAplctVO paramVO) throws Exception{
|
||||
return vEEduMIXDAO.selectAdultRsltPagingList(paramVO);
|
||||
}
|
||||
|
||||
@ -156,7 +156,9 @@ public class LctrAplctMngController {
|
||||
//2. pageing step2
|
||||
vEEduAplctVO = this.setPagingStep2(vEEduAplctVO, paginationInfo);
|
||||
vEEduAplctVO.setOrderByQuery("A.SBMT_PNTTM DESC");
|
||||
List<VEEduAplctVO> vEEduAplctVOList = vEEduMIXService.selectPagingList(vEEduAplctVO);
|
||||
vEEduAplctVO.setOrderByQuery("AA.sbmtPnttm DESC");
|
||||
|
||||
List<VEEduAplctVO> vEEduAplctVOList = vEEduMIXService.selectPagingList_20230607(vEEduAplctVO);
|
||||
vEEduAplctVOList = egovCryptoUtil.decryptVEEduAplctVOList(vEEduAplctVOList);
|
||||
|
||||
//3.pageing step3
|
||||
@ -409,7 +411,8 @@ public class LctrAplctMngController {
|
||||
// 교육콘텐츠
|
||||
vEEduAplctVO.setLctrDivCd(VeConstants.LCTR_DIV_CD_40);
|
||||
|
||||
List<VEEduAplctVO> list = vEEduMIXService.selectPagingList(vEEduAplctVO);
|
||||
//List<VEEduAplctVO> list = vEEduMIXService.selectPagingList(vEEduAplctVO);
|
||||
List<VEEduAplctVO> list = vEEduMIXService.selectPagingList_20230607(vEEduAplctVO);
|
||||
list = egovCryptoUtil.decryptVEEduAplctVOList(list);
|
||||
|
||||
list.forEach( vo -> {
|
||||
|
||||
@ -967,6 +967,198 @@
|
||||
</isNotEqual>
|
||||
</select>
|
||||
|
||||
<!-- 강사 정보 L page -->
|
||||
<select id="VEEduMIXDAO.selectPagingList_20230607" parameterClass="VEEduAplctVO" resultClass="VEEduAplctVO">
|
||||
|
||||
SELECT
|
||||
COUNT(1) OVER() AS totCnt ,
|
||||
ROWNUM AS rowNo ,
|
||||
aa.*
|
||||
|
||||
, IF(aa.aprvlCd='20'
|
||||
AND aa.isEndCnt > 0
|
||||
and length(aa.eduStrtDt)=8
|
||||
and length(aa.eduEndDt)=8
|
||||
|
||||
, CONCAT(
|
||||
SUBSTRING(aa.eduStrtDt,1,4), '.', SUBSTRING(aa.eduStrtDt,5,2), '.', SUBSTRING(aa.eduStrtDt,7,2)
|
||||
, '~'
|
||||
, SUBSTRING(aa.eduEndDt,1,4), '.', SUBSTRING(aa.eduEndDt,5,2), '.', SUBSTRING(aa.eduEndDt,7,2)
|
||||
)
|
||||
, ''
|
||||
) AS eduDt
|
||||
|
||||
|
||||
FROM (
|
||||
SELECT
|
||||
c.blng ,
|
||||
c.full_name AS fullName,
|
||||
|
||||
/*수강신청일자*/
|
||||
c.sbmt_pnttm AS sbmtPnttm,
|
||||
c.prps ,
|
||||
c.edu_trgt AS eduTrgt,
|
||||
c.edu_prsnl AS eduPrsnl,
|
||||
c.edu_aplct_ord AS eduAplctOrd,
|
||||
c.aprvl_cd AS aprvlCd,
|
||||
c.instt_div_cd AS insttDivCd,
|
||||
c.clphone ,
|
||||
c.phone ,
|
||||
c.email ,
|
||||
|
||||
/*이수과정명*/
|
||||
( SELECT S2.PRCS_NM
|
||||
FROM VE_EDU_APLCT_ONLN S1
|
||||
INNER JOIN VE_PRCS S2
|
||||
ON S1.PRCS_ORD = S2.PRCS_ORD
|
||||
WHERE 1 =1
|
||||
AND S1.EDU_APLCT_ORD = c.EDU_APLCT_ORD
|
||||
GROUP BY S1.EDU_APLCT_ORD
|
||||
ORDER BY S1.PRCS_ORD
|
||||
)
|
||||
AS prcsGroupNm ,
|
||||
|
||||
/*전체이수과정수*/
|
||||
( SELECT COUNT(*)
|
||||
FROM ve_prcs_cmplt_detail a0
|
||||
INNER JOIN ve_prcs b0
|
||||
ON a0.prcs_ord = b0.prcs_ord
|
||||
INNER JOIN ve_prcs_onln_cntnt c0
|
||||
ON c0.prcs_onln_cntnt_ord = a0.prcs_onln_cntnt_ord
|
||||
WHERE 1 =1
|
||||
AND a0.edu_aplct_ord =c.EDU_APLCT_ORD
|
||||
AND IFNULL(a0.sbmt_yn,'N') ='Y'
|
||||
)
|
||||
AS isEndCnt
|
||||
|
||||
/*교육시작일*/
|
||||
,( SELECT
|
||||
MAX(S1.edu_strt_dt)
|
||||
FROM ve_prcs_cmplt_detail S1 ,
|
||||
ve_prcs S2 ,
|
||||
ve_prcs_onln_cntnt s3
|
||||
WHERE 1 =1
|
||||
AND s1.prcs_ord =s2.prcs_ord
|
||||
AND S1.EDU_APLCT_ORD = c.EDU_APLCT_ORD
|
||||
AND s1.prcs_onln_cntnt_ord = s3.prcs_onln_cntnt_ord
|
||||
AND s1.sbmt_yn='Y'
|
||||
|
||||
GROUP BY S1.EDU_APLCT_ORD
|
||||
)
|
||||
AS eduStrtDt
|
||||
/*교육종료일*/
|
||||
,( SELECT
|
||||
MAX(S1.edu_end_dt)
|
||||
FROM ve_prcs_cmplt_detail S1 ,
|
||||
ve_prcs S2 ,
|
||||
ve_prcs_onln_cntnt s3
|
||||
WHERE 1 =1
|
||||
AND s1.prcs_ord =s2.prcs_ord
|
||||
AND S1.EDU_APLCT_ORD = c.EDU_APLCT_ORD
|
||||
AND s1.prcs_onln_cntnt_ord = s3.prcs_onln_cntnt_ord
|
||||
AND s1.sbmt_yn='Y'
|
||||
GROUP BY S1.EDU_APLCT_ORD
|
||||
)
|
||||
AS eduEndDt
|
||||
|
||||
/*강의이수 등록일자 */
|
||||
,( SELECT
|
||||
MAX(S1.sbmt_pnttm)
|
||||
FROM ve_prcs_cmplt_detail S1 ,
|
||||
ve_prcs S2 ,
|
||||
ve_prcs_onln_cntnt s3
|
||||
WHERE 1 =1
|
||||
AND s1.prcs_ord =s2.prcs_ord
|
||||
AND S1.EDU_APLCT_ORD = c.EDU_APLCT_ORD
|
||||
AND s1.prcs_onln_cntnt_ord = s3.prcs_onln_cntnt_ord
|
||||
AND s1.sbmt_yn='Y'
|
||||
GROUP BY S1.EDU_APLCT_ORD
|
||||
)
|
||||
AS eduRegDt
|
||||
|
||||
/*강의이수 인원 */
|
||||
,
|
||||
( SELECT SUM(S1.edu_prsnl)
|
||||
FROM ve_prcs_cmplt_detail S1 ,
|
||||
ve_prcs S2 ,
|
||||
ve_prcs_onln_cntnt s3
|
||||
WHERE 1 =1
|
||||
AND s1.prcs_ord =s2.prcs_ord
|
||||
AND S1.EDU_APLCT_ORD = c.EDU_APLCT_ORD
|
||||
AND s1.prcs_onln_cntnt_ord = s3.prcs_onln_cntnt_ord
|
||||
AND s1.sbmt_yn='Y'
|
||||
GROUP BY S1.EDU_APLCT_ORD
|
||||
)
|
||||
AS endEduPrsnl
|
||||
|
||||
FROM ve_edu_aplct c
|
||||
WHERE 1 =1
|
||||
AND IFNULL(C.USE_YN, 'Y') = 'Y'
|
||||
AND C.SBMT_YN = 'Y'
|
||||
AND C.LCTR_DIV_CD = '40'
|
||||
|
||||
/*
|
||||
AND c.aprvl_cd = '20'
|
||||
*/
|
||||
|
||||
|
||||
<isNotEmpty property="searchSmbtStartDt">
|
||||
/*수강신청일자시작일*/
|
||||
AND TO_CHAR(C.SBMT_PNTTM, 'YYYYMMDD') <![CDATA[ >= ]]> REPLACE(#searchSmbtStartDt#, '.' , '')
|
||||
</isNotEmpty>
|
||||
|
||||
<isNotEmpty property="searchSmbtEndDt">
|
||||
/*수강신청일자마감일*/
|
||||
AND TO_CHAR(C.SBMT_PNTTM, 'YYYYMMDD') <![CDATA[ <= ]]> REPLACE(#searchSmbtEndDt#, '.' , '')
|
||||
</isNotEmpty>
|
||||
|
||||
<isNotEmpty property="searchFullName">
|
||||
/*교육콘텐츠 신청자 검색*/
|
||||
AND (
|
||||
C.FULL_NAME like concat('%', #searchFullName#, '%')
|
||||
OR C.BLNG like concat('%', #searchFullName#, '%')
|
||||
)
|
||||
|
||||
</isNotEmpty>
|
||||
|
||||
)aa
|
||||
|
||||
WHERE 1=1
|
||||
<isNotEmpty property="searchStatus2">
|
||||
/* 교육콘텐츠 신청 > 수강신청 목록 셀렉트박스 검색자 */
|
||||
|
||||
|
||||
<isEqual property="searchStatus2" compareValue="90">
|
||||
AND aa.aprvlCd = '20'
|
||||
AND aa.isEndCnt > 0
|
||||
</isEqual>
|
||||
<isNotEqual property="searchStatus2" compareValue="90">
|
||||
AND aa.aprvlCd = #searchStatus2#
|
||||
AND 0 >= aa.isEndCnt
|
||||
</isNotEqual>
|
||||
|
||||
</isNotEmpty>
|
||||
|
||||
ORDER BY 1 =1
|
||||
/*
|
||||
ORDER BY 1 =1
|
||||
, AA.sbmtPnttm DESC
|
||||
LIMIT 10 OFFSET 0
|
||||
*/
|
||||
|
||||
<isEmpty property="orderByQuery">
|
||||
, AA.sbmtPnttm DESC
|
||||
</isEmpty>
|
||||
<isNotEmpty property="orderByQuery">
|
||||
, $orderByQuery$
|
||||
</isNotEmpty>
|
||||
<isNotEqual property="mode" compareValue="EXCEL">
|
||||
LIMIT #recordCountPerPage# OFFSET #firstIndex#
|
||||
</isNotEqual>
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 성인 교육 결과 L page -->
|
||||
<select id="VEEduMIXDAO.selectAdultRsltPagingList" parameterClass="VEEduAplctVO" resultClass="VEEduAplctVO">
|
||||
SELECT
|
||||
|
||||
@ -925,17 +925,23 @@
|
||||
SUM(b.edu_prsnl) AS CNT
|
||||
|
||||
FROM ve_prcs a
|
||||
LEFT OUTER JOIN (
|
||||
|
||||
LEFT OUTER JOIN (
|
||||
SELECT d.sbmt_pnttm
|
||||
, d.edu_prsnl
|
||||
, d.prcs_ord
|
||||
FROM ve_edu_aplct c
|
||||
, ve_prcs_cmplt_detail d
|
||||
, ve_prcs e
|
||||
, ve_prcs_onln_cntnt f
|
||||
WHERE c.edu_aplct_ord = d.edu_aplct_ord
|
||||
AND DATE_FORMAT(d.sbmt_pnttm,'%Y') = #year#
|
||||
AND c.aprvl_cd = '20'
|
||||
AND IFNULL(C.USE_YN, 'Y') = 'Y'
|
||||
AND IFNULL(C.USE_YN, 'Y') = 'Y'
|
||||
AND C.SBMT_YN ='Y'
|
||||
AND e.prcs_ord =d.prcs_ord
|
||||
AND e.use_yn ='Y'
|
||||
AND d.prcs_ord =f.prcs_ord
|
||||
AND d.prcs_onln_cntnt_ord =f.prcs_onln_cntnt_ord
|
||||
|
||||
)b
|
||||
ON (
|
||||
@ -1014,10 +1020,17 @@
|
||||
, c.edu_aplct_ord
|
||||
FROM ve_edu_aplct c
|
||||
, ve_prcs_cmplt_detail d
|
||||
, ve_prcs e
|
||||
, ve_prcs_onln_cntnt f
|
||||
WHERE c.edu_aplct_ord = d.edu_aplct_ord
|
||||
AND DATE_FORMAT(d.sbmt_pnttm,'%Y') = #year#
|
||||
AND c.aprvl_cd = '20'
|
||||
AND IFNULL(C.USE_YN, 'Y') = 'Y'
|
||||
AND IFNULL(C.USE_YN, 'Y') = 'Y'
|
||||
AND C.SBMT_YN ='Y'
|
||||
AND e.prcs_ord =d.prcs_ord
|
||||
AND e.use_yn ='Y'
|
||||
AND d.prcs_ord =f.prcs_ord
|
||||
AND d.prcs_onln_cntnt_ord =f.prcs_onln_cntnt_ord
|
||||
|
||||
)b
|
||||
ON (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user