Fix: swagger API description 전체적용 및 미사용 컨트롤러 삭제
parent
72ba18acc3
commit
debba65c2c
@ -1,92 +0,0 @@
|
||||
package egovframework.com.cmm.web;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.egovframe.rte.fdl.property.EgovPropertyService;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import egovframework.com.cmm.EgovWebUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 공통유틸리티성 작업을 위한 Controller 클래스
|
||||
* @author 공통 서비스 개발팀 JJY
|
||||
* @since 2009.03.02
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2009.03.02 JJY 최초 생성
|
||||
* 2011.08.31 JJY 경량환경 템플릿 커스터마이징버전 생성
|
||||
* 2021.02.23 신용호 moveToPage() 화이트리스트 처리
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Slf4j
|
||||
@Controller
|
||||
public class EgovComUtlController {
|
||||
|
||||
/** EgovPropertyService */
|
||||
@Resource(name = "propertiesService")
|
||||
protected EgovPropertyService propertiesService;
|
||||
|
||||
@Resource(name = "egovPageLinkWhitelist")
|
||||
protected List<String> egovWhitelist;
|
||||
|
||||
/**
|
||||
* JSP 호출작업만 처리하는 공통 함수
|
||||
*/
|
||||
@RequestMapping(value="/EgovPageLink.do")
|
||||
public String moveToPage(@RequestParam("link") String linkPage,
|
||||
HttpSession session,
|
||||
@RequestParam(value = "menuNo", required = false) String menuNo) {
|
||||
|
||||
String link = linkPage;
|
||||
link = link.replace(";", "");
|
||||
link = link.replace(".", "");
|
||||
|
||||
// service 사용하여 리턴할 결과값 처리하는 부분은 생략하고 단순 페이지 링크만 처리함
|
||||
if (linkPage.equals("")) {
|
||||
link = "cmm/error/egovError";
|
||||
} else {
|
||||
if (link.indexOf(",") > -1) {
|
||||
link = link.substring(0, link.indexOf(","));
|
||||
}
|
||||
}
|
||||
|
||||
// 선택된 메뉴정보를 세션으로 등록한다.
|
||||
if (menuNo != null && !menuNo.equals("")) {
|
||||
session.setAttribute("menuNo", menuNo);
|
||||
}
|
||||
|
||||
// 화이트 리스트 처리
|
||||
// whitelist목록에 있는 경우 결과가 true, 결과가 false인경우 FAIL처리
|
||||
if (egovWhitelist.contains(link) == false) {
|
||||
log.debug("Page Link WhiteList Error! Please check whitelist!" + link);
|
||||
link = "cmm/error/egovError";
|
||||
}
|
||||
// 안전한 경로 문자열로 조치
|
||||
link = EgovWebUtil.filePathBlackList(link);
|
||||
|
||||
return link;
|
||||
}
|
||||
|
||||
/**
|
||||
* validation rule dynamic java script
|
||||
*/
|
||||
@RequestMapping(value="/validator.do", method = RequestMethod.GET)
|
||||
public String validate(){
|
||||
return "cmm/validator";
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,132 +0,0 @@
|
||||
package egovframework.let.sym.cal.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* 휴일에 관한 서비스 인터페이스 클래스를 정의한다
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
public interface EgovCalRestdeManageService {
|
||||
|
||||
/**
|
||||
* 일반달력 팝업 정보를 조회한다.
|
||||
* @param restde
|
||||
* @return List(일반달력 팝업 날짜정보)
|
||||
* @throws Exception
|
||||
*/
|
||||
List<?> selectNormalRestdePopup(Restde restde) throws Exception;
|
||||
|
||||
/**
|
||||
* 행정달력 팝업 정보를 조회한다.
|
||||
* @param restde
|
||||
* @return List(행정달력 팝업 날짜정보)
|
||||
* @throws Exception
|
||||
*/
|
||||
List<?> selectAdministRestdePopup(Restde restde) throws Exception;
|
||||
|
||||
/**
|
||||
* 일반달력 일간 정보를 조회한다.
|
||||
* @param restde
|
||||
* @return List(일반달력 일간 날짜정보)
|
||||
* @throws Exception
|
||||
*/
|
||||
List<?> selectNormalDayCal(Restde restde) throws Exception;
|
||||
|
||||
/**
|
||||
* 일반달력 일간 휴일을 조회한다.
|
||||
* @param restde
|
||||
* @return List(일반달력 일간 휴일정보)
|
||||
* @throws Exception
|
||||
*/
|
||||
List<?> selectNormalDayRestde(Restde restde) throws Exception;
|
||||
|
||||
/**
|
||||
* 일반달력 월간 휴일을 조회한다.
|
||||
* @param restde
|
||||
* @return List(일반달력 월간 휴일정보)
|
||||
* @throws Exception
|
||||
*/
|
||||
List<?> selectNormalMonthRestde(Restde restde) throws Exception;
|
||||
|
||||
/**
|
||||
* 행정달력 일간 정보를 조회한다.
|
||||
* @param restde
|
||||
* @return List(행정달력 일간 날짜정보)
|
||||
* @throws Exception
|
||||
*/
|
||||
List<?> selectAdministDayCal(Restde restde) throws Exception;
|
||||
|
||||
/**
|
||||
* 행정달력 일간 휴일을 조회한다.
|
||||
* @param restde
|
||||
* @return List(행정달력 일간 휴일정보)
|
||||
* @throws Exception
|
||||
*/
|
||||
List<?> selectAdministDayRestde(Restde restde) throws Exception;
|
||||
|
||||
/**
|
||||
* 행정달력 월간 휴일을 조회한다.
|
||||
* @param restde
|
||||
* @return List(행정달력 월간 휴일정보)
|
||||
* @throws Exception
|
||||
*/
|
||||
List<?> selectAdministMonthRestde(Restde restde) throws Exception;
|
||||
|
||||
/**
|
||||
* 휴일을 삭제한다.
|
||||
* @param restde
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteRestde(Restde restde) throws Exception;
|
||||
|
||||
/**
|
||||
* 휴일을 등록한다.
|
||||
* @param restde
|
||||
* @throws Exception
|
||||
*/
|
||||
void insertRestde(Restde restde) throws Exception;
|
||||
|
||||
/**
|
||||
* 휴일 상세항목을 조회한다.
|
||||
* @param restde
|
||||
* @return Restde(휴일)
|
||||
* @throws Exception
|
||||
*/
|
||||
Restde selectRestdeDetail(Restde restde) throws Exception;
|
||||
|
||||
/**
|
||||
* 휴일 목록을 조회한다.
|
||||
* @param searchVO
|
||||
* @return List(휴일 목록)
|
||||
* @throws Exception
|
||||
*/
|
||||
List<?> selectRestdeList(RestdeVO searchVO) throws Exception;
|
||||
|
||||
/**
|
||||
* 휴일 총 갯수를 조회한다.
|
||||
* @param searchVO
|
||||
* @return int(휴일 총 갯수)
|
||||
*/
|
||||
int selectRestdeListTotCnt(RestdeVO searchVO) throws Exception;
|
||||
|
||||
/**
|
||||
* 휴일을 수정한다.
|
||||
* @param restde
|
||||
* @throws Exception
|
||||
*/
|
||||
void updateRestde(Restde restde) throws Exception;
|
||||
|
||||
}
|
||||
@ -1,123 +0,0 @@
|
||||
package egovframework.let.sym.cal.service;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* 휴일 모델 클래스
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class Restde implements Serializable {
|
||||
|
||||
/**
|
||||
* serialVersionUID
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/*
|
||||
* 휴일번호
|
||||
*/
|
||||
private int restdeNo = 0;
|
||||
|
||||
/*
|
||||
* 휴일일자
|
||||
*/
|
||||
private String restdeDe = "";
|
||||
|
||||
/*
|
||||
* 휴일명
|
||||
*/
|
||||
private String restdeNm = "";
|
||||
|
||||
/*
|
||||
* 휴일설명
|
||||
*/
|
||||
private String restdeDc = "";
|
||||
|
||||
/*
|
||||
* 휴일구분
|
||||
*/
|
||||
private String restdeSe = "";
|
||||
|
||||
/*
|
||||
* 휴일구분코드
|
||||
*/
|
||||
private String restdeSeCode = "";
|
||||
|
||||
/*
|
||||
* 최초등록자ID
|
||||
*/
|
||||
private String frstRegisterId = "";
|
||||
|
||||
/*
|
||||
* 최종수정자ID
|
||||
*/
|
||||
private String lastUpdusrId = "";
|
||||
|
||||
/*
|
||||
* 년
|
||||
*/
|
||||
private String year = "";
|
||||
|
||||
/*
|
||||
* 월
|
||||
*/
|
||||
private String month = "";
|
||||
|
||||
/*
|
||||
* 일
|
||||
*/
|
||||
private String day = "";
|
||||
|
||||
/*
|
||||
* 휴일여부
|
||||
*/
|
||||
private String restdeAt = "";
|
||||
|
||||
/*
|
||||
* 달력셀
|
||||
*/
|
||||
private int cellNum = 0;
|
||||
|
||||
/*
|
||||
* 월별 주순위
|
||||
*/
|
||||
private int weeks = 0;
|
||||
|
||||
/*
|
||||
* 월 주수
|
||||
*/
|
||||
private int maxWeeks = 0;
|
||||
|
||||
/*
|
||||
* 요일
|
||||
*/
|
||||
private int week = 0;
|
||||
|
||||
/*
|
||||
* 시작요일
|
||||
*/
|
||||
private int startWeekMonth = 0;
|
||||
|
||||
/*
|
||||
* 마지막 일자
|
||||
*/
|
||||
private int lastDayMonth = 0;
|
||||
|
||||
}
|
||||
@ -1,69 +0,0 @@
|
||||
package egovframework.let.sym.cal.service;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
|
||||
/**
|
||||
*
|
||||
* 휴일 VO 클래스
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class RestdeVO extends Restde implements Serializable {
|
||||
|
||||
/**
|
||||
* serialVersionUID
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 검색조건 */
|
||||
private String searchCondition = "";
|
||||
|
||||
/** 검색Keyword */
|
||||
private String searchKeyword = "";
|
||||
|
||||
/** 검색사용여부 */
|
||||
private String searchUseYn = "";
|
||||
|
||||
/** 현재페이지 */
|
||||
private int pageIndex = 1;
|
||||
|
||||
/** 페이지갯수 */
|
||||
private int pageUnit = 10;
|
||||
|
||||
/** 페이지사이즈 */
|
||||
private int pageSize = 10;
|
||||
|
||||
/** firstIndex */
|
||||
private int firstIndex = 1;
|
||||
|
||||
/** lastIndex */
|
||||
private int lastIndex = 1;
|
||||
|
||||
/** recordCountPerPage */
|
||||
private int recordCountPerPage = 10;
|
||||
|
||||
/**
|
||||
* toString 메소드를 대치한다.
|
||||
*/
|
||||
public String toString() {
|
||||
return ToStringBuilder.reflectionToString(this);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,153 +0,0 @@
|
||||
package egovframework.let.sym.cal.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.let.sym.cal.service.EgovCalRestdeManageService;
|
||||
import egovframework.let.sym.cal.service.Restde;
|
||||
import egovframework.let.sym.cal.service.RestdeVO;
|
||||
|
||||
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* 휴일에 대한 서비스 구현클래스를 정의한다
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Service("RestdeManageService")
|
||||
public class EgovCalRestdeManageServiceImpl extends EgovAbstractServiceImpl implements EgovCalRestdeManageService {
|
||||
|
||||
@Resource(name="RestdeManageDAO")
|
||||
private RestdeManageDAO restdeManageDAO;
|
||||
|
||||
/**
|
||||
* 일반달력 팝업 정보를 조회한다.
|
||||
*/
|
||||
@Override
|
||||
public List<?> selectNormalRestdePopup(Restde restde) throws Exception {
|
||||
return restdeManageDAO.selectNormalRestdePopup(restde);
|
||||
}
|
||||
|
||||
/**
|
||||
* 행정달력 팝업 정보를 조회한다.
|
||||
*/
|
||||
@Override
|
||||
public List<?> selectAdministRestdePopup(Restde restde) throws Exception {
|
||||
return restdeManageDAO.selectAdministRestdePopup(restde);
|
||||
}
|
||||
|
||||
/**
|
||||
* 일반달력 일간 정보를 조회한다.
|
||||
*/
|
||||
@Override
|
||||
public List<?> selectNormalDayCal(Restde restde) throws Exception {
|
||||
return restdeManageDAO.selectNormalDayCal(restde);
|
||||
}
|
||||
|
||||
/**
|
||||
* 일반달력 일간 휴일을 조회한다.
|
||||
*/
|
||||
@Override
|
||||
public List<?> selectNormalDayRestde(Restde restde) throws Exception {
|
||||
return restdeManageDAO.selectNormalDayRestde(restde);
|
||||
}
|
||||
|
||||
/**
|
||||
* 일반달력 월간 휴일을 조회한다.
|
||||
*/
|
||||
@Override
|
||||
public List<?> selectNormalMonthRestde(Restde restde) throws Exception {
|
||||
return restdeManageDAO.selectNormalMonthRestde(restde);
|
||||
}
|
||||
|
||||
/**
|
||||
* 행정달력 일간 정보를 조회한다.
|
||||
*/
|
||||
@Override
|
||||
public List<?> selectAdministDayCal(Restde restde) throws Exception {
|
||||
return restdeManageDAO.selectAdministDayCal(restde);
|
||||
}
|
||||
|
||||
/**
|
||||
* 행정달력 일간 휴일을 조회한다.
|
||||
*/
|
||||
@Override
|
||||
public List<?> selectAdministDayRestde(Restde restde) throws Exception {
|
||||
return restdeManageDAO.selectAdministDayRestde(restde);
|
||||
}
|
||||
|
||||
/**
|
||||
* 행정달력 월간 휴일을 조회한다.
|
||||
*/
|
||||
@Override
|
||||
public List<?> selectAdministMonthRestde(Restde restde) throws Exception {
|
||||
return restdeManageDAO.selectAdministMonthRestde(restde);
|
||||
}
|
||||
|
||||
/**
|
||||
* 휴일을 삭제한다.
|
||||
*/
|
||||
@Override
|
||||
public void deleteRestde(Restde restde) throws Exception {
|
||||
restdeManageDAO.deleteRestde(restde);
|
||||
}
|
||||
|
||||
/**
|
||||
* 휴일을 등록한다.
|
||||
*/
|
||||
@Override
|
||||
public void insertRestde(Restde restde) throws Exception {
|
||||
restdeManageDAO.insertRestde(restde);
|
||||
}
|
||||
|
||||
/**
|
||||
* 휴일 상세항목을 조회한다.
|
||||
*/
|
||||
@Override
|
||||
public Restde selectRestdeDetail(Restde restde) throws Exception {
|
||||
Restde ret = restdeManageDAO.selectRestdeDetail(restde);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* 휴일 목록을 조회한다.
|
||||
*/
|
||||
@Override
|
||||
public List<?> selectRestdeList(RestdeVO searchVO) throws Exception {
|
||||
return restdeManageDAO.selectRestdeList(searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 휴일 총 갯수를 조회한다.
|
||||
*/
|
||||
@Override
|
||||
public int selectRestdeListTotCnt(RestdeVO searchVO) throws Exception {
|
||||
return restdeManageDAO.selectRestdeListTotCnt(searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 휴일을 수정한다.
|
||||
*/
|
||||
@Override
|
||||
public void updateRestde(Restde restde) throws Exception {
|
||||
restdeManageDAO.updateRestde(restde);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,171 +0,0 @@
|
||||
package egovframework.let.sym.cal.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.let.sym.cal.service.Restde;
|
||||
import egovframework.let.sym.cal.service.RestdeVO;
|
||||
|
||||
import org.egovframe.rte.psl.dataaccess.EgovAbstractMapper;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
*
|
||||
* 휴일에 대한 데이터 접근 클래스를 정의한다
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Repository("RestdeManageDAO")
|
||||
public class RestdeManageDAO extends EgovAbstractMapper {
|
||||
|
||||
/**
|
||||
* 일반달력 팝업 정보를 조회한다.
|
||||
* @param restde
|
||||
* @return List(일반달력 팝업 날짜정보)
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<?> selectNormalRestdePopup(Restde restde) throws Exception {
|
||||
return list("RestdeManageDAO.selectNormalRestdePopup", restde);
|
||||
}
|
||||
|
||||
/**
|
||||
* 행정달력 팝업 정보를 조회한다.
|
||||
* @param restde
|
||||
* @return List(행정달력 팝업 날짜정보)
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<?> selectAdministRestdePopup(Restde restde) throws Exception {
|
||||
return list("RestdeManageDAO.selectAdministRestdePopup", restde);
|
||||
}
|
||||
|
||||
/**
|
||||
* 일반달력 일간 정보를 조회한다.
|
||||
* @param restde
|
||||
* @return List(일반달력 일간 날짜정보)
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<?> selectNormalDayCal(Restde restde) throws Exception {
|
||||
return list("RestdeManageDAO.selectNormalDayCal", restde);
|
||||
}
|
||||
|
||||
/**
|
||||
* 일반달력 일간 휴일을 조회한다.
|
||||
* @param restde
|
||||
* @return List(일반달력 일간 휴일정보)
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<?> selectNormalDayRestde(Restde restde) throws Exception {
|
||||
return list("RestdeManageDAO.selectNormalDayRestde", restde);
|
||||
}
|
||||
|
||||
/**
|
||||
* 일반달력 월간 휴일을 조회한다.
|
||||
* @param restde
|
||||
* @return List(일반달력 월간 휴일정보)
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<?> selectNormalMonthRestde(Restde restde) throws Exception {
|
||||
return list("RestdeManageDAO.selectNormalMonthRestde", restde);
|
||||
}
|
||||
|
||||
/**
|
||||
* 행정달력 일간 정보를 조회한다.
|
||||
* @param restde
|
||||
* @return List(행정달력 일간 날짜정보)
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<?> selectAdministDayCal(Restde restde) throws Exception {
|
||||
return list("RestdeManageDAO.selectAdministDayCal", restde);
|
||||
}
|
||||
|
||||
/**
|
||||
* 행정달력 일간 휴일을 조회한다.
|
||||
* @param restde
|
||||
* @return List(행정달력 일간 휴일정보)
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<?> selectAdministDayRestde(Restde restde) throws Exception {
|
||||
return list("RestdeManageDAO.selectAdministDayRestde", restde);
|
||||
}
|
||||
|
||||
/**
|
||||
* 행정달력 월간 휴일을 조회한다.
|
||||
* @param restde
|
||||
* @return List(행정달력 월간 휴일정보)
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<?> selectAdministMonthRestde(Restde restde) throws Exception {
|
||||
return list("RestdeManageDAO.selectAdministMonthRestde", restde);
|
||||
}
|
||||
|
||||
/**
|
||||
* 휴일을 삭제한다.
|
||||
* @param restde
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteRestde(Restde restde) throws Exception {
|
||||
delete("RestdeManageDAO.deleteRestde", restde);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 휴일을 등록한다.
|
||||
* @param restde
|
||||
* @throws Exception
|
||||
*/
|
||||
public void insertRestde(Restde restde) throws Exception {
|
||||
insert("RestdeManageDAO.insertRestde", restde);
|
||||
}
|
||||
|
||||
/**
|
||||
* 휴일 상세항목을 조회한다.
|
||||
* @param restde
|
||||
* @return Restde(휴일)
|
||||
* @throws Exception
|
||||
*/
|
||||
public Restde selectRestdeDetail(Restde restde) throws Exception {
|
||||
return (Restde) selectOne("RestdeManageDAO.selectRestdeDetail", restde);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 휴일 목록을 조회한다.
|
||||
* @param searchVO
|
||||
* @return List(휴일 목록)
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<?> selectRestdeList(RestdeVO searchVO) throws Exception {
|
||||
return list("RestdeManageDAO.selectRestdeList", searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 글 총 갯수를 조회한다.
|
||||
* @param searchVO
|
||||
* @return int(휴일 총 갯수)
|
||||
* @throws Exception
|
||||
*/
|
||||
public int selectRestdeListTotCnt(RestdeVO searchVO) throws Exception {
|
||||
return (Integer)selectOne("RestdeManageDAO.selectRestdeListTotCnt", searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 휴일을 수정한다.
|
||||
* @param restde
|
||||
* @throws Exception
|
||||
*/
|
||||
public void updateRestde(Restde restde) throws Exception {
|
||||
update("RestdeManageDAO.updateRestde", restde);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,157 +0,0 @@
|
||||
package egovframework.let.sym.cal.web;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.apache.commons.collections.map.ListOrderedMap;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import egovframework.let.sym.cal.service.Restde;
|
||||
|
||||
import org.egovframe.rte.fdl.property.EgovPropertyService;
|
||||
|
||||
/**
|
||||
*
|
||||
* 공휴일에 관한 요청을 받아 서비스 클래스로 요청을 전달하고 서비스클래스에서 처리한 결과를 웹 화면으로 전달을 위한 Controller를 정의한다
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Controller
|
||||
public class EgovCalRestdeManageController {
|
||||
|
||||
/** EgovPropertyService */
|
||||
@Resource(name = "propertiesService")
|
||||
protected EgovPropertyService propertiesService;
|
||||
|
||||
/**
|
||||
* 일반달력 팝업 메인창을 호출한다.
|
||||
* @param model
|
||||
* @return "/cmm/sym/cal/EgovNormalCalPopup"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/sym/cmm/EgovNormalCalPopup.do")
|
||||
public String callNormalCalPopup(ModelMap model) throws Exception {
|
||||
return "/cmm/sym/cal/EgovNormalCalPopup";
|
||||
}
|
||||
|
||||
/**
|
||||
* 일반달력 팝업 정보를 조회한다.
|
||||
* @param restde
|
||||
* @param model
|
||||
* @return "/cmm/sym/cal/EgovNormalCalendar"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/sym/cmm/EgovselectNormalCalendar.do")
|
||||
public String selectNormalRestdePopup(Restde restde, ModelMap model) throws Exception {
|
||||
|
||||
Calendar cal = Calendar.getInstance();
|
||||
|
||||
if (restde.getYear() == null || restde.getYear().equals("")) {
|
||||
restde.setYear(Integer.toString(cal.get(Calendar.YEAR)));
|
||||
}
|
||||
if (restde.getMonth() == null || restde.getMonth().equals("")) {
|
||||
restde.setMonth(Integer.toString(cal.get(Calendar.MONTH) + 1));
|
||||
}
|
||||
int iYear = Integer.parseInt(restde.getYear());
|
||||
int iMonth = Integer.parseInt(restde.getMonth());
|
||||
|
||||
if (iMonth < 1) {
|
||||
iYear--;
|
||||
iMonth = 12;
|
||||
}
|
||||
if (iMonth > 12) {
|
||||
iYear++;
|
||||
iMonth = 1;
|
||||
}
|
||||
if (iYear < 1) {
|
||||
iYear = 1;
|
||||
iMonth = 1;
|
||||
}
|
||||
if (iYear > 9999) {
|
||||
iYear = 9999;
|
||||
iMonth = 12;
|
||||
}
|
||||
|
||||
/* DB를 사용할 경우 처리
|
||||
restde.setYear(Integer.toString(iYear));
|
||||
restde.setMonth(Integer.toString(iMonth));
|
||||
|
||||
cal.set(iYear,iMonth-1,1);
|
||||
|
||||
restde.setStartWeekMonth(cal.get(Calendar.DAY_OF_WEEK));
|
||||
restde.setLastDayMonth(cal.getActualMaximum(Calendar.DATE));
|
||||
|
||||
List CalInfoList = restdeManageService.selectNormalRestdePopup(restde);
|
||||
*/
|
||||
|
||||
cal.set(iYear, iMonth - 1, 1);
|
||||
|
||||
int firstWeek = cal.get(Calendar.DAY_OF_WEEK);
|
||||
int lastDay = cal.getActualMaximum(Calendar.DATE);
|
||||
int week = cal.get(Calendar.DAY_OF_WEEK);
|
||||
|
||||
String year = Integer.toString(iYear);
|
||||
String month = Integer.toString(iMonth);
|
||||
//String day = Integer.toString(cal.get(Calendar.DAY_OF_MONTH));
|
||||
|
||||
restde.setStartWeekMonth(firstWeek);
|
||||
restde.setLastDayMonth(lastDay);
|
||||
restde.setYear(year);
|
||||
restde.setMonth(month);
|
||||
|
||||
List<ListOrderedMap> CalInfoList = new ArrayList<ListOrderedMap>();
|
||||
String tmpDay = "";
|
||||
|
||||
/**
|
||||
* 계산... START
|
||||
*/
|
||||
for (int i = 0; i < 42; i++) {
|
||||
ListOrderedMap map = new ListOrderedMap();
|
||||
int cc = i + 1;
|
||||
int dd = cc - firstWeek + 1;
|
||||
|
||||
if (dd > 0 && dd <= lastDay) {
|
||||
tmpDay = Integer.toString(dd);
|
||||
} else {
|
||||
tmpDay = "";
|
||||
}
|
||||
|
||||
map.put("year", year);
|
||||
map.put("month", month);
|
||||
map.put("day", tmpDay);
|
||||
map.put("cellNum", cc);
|
||||
map.put("weeks", (cc - 1) / 7 + 1);
|
||||
map.put("week", (week - 1) % 7 + 1);
|
||||
map.put("restAt", ((week - 1) % 7 + 1 == 1) ? "Y" : "N");
|
||||
|
||||
if (dd > 0 && dd <= lastDay) {
|
||||
week++;
|
||||
}
|
||||
CalInfoList.add(map);
|
||||
|
||||
}
|
||||
/**
|
||||
* 계산... END
|
||||
*/
|
||||
|
||||
model.addAttribute("resultList", CalInfoList);
|
||||
return "/cmm/sym/cal/EgovNormalCalendar";
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue