2023-11-08 13:51 강사 배정 excel 출력 오류 수정

This commit is contained in:
myname 2023-11-08 13:51:33 +09:00
parent 5fa5d07322
commit 35e10bd6d4
5 changed files with 242 additions and 196 deletions

View File

@ -661,7 +661,10 @@ public class EduCnfrmMngAdultController {
vEInstrAsgnmVO.setAsgnmAprvlCd("30");
}
*/
if ("".equals(vEInstrAsgnmVO.getAsgnmAprvlCd())) { //값이 없는 경우는 교육확정으로
vEInstrAsgnmVO.setAsgnmAprvlCd("30");
}
//선택한 강사 데이터 등록 처리
vEInstrAsgnmVO.setFrstRegisterId(loginVO.getUniqId()); //esntl_id
//// 데이터 있으면 update, 없으면 insert 처리(MERGE)
@ -700,6 +703,9 @@ public class EduCnfrmMngAdultController {
public ModelAndView eduCnfrmExcelDownLoad(@ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO
, ModelMap model) throws Exception {
ModelAndView modelAndView = null;
try{
// 엑셀 페이징으로 변경
vEEduAplctVO.setFirstIndex(0);
vEEduAplctVO.setRecordCountPerPage(10000000);
@ -723,7 +729,8 @@ public class EduCnfrmMngAdultController {
ComDefaultCodeVO codeParam = new ComDefaultCodeVO();
// 교육일자
vo.setEduHopeDt(CmmUtil.getStrDateFormat(vo.getEduHopeDt()));
//vo.setEduHopeDt(CmmUtil.getStrDateFormat(vo.getEduHopeDt()));
vo.setEduHopeDt(vo.getEduHopeDt());
// 교육요일
vo.setEduHopeDtDayOfWeek(CmmUtil.getStrDayOfWeek(vo.getEduHopeDt()));
@ -787,10 +794,15 @@ public class EduCnfrmMngAdultController {
model.addAttribute("workbook", workbook);
model.addAttribute("workbookName", title);
ModelAndView modelAndView = new ModelAndView();
modelAndView = new ModelAndView();
modelAndView.setViewName("excelDownloadView");
modelAndView.addObject(model);
}catch(Exception ex) {
ex.printStackTrace();
}
return modelAndView;
}

View File

@ -912,6 +912,9 @@ public class EduCnfrmMngTngrController {
public ModelAndView eduCnfrmExcelDownLoad(@ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO
, ModelMap model) throws Exception {
ModelAndView modelAndView = null;
try {
// 엑셀 페이징으로 변경
vEEduAplctVO.setFirstIndex(0);
vEEduAplctVO.setRecordCountPerPage(10000000);
@ -944,7 +947,8 @@ public class EduCnfrmMngTngrController {
ComDefaultCodeVO codeParam = new ComDefaultCodeVO();
// 교육일자
vo.setEduHopeDt(CmmUtil.getStrDateFormat(vo.getEduHopeDt()));
//vo.setEduHopeDt(CmmUtil.getStrDateFormat(vo.getEduHopeDt()));
vo.setEduHopeDt(vo.getEduHopeDt());
// 교육요일
vo.setEduHopeDtDayOfWeek(CmmUtil.getStrDayOfWeek(vo.getEduHopeDt()));
@ -1013,10 +1017,14 @@ public class EduCnfrmMngTngrController {
model.addAttribute("workbook", workbook);
model.addAttribute("workbookName", title);
ModelAndView modelAndView = new ModelAndView();
modelAndView = new ModelAndView();
modelAndView.setViewName("excelDownloadView");
modelAndView.addObject(model);
}catch(Exception ex) {
ex.printStackTrace();
}
return modelAndView;
}

View File

@ -2989,15 +2989,20 @@
SELECT
AA.*,
2 ,
/*
IF(aa.userId IS NOT null
, '('||SUBSTRING(aa.userId,INSTR(aa.userId,'_')+1)*1||')'
,''
) AS userIdNum,
*/
CASE WHEN aa.userId IS NOT NULL THEN '(' || SUBSTRING(aa.userId,INSTR(aa.userId,'_')+1)*1 || ')'
ELSE ''
END AS userIdNum ,
COUNT(1) OVER() AS totCnt
FROM (
SELECT
a.edu_aplct_ord AS eduAplctOrd ,
DATE_FORMAT(a.aprvl_pnttm,'%Y-%m-%d') AS aprvlPnttm ,
TO_CHAR(a.aprvl_pnttm,'YYYY-MM-DD') AS aprvlPnttm ,
/*
a.edu_slct_cd AS eduSlctCd ,
a.edu_slct_area_cd AS eduSlctAreaCd ,
@ -3040,12 +3045,15 @@
e.instr_nm AS instrNm,
g.atch_file_id AS atchFileId,
d.rmrks AS rmrks,
(select count(1) from ve_edu_rslt_rprt where edu_aplct_ord = a.edu_aplct_ord and edu_chasi_ord = b.edu_chasi_ord and sbmt_yn = 'Y') as cnt
(select count(1)
from ve_edu_rslt_rprt
where edu_aplct_ord = a.edu_aplct_ord and edu_chasi_ord = b.edu_chasi_ord and sbmt_yn = 'Y') as cnt
<isEqual property="asgnmAprvlCd" compareValue="30">
,
f.sbmt_yn AS feeSbmtYn,
f.aprvl_cd AS feeAprvlCd,
/*
NVL(TO_NUMBER(IF(f.instr_fee='',0,f.instr_fee)),0)
+ NVL(TO_NUMBER(IF(f.bsns_trip_fee='',0,f.bsns_trip_fee)),0)
+ NVL(TO_NUMBER(IF(f.spare_fee='',0,f.spare_fee)),0)
@ -3055,6 +3063,16 @@
- NVL(TO_NUMBER(IF(f.income_tax='',0,f.income_tax)),0)
- NVL(TO_NUMBER(IF(f.local_income_tax='',0,f.local_income_tax)),0)
AS totFee
*/
NVL(TO_NUMBER(DECODE(f.instr_fee ,'',0,f.instr_fee)),0)
+ NVL(TO_NUMBER(DECODE(f.bsns_trip_fee ,'',0,f.bsns_trip_fee)),0)
+ NVL(TO_NUMBER(DECODE(f.spare_fee ,'',0,f.spare_fee)),0)
+ NVL(TO_NUMBER(DECODE(f.special_work_allow ,'',0,f.special_work_allow)),0)
+ NVL(TO_NUMBER(DECODE(f.distance_allow ,'',0,f.distance_allow)),0)
+ NVL(TO_NUMBER(DECODE(f.traffic_fee ,'',0,f.traffic_fee)),0)
- NVL(TO_NUMBER(DECODE(f.income_tax ,'',0,f.income_tax)),0)
- NVL(TO_NUMBER(DECODE(f.local_income_tax ,'',0,f.local_income_tax)),0)
AS totFee
</isEqual>
, (
SELECT COUNT(1)
@ -3088,7 +3106,7 @@
AND b.edu_aplct_ord = i.edu_aplct_ord
AND b.edu_chasi_ord = i.edu_chasi_ord
GROUP BY i.edu_aplct_ord , i.edu_chasi_ord
),'-') AS hstryCnt
),0) AS hstryCnt
FROM ve_edu_aplct a
, ve_edu_chasi b
@ -3232,7 +3250,7 @@
AND AA.insttNm LIKE '%'||#searchKeyword#||'%'
</isEqual>
</isNotEmpty>
ORDER BY 1=1
ORDER BY 1
<isEmpty property="orderByQuery">
, eduAplctOrd desc, eduChasiOrd
@ -3241,7 +3259,10 @@
, $orderByQuery$
</isNotEmpty>
<isNotEqual property="pageIndex" compareValue="0">
LIMIT #recordCountPerPage# OFFSET #firstIndex#
/*
LIMIT recordCountPerPage OFFSET firstIndex
*/
OFFSET #firstIndex# ROWS FETCH NEXT #recordCountPerPage# ROWS ONLY;
</isNotEqual>
</select>

View File

@ -497,7 +497,7 @@
<input name="chk" class="${list.asgnmAprvlCd}"
value="${list.eduAplctOrd}@${list.eduChasiOrd}" data-phone="<c:out value='${list.clphone}' />"
data-email="<c:out value='${list.email}' />" data-cnt="<c:out value='${list.cnt}'/>" data-lctr="<c:out value='${list.userId}' />"
title="Check" type="checkbox"/>
title="Check" type="checkbox"/>${list.asgnmAprvlCd}
</td>
<td>
<fmt:parseDate value="${list.eduHopeDt}" var="eduHopeDt" pattern="yyyy.MM.dd"/>

View File

@ -72,6 +72,10 @@
$("#eduChasiOrd").val(p_eduChasiOrd);
$("#userId").val(p_id);
//배정 승인 코드를 (교육확정==>수락요청전으로 변경)
$("#asgnmAprvlCd").val('10');
var data1 = new FormData(document.getElementById("createForm"));
if(confirm("강사를 선택 하시겠습니까?")){
$.ajax({
@ -108,6 +112,7 @@
<input type="hidden" name="eduChasiOrd" id="eduChasiOrd"/>
<input type="hidden" name="instrDiv" id="instrDiv" value="20">
<input type="hidden" name="userId" id="userId" />
<input type="hidden" name="asgnmAprvlCd" id="asgnmAprvlCd" />
</form:form>
<form:form id="listForm" name="listForm" method="post" onsubmit="return false;">