2023-11-14 09:36 청소년 강사 배치 작업
This commit is contained in:
parent
6fc9b2f645
commit
9aa0745c5e
@ -22,6 +22,8 @@ import kcc.ve.cmm.VeConstants;
|
||||
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEAsgnmMIXService;
|
||||
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEEduChasiInstrAsgnmService;
|
||||
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEInstrAsgnmVO;
|
||||
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEAutoAsgnmMIXService;
|
||||
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEAutoAsgnmVO;
|
||||
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctService;
|
||||
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctVO;
|
||||
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduChasiService;
|
||||
@ -39,6 +41,9 @@ public class CommonWebController {
|
||||
|
||||
@Resource(name = "vEEduMIXService")
|
||||
private VEEduMIXService vEEduMIXService;
|
||||
|
||||
@Resource(name = "vEAutoAsgnmMIXService")
|
||||
private VEAutoAsgnmMIXService vEAutoAsgnmMIXService;
|
||||
|
||||
//로그인 체크 util
|
||||
@Resource(name = "checkLoginUtil")
|
||||
@ -609,40 +614,48 @@ public class CommonWebController {
|
||||
vEEduAplctVO.setSearchInstrNm(egovCryptoUtil.encrypt(vEEduAplctVO.getSearchInstrNm()));
|
||||
}
|
||||
|
||||
//모든 리스트를 페이징 없이 다 가져온다.
|
||||
vEEduAplctVO.setPageIndex(0);
|
||||
|
||||
|
||||
//Step1.자동배정 차시 대상가져오기
|
||||
//강사가 할당안된 리스트만 가져온다.
|
||||
vEEduAplctVO.setSearchAsgnmAprvlCd("90");
|
||||
|
||||
//Step1.자동배정 대상 차시가져오기
|
||||
vEEduAplctVOList = vEEduMIXService.selectTngrRsltPagingList(vEEduAplctVO);
|
||||
}
|
||||
|
||||
|
||||
//step2.가능한 대상 강사 찾기
|
||||
//step2.배정 대상별 가능한 대상 강사 찾기
|
||||
{
|
||||
//step2-1.강사별 월별 시수이상을 받지 않은자 확인
|
||||
//step2-2.해당 차시 학교의 거주 강사 검색
|
||||
//step2-3.희망 지역 강사 검색
|
||||
for (int i=0;i<vEEduAplctVOList.size();i++) {
|
||||
//학교 지역, 희망일자가 필요
|
||||
VEEduAplctVO tChasiInfo = vEEduAplctVOList.get(i);
|
||||
|
||||
String s_addr = tChasiInfo.getAddr(); //지역명
|
||||
String s_eduHopeDt = tChasiInfo.getEduHopeDt(); //교육희망일자
|
||||
String s_addr = tChasiInfo.getAddr(); //지역명
|
||||
|
||||
System.out.println(s_eduHopeDt);
|
||||
System.out.println(s_addr);
|
||||
|
||||
|
||||
//step2-1.가능 강사중 월별 시수이상을 받지 않은자 & 해당 요일에 수업 가능한 강사 리스트
|
||||
VEAutoAsgnmVO vEAutoAsgnmVO = new VEAutoAsgnmVO();
|
||||
vEAutoAsgnmVO.setEduHopeMnt(s_eduHopeDt.substring(5,7));
|
||||
vEAutoAsgnmVO.setYr(s_eduHopeDt.substring(0,4));
|
||||
vEAutoAsgnmVO.setInstrDiv("10"); //10-청소년, 20-성인
|
||||
List<VEAutoAsgnmVO> vEInstrAssiEduAplctVOList = vEAutoAsgnmMIXService.selectInstrMntAsgnmtChasiList(vEAutoAsgnmVO);
|
||||
|
||||
//step2-2.해당 차시 학교의 거주 강사 검색
|
||||
//step2-3.희망 지역 강사 검색
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//step3-1.해당 차시에 강사 배정이 있는지 확인
|
||||
//step3-2.없으면 해당 차시에 강사 배정
|
||||
|
||||
//this.setInstrAsgnm(p_step01_list, vEInstrAsgnmVO, loginVO);
|
||||
|
||||
|
||||
//modelAndView.addObject("rsCnt", rs);
|
||||
modelAndView.addObject("result", "success");
|
||||
return modelAndView;
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
package kcc.ve.instr.tngrVisitEdu.eduInfo.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface VEAutoAsgnmMIXService {
|
||||
|
||||
//해당 배정 차시의 달에 강사에게 할당된 차시 정보
|
||||
List<VEAutoAsgnmVO> selectInstrMntAsgnmtChasiList(VEAutoAsgnmVO paramVO) throws Exception;
|
||||
|
||||
//해당 차시 학교에 거주하는 강사
|
||||
List<VEAutoAsgnmVO> selectRsdneInstrList(VEAutoAsgnmVO paramVO) throws Exception;
|
||||
}
|
||||
@ -0,0 +1,94 @@
|
||||
package kcc.ve.instr.tngrVisitEdu.eduInfo.service;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import kcc.com.cmm.ComDefaultVO;
|
||||
|
||||
|
||||
public class VEAutoAsgnmVO extends ComDefaultVO implements Serializable {
|
||||
/*
|
||||
* 교육신청테이블
|
||||
* */
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
//ve_edu_aplct - 자동 배정
|
||||
private String eduHopeMnt; //교육희망월 2023.11
|
||||
private String yr; //교육희망년 2023
|
||||
|
||||
private String instrDiv; //10-청소년, 20-성인
|
||||
|
||||
|
||||
private String chasi; //수업차시
|
||||
private String userId; //강사아이디
|
||||
private String rsdne; //강사거주지
|
||||
private String hopeEduFld; //희망교육부분
|
||||
private String asgnmTm; //할당된시간
|
||||
|
||||
|
||||
public String getEduHopeMnt() {
|
||||
return eduHopeMnt;
|
||||
}
|
||||
|
||||
public void setEduHopeMnt(String eduHopeMnt) {
|
||||
this.eduHopeMnt = eduHopeMnt;
|
||||
}
|
||||
|
||||
public String getYr() {
|
||||
return yr;
|
||||
}
|
||||
|
||||
public void setYr(String yr) {
|
||||
this.yr = yr;
|
||||
}
|
||||
|
||||
public String getInstrDiv() {
|
||||
return instrDiv;
|
||||
}
|
||||
|
||||
public void setInstrDiv(String instrDiv) {
|
||||
this.instrDiv = instrDiv;
|
||||
}
|
||||
|
||||
public String getChasi() {
|
||||
return chasi;
|
||||
}
|
||||
|
||||
public void setChasi(String chasi) {
|
||||
this.chasi = chasi;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getRsdne() {
|
||||
return rsdne;
|
||||
}
|
||||
|
||||
public void setRsdne(String rsdne) {
|
||||
this.rsdne = rsdne;
|
||||
}
|
||||
|
||||
public String getHopeEduFld() {
|
||||
return hopeEduFld;
|
||||
}
|
||||
|
||||
public void setHopeEduFld(String hopeEduFld) {
|
||||
this.hopeEduFld = hopeEduFld;
|
||||
}
|
||||
|
||||
public String getAsgnmTm() {
|
||||
return asgnmTm;
|
||||
}
|
||||
|
||||
public void setAsgnmTm(String asgnmTm) {
|
||||
this.asgnmTm = asgnmTm;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -73,5 +73,4 @@ public interface VEEduMIXService {
|
||||
void updateEduStateCd(VEEduAplctVO vEEduAplctVO);
|
||||
|
||||
List<VEEduAplctVO> selectTrgtList(VEEduAplctVO paramVO);
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,26 @@
|
||||
package kcc.ve.instr.tngrVisitEdu.eduInfo.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.EgovAbstractDAO;
|
||||
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEAutoAsgnmVO;
|
||||
|
||||
@Repository("vEAutoAsgnmMIXDAO")
|
||||
public class VEAutoAsgnmMIXDAO extends EgovAbstractDAO {
|
||||
|
||||
public List<VEAutoAsgnmVO> selectInstrMntAsgnmtChasiList(VEAutoAsgnmVO paramVO) {
|
||||
@SuppressWarnings("unchecked")
|
||||
List<VEAutoAsgnmVO> tlist = (List<VEAutoAsgnmVO>) list("VEAutoAsgnmDAO.selectInstrMntAsgnmtChasiList", paramVO);
|
||||
return tlist;
|
||||
}
|
||||
|
||||
public List<VEAutoAsgnmVO> selectRsdneInstrList(VEAutoAsgnmVO paramVO) {
|
||||
@SuppressWarnings("unchecked")
|
||||
List<VEAutoAsgnmVO> tlist = (List<VEAutoAsgnmVO>) list("VEAutoAsgnmDAO.selectRsdneInstrList", paramVO);
|
||||
return tlist;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
package kcc.ve.instr.tngrVisitEdu.eduInfo.service.impl;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEAutoAsgnmMIXService;
|
||||
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEAutoAsgnmVO;
|
||||
|
||||
@Service("vEAutoAsgnmMIXService")
|
||||
public class VEAutoAsgnmMIXServiceImpl implements VEAutoAsgnmMIXService {
|
||||
|
||||
|
||||
//차시
|
||||
@Resource(name="vEAutoAsgnmMIXDAO")
|
||||
private VEAutoAsgnmMIXDAO vEAutoAsgnmMIXDAO;
|
||||
|
||||
@Override
|
||||
public List<VEAutoAsgnmVO> selectInstrMntAsgnmtChasiList(VEAutoAsgnmVO paramVO) throws Exception{
|
||||
return vEAutoAsgnmMIXDAO.selectInstrMntAsgnmtChasiList(paramVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VEAutoAsgnmVO> selectRsdneInstrList(VEAutoAsgnmVO paramVO) throws Exception{
|
||||
return vEAutoAsgnmMIXDAO.selectRsdneInstrList(paramVO);
|
||||
}
|
||||
|
||||
}
|
||||
@ -67,6 +67,7 @@ public class VEEduMIXDAO extends EgovAbstractDAO {
|
||||
List<VEEduAplctVO> tlist = (List<VEEduAplctVO>) list("VEEduMIXDAO.selectTngrRsltPagingList", paramVO);
|
||||
return tlist;
|
||||
}
|
||||
|
||||
|
||||
public List<VEEduAplctVO> selectTngrRsltList(VEEduAplctVO paramVO) {
|
||||
@SuppressWarnings("unchecked")
|
||||
|
||||
@ -59,7 +59,7 @@ public class VEEduMIXServiceImpl implements VEEduMIXService {
|
||||
public List<VEEduAplctVO> selectTngrRsltPagingList(VEEduAplctVO paramVO) throws Exception{
|
||||
return vEEduMIXDAO.selectTngrRsltPagingList(paramVO);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<VEEduAplctVO> selectTngrRsltList(VEEduAplctVO paramVO) throws Exception{
|
||||
return vEEduMIXDAO.selectTngrRsltList(paramVO);
|
||||
@ -171,5 +171,5 @@ public class VEEduMIXServiceImpl implements VEEduMIXService {
|
||||
public void updateEduStateCd(VEEduAplctVO paramVO) {
|
||||
vEEduMIXDAO.updateEduStateCd(paramVO);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -135,4 +135,8 @@
|
||||
<sqlMap resource="egovframework/sqlmap/ve/tngr/VEACmpltCrtfcMix_SQL_Tibero.xml"/> <!-- 이수증(MIX) -->
|
||||
|
||||
<sqlMap resource="egovframework/sqlmap/ve/tngr/VEABasicInfoStng_SQL_Tibero.xml"/> <!-- 기본정보 -->
|
||||
|
||||
|
||||
<!-- 자동배정 2023.11-->
|
||||
<sqlMap resource="egovframework/sqlmap/ve/edu/VEAutoAsgnm_MIX_SQL_Tibero.xml"/>
|
||||
</sqlMapConfig>
|
||||
@ -0,0 +1,353 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
|
||||
<!-- 찾교 교육 신청 테이블 -->
|
||||
<sqlMap namespace="VEAutoAsgnm">
|
||||
<typeAlias alias="egovMap" type="egovframework.rte.psl.dataaccess.util.EgovMap"/>
|
||||
<typeAlias alias="VEAutoAsgnmVO" type="kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEAutoAsgnmVO"/>
|
||||
|
||||
|
||||
<!-- 공통 테이블 명 -->
|
||||
<sql id="VEAutoAsgnmDAO.table_name">
|
||||
ve_edu_aplct
|
||||
</sql>
|
||||
|
||||
<!-- 저장용 공통 컬럼 명 -->
|
||||
<sql id="VEAutoAsgnmDAO.column_name">
|
||||
edu_aplct_ord,
|
||||
lctr_div_cd,
|
||||
user_id,
|
||||
prcs_ord,
|
||||
edu_slct_cd,
|
||||
edu_slct_area_cd,
|
||||
schol_instt_nm,
|
||||
schol_div_cd,
|
||||
isltn_schol_yn,
|
||||
addr,
|
||||
addr_detail,
|
||||
chrg_nm,
|
||||
clphone,
|
||||
phone,
|
||||
email,
|
||||
edu_place,
|
||||
sbmt_yn,
|
||||
sbmt_pnttm,
|
||||
aprvl_cd,
|
||||
aprvl_pnttm,
|
||||
aprvl_cn,
|
||||
instt_nm,
|
||||
instt_div_cd,
|
||||
hope_sbjct,
|
||||
rqst_cn,
|
||||
|
||||
frst_regist_pnttm,
|
||||
frst_register_id,
|
||||
last_updt_pnttm,
|
||||
last_updusr_id,
|
||||
|
||||
schol_seal_atch_file_id,
|
||||
edu_trgt,
|
||||
edu_prsnl,
|
||||
edu_cn,
|
||||
strt_oprtn_dt,
|
||||
end_oprtn_dt,
|
||||
rprt_sbmt_dt,
|
||||
trans_atch_file_id
|
||||
, aplct_cn
|
||||
|
||||
|
||||
</sql>
|
||||
|
||||
<!-- 조회용 공통 컬럼 명 -->
|
||||
<sql id="VEAutoAsgnmDAO.select_column_name">
|
||||
a.edu_aplct_ord AS eduAplctOrd,
|
||||
a.lctr_div_cd AS lctrDivCd,
|
||||
a.user_id AS userId,
|
||||
a.prcs_ord AS prcsOrd,
|
||||
a.edu_slct_cd AS eduSlctCd,
|
||||
a.edu_slct_area_cd AS eduSlctAreaCd,
|
||||
a.schol_instt_nm AS scholInsttNm,
|
||||
a.schol_div_cd AS scholDivCd,
|
||||
a.isltn_schol_yn AS isltnScholYn,
|
||||
a.addr AS addr,
|
||||
a.addr_detail AS addrDetail,
|
||||
a.chrg_nm AS chrgNm,
|
||||
a.clphone AS clphone,
|
||||
a.phone AS phone,
|
||||
a.email AS email,
|
||||
a.edu_place AS eduPlace,
|
||||
a.sbmt_yn AS sbmtYn,
|
||||
TO_CHAR(a.sbmt_pnttm, 'YYYY-MM-DD') AS sbmtPnttm,
|
||||
a.aprvl_cd AS aprvlCd,
|
||||
TO_CHAR(a.aprvl_pnttm, 'YYYY-MM-DD') AS aprvlPnttm,
|
||||
a.aprvl_cn AS aprvlCn,
|
||||
a.instt_nm AS insttNm,
|
||||
a.instt_div_cd AS insttDivCd,
|
||||
a.hope_sbjct AS hopeSbjct,
|
||||
a.rqst_cn AS rqstCn,
|
||||
|
||||
TO_CHAR(a.frst_regist_pnttm,'YYYY-MM-DD') AS frstRegistPnttm,
|
||||
a.frst_register_id AS frstRegisterId,
|
||||
TO_CHAR(a.last_updt_pnttm,'YYYY-MM-DD') AS lastUpdtPnttm,
|
||||
a.last_updusr_id AS lastUpdusrId,
|
||||
|
||||
a.schol_seal_atch_file_id AS scholSealAtchFileId,
|
||||
a.edu_trgt AS eduTrgt,
|
||||
a.edu_prsnl AS eduPrsnl,
|
||||
a.edu_cn AS eduCn,
|
||||
a.strt_oprtn_dt AS strtOprtnDt,
|
||||
a.end_oprtn_dt AS endOprtnDt,
|
||||
a.rprt_sbmt_dt AS rprtSbmtDt,
|
||||
a.trans_atch_file_id AS transAtchFileId,
|
||||
a.use_yn AS useYn
|
||||
, a.aplct_cn AS aplctCn
|
||||
|
||||
</sql>
|
||||
|
||||
<!-- //해당 배정 차시의 달에 강사에게 할당된 차시 정보 L page -->
|
||||
<select id="VEAutoAsgnmDAO.selectInstrMntAsgnmtChasiList" parameterClass="VEAutoAsgnmVO" resultClass="VEAutoAsgnmVO" remapResults="true">
|
||||
/* VEAutoAsgnmDAO.selectInstrMntAsgnmtChasiList */
|
||||
|
||||
SELECT NVL(aa.chasi,0) AS chasi
|
||||
, cc.userId
|
||||
, cc.rsdne
|
||||
, cc.hopeEduFld
|
||||
, COUNT(1) OVER() AS totCnt
|
||||
|
||||
, nvl(
|
||||
CASE
|
||||
WHEN '01'=#eduHopeMnt# THEN m01_tm
|
||||
WHEN '02'=#eduHopeMnt# THEN m02_tm
|
||||
WHEN '03'=#eduHopeMnt# THEN m03_tm
|
||||
WHEN '04'=#eduHopeMnt# THEN m04_tm
|
||||
WHEN '05'=#eduHopeMnt# THEN m05_tm
|
||||
WHEN '06'=#eduHopeMnt# THEN m06_tm
|
||||
WHEN '07'=#eduHopeMnt# THEN m07_tm
|
||||
WHEN '08'=#eduHopeMnt# THEN m08_tm
|
||||
WHEN '09'=#eduHopeMnt# THEN m09_tm
|
||||
WHEN '10'=#eduHopeMnt# THEN m10_tm
|
||||
WHEN '11'=#eduHopeMnt# THEN m11_tm
|
||||
WHEN '12'=#eduHopeMnt# THEN m12_tm
|
||||
|
||||
|
||||
END
|
||||
,0)
|
||||
AS asgnmTm
|
||||
/*
|
||||
, bb.*
|
||||
*/
|
||||
FROM vea_instr_indvd_mnt_tm bb /* 강사의 월별 배정가능한 시수 */
|
||||
LEFT OUTER JOIN
|
||||
(
|
||||
/* 강사에게 교육이 할당(확정, 반려, 요청전, 요첮우 모두 포함)된 차시수 */
|
||||
SELECT
|
||||
d.user_id,
|
||||
sum(NVL(b.chasi, 0)) AS chasi
|
||||
FROM ve_edu_aplct a ,
|
||||
ve_edu_chasi b
|
||||
LEFT OUTER JOIN ve_edu_chasi_instr_asgnm d
|
||||
ON (
|
||||
b.edu_aplct_ord=d.edu_aplct_ord
|
||||
AND b.edu_chasi_ord=d.edu_chasi_ord
|
||||
)
|
||||
WHERE 1 =1
|
||||
AND a.edu_aplct_ord =b.edu_aplct_ord
|
||||
AND NVL(A.USE_YN, 'Y') <![CDATA[ <> ]]> 'N'
|
||||
AND a.LCTR_DIV_CD = '10'
|
||||
AND a.aprvl_cd = '60'
|
||||
AND 1 =1
|
||||
AND b.edu_hope_dt LIKE #yr#||'.'||#eduHopeMnt#||'%'
|
||||
GROUP BY d.user_id
|
||||
)aa
|
||||
on(
|
||||
aa.user_id=bb.user_id
|
||||
|
||||
)
|
||||
LEFT OUTER JOIN (
|
||||
|
||||
/* 교육가능한(위촉상태) 청소년 강사의 거주지 정보 */
|
||||
SELECT
|
||||
a.instr_div AS instrDiv,
|
||||
a.user_id AS userId,
|
||||
a.rsdne AS rsdne,
|
||||
a.hope_edu_fld AS hopeEduFld
|
||||
|
||||
FROM ( SELECT COUNT(1) OVER() AS totCnt ,
|
||||
a0.instr_div AS instrDiv ,
|
||||
a0.user_id AS userId ,
|
||||
a0.instr_detail_ord AS instrDetailOrd
|
||||
FROM ve_instr b0 ,
|
||||
ve_instr_detail a0
|
||||
WHERE 1 =1
|
||||
AND a0.sbmt_yn='Y'
|
||||
AND a0.use_yn = 'Y'
|
||||
GROUP BY a0.instr_div ,
|
||||
a0.user_id ,
|
||||
a0.instr_detail_ord
|
||||
)
|
||||
a00 ,
|
||||
ve_instr_detail a
|
||||
WHERE 1 =1
|
||||
AND a00.instrDiv =a.instr_div
|
||||
AND a00.userId =a.user_id
|
||||
AND a00.instrDetailOrd=a.instr_detail_ord
|
||||
AND
|
||||
(
|
||||
a.qlfct_end_yn = 'N' OR a.qlfct_end_yn IS NULL
|
||||
)
|
||||
/*
|
||||
AND a.instr_div='10'
|
||||
*/
|
||||
AND a.instr_div=#instrDiv#
|
||||
|
||||
|
||||
|
||||
)cc
|
||||
on(
|
||||
cc.userId=bb.user_id
|
||||
)
|
||||
WHERE 1=1
|
||||
AND bb.YR=#yr#
|
||||
|
||||
AND NVL(
|
||||
CASE
|
||||
WHEN '01'=#eduHopeMnt# THEN m01_tm
|
||||
WHEN '02'=#eduHopeMnt# THEN m02_tm
|
||||
WHEN '03'=#eduHopeMnt# THEN m03_tm
|
||||
WHEN '04'=#eduHopeMnt# THEN m04_tm
|
||||
WHEN '05'=#eduHopeMnt# THEN m05_tm
|
||||
WHEN '06'=#eduHopeMnt# THEN m06_tm
|
||||
WHEN '07'=#eduHopeMnt# THEN m07_tm
|
||||
WHEN '08'=#eduHopeMnt# THEN m08_tm
|
||||
WHEN '09'=#eduHopeMnt# THEN m09_tm
|
||||
WHEN '10'=#eduHopeMnt# THEN m10_tm
|
||||
WHEN '11'=#eduHopeMnt# THEN m11_tm
|
||||
WHEN '12'=#eduHopeMnt# THEN m12_tm
|
||||
|
||||
END
|
||||
,0)>NVL(aa.chasi,0)
|
||||
</select>
|
||||
|
||||
<!-- //해당 차시 학교에 거주하는 강사 L page -->
|
||||
<select id="VEAutoAsgnmDAO.selectRsdneInstrList" parameterClass="VEAutoAsgnmVO" resultClass="VEAutoAsgnmVO" remapResults="true">
|
||||
/* VEAutoAsgnmDAO.selectRsdneInstrList */
|
||||
|
||||
SELECT NVL(aa.chasi,0) AS chasi
|
||||
, cc.userId
|
||||
, cc.rsdne
|
||||
, cc.hopeEduFld
|
||||
, COUNT(1) OVER() AS totCnt
|
||||
|
||||
, nvl(
|
||||
CASE
|
||||
WHEN '01'=#eduHopeMnt# THEN m01_tm
|
||||
WHEN '02'=#eduHopeMnt# THEN m02_tm
|
||||
WHEN '03'=#eduHopeMnt# THEN m03_tm
|
||||
WHEN '04'=#eduHopeMnt# THEN m04_tm
|
||||
WHEN '05'=#eduHopeMnt# THEN m05_tm
|
||||
WHEN '06'=#eduHopeMnt# THEN m06_tm
|
||||
WHEN '07'=#eduHopeMnt# THEN m07_tm
|
||||
WHEN '08'=#eduHopeMnt# THEN m08_tm
|
||||
WHEN '09'=#eduHopeMnt# THEN m09_tm
|
||||
WHEN '10'=#eduHopeMnt# THEN m10_tm
|
||||
WHEN '11'=#eduHopeMnt# THEN m11_tm
|
||||
WHEN '12'=#eduHopeMnt# THEN m12_tm
|
||||
|
||||
|
||||
END
|
||||
,0)
|
||||
AS asgnmTm
|
||||
/*
|
||||
, bb.*
|
||||
*/
|
||||
FROM vea_instr_indvd_mnt_tm bb /* 강사의 월별 배정가능한 시수 */
|
||||
LEFT OUTER JOIN
|
||||
(
|
||||
/* 강사에게 교육이 할당(확정, 반려, 요청전, 요첮우 모두 포함)된 차시수 */
|
||||
SELECT
|
||||
d.user_id,
|
||||
sum(NVL(b.chasi, 0)) AS chasi
|
||||
FROM ve_edu_aplct a ,
|
||||
ve_edu_chasi b
|
||||
LEFT OUTER JOIN ve_edu_chasi_instr_asgnm d
|
||||
ON (
|
||||
b.edu_aplct_ord=d.edu_aplct_ord
|
||||
AND b.edu_chasi_ord=d.edu_chasi_ord
|
||||
)
|
||||
WHERE 1 =1
|
||||
AND a.edu_aplct_ord =b.edu_aplct_ord
|
||||
AND NVL(A.USE_YN, 'Y') <![CDATA[ <> ]]> 'N'
|
||||
AND a.LCTR_DIV_CD = '10'
|
||||
AND a.aprvl_cd = '60'
|
||||
AND 1 =1
|
||||
AND b.edu_hope_dt LIKE #yr#||'.'||#eduHopeMnt#||'%'
|
||||
GROUP BY d.user_id
|
||||
)aa
|
||||
on(
|
||||
aa.user_id=bb.user_id
|
||||
|
||||
)
|
||||
LEFT OUTER JOIN (
|
||||
|
||||
/* 교육가능한(위촉상태) 청소년 강사의 거주지 정보 */
|
||||
SELECT
|
||||
a.instr_div AS instrDiv,
|
||||
a.user_id AS userId,
|
||||
a.rsdne AS rsdne,
|
||||
a.hope_edu_fld AS hopeEduFld
|
||||
|
||||
FROM ( SELECT COUNT(1) OVER() AS totCnt ,
|
||||
a0.instr_div AS instrDiv ,
|
||||
a0.user_id AS userId ,
|
||||
a0.instr_detail_ord AS instrDetailOrd
|
||||
FROM ve_instr b0 ,
|
||||
ve_instr_detail a0
|
||||
WHERE 1 =1
|
||||
AND a0.sbmt_yn='Y'
|
||||
AND a0.use_yn = 'Y'
|
||||
GROUP BY a0.instr_div ,
|
||||
a0.user_id ,
|
||||
a0.instr_detail_ord
|
||||
)
|
||||
a00 ,
|
||||
ve_instr_detail a
|
||||
WHERE 1 =1
|
||||
AND a00.instrDiv =a.instr_div
|
||||
AND a00.userId =a.user_id
|
||||
AND a00.instrDetailOrd=a.instr_detail_ord
|
||||
AND
|
||||
(
|
||||
a.qlfct_end_yn = 'N' OR a.qlfct_end_yn IS NULL
|
||||
)
|
||||
/*
|
||||
AND a.instr_div='10'
|
||||
*/
|
||||
AND a.instr_div=#instrDiv#
|
||||
|
||||
|
||||
|
||||
)cc
|
||||
on(
|
||||
cc.userId=bb.user_id
|
||||
)
|
||||
WHERE 1=1
|
||||
AND bb.YR=#yr#
|
||||
|
||||
AND NVL(
|
||||
CASE
|
||||
WHEN '01'=#eduHopeMnt# THEN m01_tm
|
||||
WHEN '02'=#eduHopeMnt# THEN m02_tm
|
||||
WHEN '03'=#eduHopeMnt# THEN m03_tm
|
||||
WHEN '04'=#eduHopeMnt# THEN m04_tm
|
||||
WHEN '05'=#eduHopeMnt# THEN m05_tm
|
||||
WHEN '06'=#eduHopeMnt# THEN m06_tm
|
||||
WHEN '07'=#eduHopeMnt# THEN m07_tm
|
||||
WHEN '08'=#eduHopeMnt# THEN m08_tm
|
||||
WHEN '09'=#eduHopeMnt# THEN m09_tm
|
||||
WHEN '10'=#eduHopeMnt# THEN m10_tm
|
||||
WHEN '11'=#eduHopeMnt# THEN m11_tm
|
||||
WHEN '12'=#eduHopeMnt# THEN m12_tm
|
||||
|
||||
END
|
||||
,0)>NVL(aa.chasi,0)
|
||||
</select>
|
||||
</sqlMap>
|
||||
Loading…
Reference in New Issue
Block a user