이준호 찾교

- 달력 수정
This commit is contained in:
leejunho 2023-11-22 15:45:05 +09:00
parent fabe755a1c
commit b62d4f91ac
3 changed files with 182 additions and 163 deletions

View File

@ -11,11 +11,14 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import kcc.com.utl.user.service.CheckLoginUtil;
import kcc.kccadr.adjst.service.AdjstReqService;
import kcc.let.utl.fcc.service.EgovCryptoUtil;
import kcc.ve.adv.tngr.stngInfo.service.VEAStngMixService;
import kcc.ve.adv.tngr.stngInfo.service.VEAStngVO;
import kcc.ve.aplct.cpyrgExprnClsrm.exprnClsrmAplct.service.ScholInfoService;
import kcc.ve.aplct.cpyrgExprnClsrm.exprnClsrmAplct.service.ScholInfoVO;
@ -61,6 +64,9 @@ public class ScholInfoController {
@Resource(name = "AdjstReqService")
private AdjstReqService adjstReqService;
//강의설정 관리(MIX)
@Resource(name = "vEAStngMixService")
private VEAStngMixService vEAStngMixService;
/**
* 학교정보 검색 팝업 리스트
*/
@ -104,35 +110,35 @@ public class ScholInfoController {
*/
@RequestMapping("popup/calendarPopList.do")
public String popupCalendarPopList( @ModelAttribute("scholInfoVO") ScholInfoVO scholInfoVO , ModelMap model , HttpServletRequest request ) throws Exception {
//1.paging step1
PaginationInfo paginationInfo = this.setPagingStep1(scholInfoVO);
//2. paging step2
scholInfoVO = this.setPagingStep2(scholInfoVO, paginationInfo);
if (!"".equals(scholInfoVO.getSearchKeyword())) {
scholInfoVO.setSelectPagingListQuery(" AND A.SCHOL_NM LIKE '%"+scholInfoVO.getSearchKeyword()+"%' ");
}
if (!"".equals(scholInfoVO.getSearchCondition())) {
if(scholInfoVO.getSearchCondition().equals("10")) {
scholInfoVO.setScholGrade(" AND A.SCHOL_GRADE_NM LIKE '%초등%' ");
}else if(scholInfoVO.getSearchCondition().equals("20")) {
scholInfoVO.setScholGrade(" AND A.SCHOL_GRADE_NM LIKE '%중학%' ");
}else if(scholInfoVO.getSearchCondition().equals("30")) {
scholInfoVO.setScholGrade(" AND A.SCHOL_GRADE_NM LIKE '%고등%' ");
}else if(scholInfoVO.getSearchCondition().equals("40")) {
scholInfoVO.setScholGrade(" AND A.SCHOL_GRADE_NM LIKE '%특수%' ");
}else if(scholInfoVO.getSearchCondition().equals("50")) {
scholInfoVO.setScholGrade(" AND A.SCHOL_GRADE_NM LIKE '%각종%' ");
}
}
List<ScholInfoVO> scholInfoVOList = scholInfoService.selectPagingList(scholInfoVO);
//3.paging step3
paginationInfo = this.setPagingStep3(scholInfoVOList, paginationInfo);
model.addAttribute("paginationInfo", paginationInfo);
//학교정보 리스트, 페이징 정보 전달
model.addAttribute("scholList", scholInfoVOList);
// //1.paging step1
// PaginationInfo paginationInfo = this.setPagingStep1(scholInfoVO);
// //2. paging step2
// scholInfoVO = this.setPagingStep2(scholInfoVO, paginationInfo);
//
// if (!"".equals(scholInfoVO.getSearchKeyword())) {
// scholInfoVO.setSelectPagingListQuery(" AND A.SCHOL_NM LIKE '%"+scholInfoVO.getSearchKeyword()+"%' ");
// }
//
// if (!"".equals(scholInfoVO.getSearchCondition())) {
// if(scholInfoVO.getSearchCondition().equals("10")) {
// scholInfoVO.setScholGrade(" AND A.SCHOL_GRADE_NM LIKE '%초등%' ");
// }else if(scholInfoVO.getSearchCondition().equals("20")) {
// scholInfoVO.setScholGrade(" AND A.SCHOL_GRADE_NM LIKE '%중학%' ");
// }else if(scholInfoVO.getSearchCondition().equals("30")) {
// scholInfoVO.setScholGrade(" AND A.SCHOL_GRADE_NM LIKE '%고등%' ");
// }else if(scholInfoVO.getSearchCondition().equals("40")) {
// scholInfoVO.setScholGrade(" AND A.SCHOL_GRADE_NM LIKE '%특수%' ");
// }else if(scholInfoVO.getSearchCondition().equals("50")) {
// scholInfoVO.setScholGrade(" AND A.SCHOL_GRADE_NM LIKE '%각종%' ");
// }
// }
//
// List<ScholInfoVO> scholInfoVOList = scholInfoService.selectPagingList(scholInfoVO);
// //3.paging step3
// paginationInfo = this.setPagingStep3(scholInfoVOList, paginationInfo);
// model.addAttribute("paginationInfo", paginationInfo);
// //학교정보 리스트, 페이징 정보 전달
// model.addAttribute("scholList", scholInfoVOList);
return "/web/ve/aplct/cpyrgExprnClsrm/exprnClsrmInfo/popup/calendarPopList";
}
@ -184,4 +190,67 @@ public class ScholInfoController {
return p_paginationInfo;
}
//교육가능시수 달력 팝업 데이타 - 해당 회차의 선택한 기간 정보에 대한 달력의 정보들
@RequestMapping(value = "/popup/calendarPopListAjax.do")
@ResponseBody
public List<VEAStngVO> advPsblTmQnttyCalendarPopupAjax(
@ModelAttribute("vEAStngVO") VEAStngVO vEAStngVO
, ModelMap model
) throws Exception {
/*
System.out.println(schduleManageVO.getTodate());
System.out.println(schduleManageVO.getTodate());
System.out.println(schduleManageVO.getTodate());
System.out.println(schduleManageVO.getSearchStartDt().split("T")[0]);
System.out.println(schduleManageVO.getSearchStartDt());
System.out.println(schduleManageVO.getSearchStartDt());
*/
System.out.println("vEAStngVO.getDpStrtDt()");
System.out.println(vEAStngVO.getDpStrtDt());
System.out.println(vEAStngVO.getDpDdlnDt());
String s_std_date = vEAStngVO.getDpStrtDt().substring(0, 10);
vEAStngVO.setDpStrtDt(s_std_date);
vEAStngVO.setYr(s_std_date.substring(0,4));
//schduleManageVO.setSearchStartDt(schduleManageVO.getSearchStartDt().split("T")[0].replaceAll("-", ""));
//step1.현재달력의 첫번째 날짜를 기준으로 그해와 다음해의 전체 일자를 만들고,
List<VEAStngVO> vList = vEAStngMixService.selectList_VEALPPS_2(vEAStngVO);
//return vEAStngMixService.selectList_VEALPPS_1(vEAStngVO);
for (int i=0;i<vList.size();i++) {
try {
System.out.println("vList.get(i).getDtPsblTmQnttyOrd()");
System.out.println(vList.get(i).getDtPsblTmQnttyOrd());
System.out.println(vList.get(i).getRndsNm());
if (vList.get(i).getTitle().equals("불가능"))
{
vList.get(i).setColor("#FF0000");
}else if (Integer.parseInt(vList.get(i).getTitleF())>=Integer.parseInt(vList.get(i).getTitleB()))
{
vList.get(i).setColor("#FF0000");
}else if (Integer.parseInt(vList.get(i).getTitleF())*5>=Integer.parseInt(vList.get(i).getTitleB())*4)
{
vList.get(i).setColor("#FFAA00");
}
}catch(Exception ex) {
ex.printStackTrace();
}
}
return vList;
//return schduleManageService.selectSchManageStatusList(schduleManageVO);
}
}

View File

@ -7,15 +7,7 @@
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="kc" uri="/WEB-INF/tlds/kcc_tld.tld"%>
<script type="text/javascript" src="${pageContext.request.contextPath}/kccadrPb/usr/script/popup.js"></script>
<style type="text/css">
.fc-day-sat { color:#0000FF; } /* 토요일 */
.fc-day-sun { color:#FF0000; } /* 일요일 */
</style>
<link type="text/css" rel="stylesheet" href="<c:url value='/js/fullcalendar/5.9.0/main.css' />" />
<script type="text/javascript" src="<c:url value='/js/fullcalendar/5.9.0/main.js'/>"></script>
<script type="text/javascript" src="<c:url value='/js/fullcalendar/5.9.0/locales-all.js'/>"></script>
<!-- css -->
@ -30,6 +22,9 @@
<script src="/offedu/visitEdu/adm/publish/script/content.js"></script>
<script src="/offedu/kccadrPb/adm/script/postcode.js"></script>
<script src="/offedu/js/fullcalendar/5.9.0/main.js"></script>
<script src="/offedu/js/fullcalendar/5.9.0/locales-all.js"></script>
<link rel="stylesheet" href="/offedu/js/fullcalendar/5.9.0/main.css">
<script src="/offedu/js/ncms_common.js"></script>
<script src="/offedu/js/util.js"></script>
@ -37,86 +32,21 @@
<script src="/offedu/js/kccadr/kccadrConstants.js"></script>
<script src="/offedu/js/antdatepicker/moment.min.js"></script>
<script type="text/javascript" src="/offedu/js/ve/veConstants.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/kccadrPb/usr/script/popup.js"></script>
<style type="text/css">
.fc-day-sat { color:#0000FF; } /* 토요일 */
.fc-day-sun { color:#FF0000; } /* 일요일 */
</style>
<script type="text/javaScript" language="javascript">
function fncGoScholList(){
linkPage(1);
}
var ex_s_todate;// = info.startStr;
var calendar;
function linkPage(pageNo){
var data = {
pageIndex : pageNo,
searchKeyword : $("#searchKeyword").val(),
searchCondition : $("#searchCondition").val(),
pageUnit : 5,
formId : $("#formId").val(),
}
fncScholList(data);
}
function fncScholList(paramObj) {
if(paramObj == undefined || paramObj == ''){
paramObj = {
pageIndex : 1,
searchKeyword : "",
searchCondition : "",
pageUnit : 5,
formId : $("#formId").val(),
};
}
// 학교 리스트 팝업 호출
commonPopLayeropen(
"${pageContext.request.contextPath}/web/ve/aplct/cpyrgExprnClsrm/scholInfo/popup/scholPopList.do"
, 500
, 600
, paramObj
, "N"
, "scholPop"
);
}
function fncScholDataSlct_back(p_code, p_nm){
var fNm = "#"+$("#formId").val();
$(fNm + " #stndrdScholCd").val(p_code);
$(fNm + " #scholInsttNm").val(p_nm);
$(".btn_popup_close").click();
}
function fncScholDataSlct(thisObj){
var inObj = $(thisObj).closest("td").find("input[type=hidden]");
var rsObj = new Object();
$.each(inObj, function(idx, value){
console.log(value.value);
rsObj[value.name] = value.value;
});
callBackSchPop(rsObj);
$(".btn_popup_close").click();
}
$(document).ready(function(){
//boardCaptionDetailToggle4();
// 레이어팝업 포커싱 이동 수정
$(".tooltip-close").click(function(){
var activeTarget = $('[data-tooltip-con="sub36_pop02"]');
activeTarget.hide();
$('[data-tooltip="sub01_pop02"]').focus();
});
//레이어팝업 초정 이동 시 필요한 data 값 추가
var btnLast = $('.popup_cont').find('.page').find('button:last-child');
btnLast.attr('data-focus-next','sub36_pop02');
btnLast.attr('data-focus','sub36_pop02_close');
})
var ex_s_todate;// = info.startStr;
var calendar;
document.addEventListener('DOMContentLoaded', function() {
$(document).ready(function(){
var calendarEl = document.getElementById('schduleManager');
calendar = new FullCalendar.Calendar(calendarEl, {
locale: 'ko',
@ -169,7 +99,8 @@ var calendar;
var searchDt = $("#searchCalendarCode").val();
$.ajax({
url: '<c:url value="/kccadr/oprtn/tngrVisitEdu/popup/advLctrPrdCalendarPopupAjax.do"/>',
// url: '<c:url value="/kccadr/oprtn/tngrVisitEdu/popup/advPsblTmQnttyCalendarPopupAjax.do"/>',
url: '<c:url value="/web/ve/aplct/cpyrgExprnClsrm/scholInfo/popup/calendarPopListAjax.do"/>',
type: 'POST',
dataType: 'json',
data: {
@ -178,7 +109,6 @@ var calendar;
todate : info.start,
dpStrtDt : s_todate,
dpDdlnDt : info.start,
rndsOrd : '${rndsOrd}',
//todate : info.startStr,
//todate : s_todate,
//todate : "",
@ -203,45 +133,53 @@ var calendar;
},
eventClick: function(info) {
info.jsEvent.preventDefault();
//alert(info.event._def.extendedProps.dtPsblTmQnttyOrd);
//alert(info.event._def.extendedProps.title);
//alert(info.title);
//alert(info.event._def.title);
//alert(JSON.stringify(info));
/*
alert(info.event._def.extendedProps.lctrPsblPrdOrd);
alert(info.event._def.extendedProps.dtPsblTmQnttyOrd);
alert(info.event._def.extendedProps.start);
alert(info.event._def.extendedProps.end);
alert(info.event._def.extendedProps.rndsNm);
alert(JSON.stringify(info.event._def.extendedProps));
*/
schDetailPop(
info.event._def.extendedProps.lctrPsblPrdOrd
, info.event._def.extendedProps.rndsOrd
, info.event._def.extendedProps.rndsNm
);
if (info.event._def.title=="불가능"){
alert("해당 일자는 관리자가 교육 불가 일자로 설정하여 시수 설정이 불가능 합니다.");
}else{
dtPsblTmQnttyPop(
info.event._def.extendedProps.dtPsblTmQnttyOrd
, info.event._def.extendedProps.rndsNm
);
}
return false;
},
});
calendar.render();
});
function schDetailPop(
p_lctrPsblPrdOrd
, p_rndsOrd
, p_lctrPsblStrtDt
function dtPsblTmQnttyPop(
p_dtPsblTmQnttyOrd
, p_dpStrtDt
) {
//alert(p_lctrPsblPrdOrd);
fncChangePsblDay(p_lctrPsblPrdOrd, p_rndsOrd, p_lctrPsblStrtDt);
//calendar.fullCalendar('refetchEvents');
//alert(p_dtPsblTmQnttyOrd);
//alert(p_dpStrtDt);
//fncChangePsblDay(p_lctrPsblPrdOrd, p_rndsOrd, p_lctrPsblStrtDt);
//calendar.fullCalendar('refetchEvents');
/*
window.open('', 'schDetailPop', "width=800, height=520, left=100, top=130","location = no","status= no","toolbars= no");
document.listForm.eduAplctOrd.value = schSeq ;
document.listForm.eduChasiOrd.value = schChasiSeq ;
document.listForm.method = "post";
document.listForm.action = "${pageContext.request.contextPath}/kccadr/oprtn/tngrVisitEdu/popup/SchduleManagerPopDetail.do";
document.listForm.target = "schDetailPop" ;
document.listForm.submit();
*/
document.listForm.dtPsblTmQnttyOrd.value = p_dtPsblTmQnttyOrd;
document.listForm.dpStrtDt.value = p_dpStrtDt;
document.listForm.action = "<c:url value='/kccadr/oprtn/tngrVisitEdu/popup/advPsblTmQnttyPopup.do'/>";
window.open("#", "_dtPsblTmQnttyPop", "scrollbars = no, top=100px, left=100px, height=450px, width=450px");
document.listForm.target = "_dtPsblTmQnttyPop";
document.listForm.submit();
}
@ -268,10 +206,6 @@ var calendar;
//fncGoList();
//$('#schduleManager').fullCalendar('gotoDate', new Date('2023-10-01'));
window.location.reload(false);
//calendar.render();
}else{
alert("변경 중 오류가 발생하였습니다.");
fncGoList();
@ -395,7 +329,6 @@ var calendar;
return str.split(searchStr).join(replaceStr);
}
</script>
<!-- 일정 상세 -->
<form:form commandName="scholInfoVO" id="popList" name="popList" method="post" onsubmit="return false;">
@ -406,12 +339,32 @@ var calendar;
<div class="popup_wrap popType01" tabindex="0" data-tooltip-con="sub36_pop02" data-focus="sub36_pop02" data-focus-prev="sub36_pop02_close">
<div class="popup_tit">
<p>학교명 검색</p> <button class="btn_popup_close tooltip-close" data-focus="sub36_pop02_close" title="팝업 닫기"><i></i></button>
<p>교육일정달력</p> <button class="btn_popup_close tooltip-close" data-focus="sub36_pop02_close" title="팝업 닫기"><i></i></button>
</div>
<div class="popup_cont">
<div id="schduleManager">askfjaskdjfaskdjfasdk
asdfasfsad
asdfsadf
<div class="box">
<!-- cont_tit -->
<div class="cont_tit">
<input type="hidden" id="searchCalendarCode" value="">
<h2>교육가능시수현황</h2>
<!--
<ul class="cont_nav">
<li class="home"><a href="/"><i></i></a></li>
<li>
<p>일정관리</p>
</li>
<li><span class="cur_nav">일정현황</span></li>
</ul>
-->
</div>
<!-- //cont_tit -->
<br />
<div style="float: right; padding-right: 40px; color: #777777;" id="weekCnt"></div>
<div class="cont">
<div id="schduleManager"></div>
</div>
</div>
</div>
</div>

View File

@ -791,24 +791,21 @@ var psblFlag = "Y";//학생 신청가능기간여부 체크
}
}
function fncCalView(paramObj) {
if(paramObj == undefined || paramObj == ''){
paramObj = {
pageIndex : 1,
searchKeyword : "",
searchCondition : "",
pageUnit : 5,
formId : "createForm"
};
}
function fncCalView() {
// if(paramObj == undefined || paramObj == ''){
// paramObj = {
// pageIndex : 1,
// searchKeyword : "",
// searchCondition : "",
// pageUnit : 5,
// formId : "createForm"
// };
// }
commonPopLayeropen(
"${pageContext.request.contextPath}/web/ve/aplct/cpyrgExprnClsrm/scholInfo/popup/calendarPopList.do"
//"${pageContext.request.contextPath}/kccadr/oprtn/tngrVisitEdu/popup/advLctrPrdCalendarPopup.do"
//"${pageContext.request.contextPath}/web/ve/tngrVisitEdu/popup/advLctrPrdCalendarPopup.do"
, 900
, 900
, paramObj
, ""
, "Y"
, "calendarPop"
);
@ -1136,7 +1133,7 @@ var psblFlag = "Y";//학생 신청가능기간여부 체크
<span class="cf_text2" style="display:block; padding-left:0; padding-top: 6px;">※ 교육추가 버튼을누러 대상별 1줄씩 작성(1줄 = 강사 1인) 바랍니다. (예시 : 3개 학급 신청 시 1학급 당 1줄씩 총 3줄을 작성)</span>
</div>
<div class="btn_wrap">
<!-- <button type="button" class="btnType01" data-tooltip="sub01_pop02" onclick="fncCalView();" title="팝업 열림">교육일정달력보기</button> -->
<button type="button" class="btnType01" data-tooltip="sub01_pop03" onclick="fncCalView();" title="팝업 열림">교육일정달력보기</button>
<button type="button" class="btnType05" title="교육차시 입력테이블 추가생성" onclick="addEduClassCopyTngr('addClassRow')">교육추가</button>
</div>
</div>