소장자료 페이지 틀 개발
This commit is contained in:
parent
05c57cf74f
commit
3133b68d8b
@ -13,4 +13,6 @@ public interface CodeService
|
|||||||
{
|
{
|
||||||
public List<HashMap<String, String>> listCodes(String iCodeId) throws Exception;
|
public List<HashMap<String, String>> listCodes(String iCodeId) throws Exception;
|
||||||
|
|
||||||
|
public List<HashMap<String, String>> listCtClsfs() throws Exception;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,9 +6,45 @@ public class PagingVO {
|
|||||||
|
|
||||||
int pageIndex = 1; /* 페이지 번호 */
|
int pageIndex = 1; /* 페이지 번호 */
|
||||||
int pageSize = DEFAULT_PAGE_SIZE; /* 페이지 크기 (1페이지당 보여줄 자료건수) */
|
int pageSize = DEFAULT_PAGE_SIZE; /* 페이지 크기 (1페이지당 보여줄 자료건수) */
|
||||||
int totRecordCount; /* 총건수 */
|
int totRecordCount = 0; /* 총건수 */
|
||||||
int pageStart = 0; /* 시작번호 (limit용)*/
|
int pageStart = 0; /* 시작번호 (limit용)*/
|
||||||
|
int startPage = 0; /*시작페이지 */
|
||||||
|
int endPage = 0; /* 끝페이지 */
|
||||||
|
int lastPage = 0; /* 마지막페이지 */
|
||||||
|
|
||||||
|
private int cntPage = 5; /* 노출되는 페이지 개수 ex) << < 1 2 3 4 5 > >> */
|
||||||
|
|
||||||
|
public int getStartPage() {
|
||||||
|
return startPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCntPage() {
|
||||||
|
return cntPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCntPage(int cntPage) {
|
||||||
|
this.cntPage = cntPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStartPage(int startPage) {
|
||||||
|
this.startPage = startPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getEndPage() {
|
||||||
|
return endPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEndPage(int endPage) {
|
||||||
|
this.endPage = endPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getLastPage() {
|
||||||
|
return lastPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastPage(int lastPage) {
|
||||||
|
this.lastPage = lastPage;
|
||||||
|
}
|
||||||
|
|
||||||
public int getPageStart() {
|
public int getPageStart() {
|
||||||
return pageStart;
|
return pageStart;
|
||||||
@ -67,4 +103,39 @@ public class PagingVO {
|
|||||||
|
|
||||||
return ((pageIndex - 1) * pageSize);
|
return ((pageIndex - 1) * pageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setPagingVO(int totRecordCount, int pageIndex, int pageSize) {
|
||||||
|
setPageIndex(pageIndex);
|
||||||
|
//현재 페이지
|
||||||
|
setPageSize(pageSize);
|
||||||
|
//페이지 당 게시글수
|
||||||
|
setTotRecordCount(totRecordCount);
|
||||||
|
//게시글 총 갯수
|
||||||
|
calcLastPage(totRecordCount,pageSize);
|
||||||
|
//제일 마지막 페이지 계산
|
||||||
|
|
||||||
|
//시작 끝 페이지 계산 - 아래.
|
||||||
|
calcStartEndPage(pageIndex, cntPage);
|
||||||
|
setPageStart(pageIndex, pageSize);
|
||||||
|
|
||||||
|
}
|
||||||
|
// 제일 마지막 페이지 계산
|
||||||
|
public void calcLastPage(int totRecordCount, int pageSize) {
|
||||||
|
setLastPage((int) Math.ceil((double)totRecordCount / (double)pageSize));
|
||||||
|
}
|
||||||
|
// 시작, 끝 페이지 계산
|
||||||
|
public void calcStartEndPage(int pageIndex, int cntPage) {
|
||||||
|
setEndPage(((int)Math.ceil((double)pageIndex / (double)cntPage )) * cntPage );
|
||||||
|
if (getLastPage() < getEndPage()) {
|
||||||
|
setEndPage(getLastPage());
|
||||||
|
}
|
||||||
|
setStartPage(getEndPage() - cntPage + 1);
|
||||||
|
if (getStartPage() < 1) {
|
||||||
|
setStartPage(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// DB 쿼리에서 사용할 start값 계산
|
||||||
|
public void setPageStart(int pageIndex, int pageSize) {
|
||||||
|
this.pageStart = ((pageIndex - 1) * pageSize);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,4 +31,6 @@ import egovframework.rte.psl.dataaccess.mapper.Mapper;
|
|||||||
public interface CodeDAO {
|
public interface CodeDAO {
|
||||||
|
|
||||||
public List<HashMap<String, String>> listCodes(String iCodeId) throws Exception;
|
public List<HashMap<String, String>> listCodes(String iCodeId) throws Exception;
|
||||||
|
|
||||||
|
public List<HashMap<String, String>> listCtClsfs() throws Exception;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,4 +27,8 @@ public class CodeServiceImpl extends EgovAbstractServiceImpl implements CodeServ
|
|||||||
|
|
||||||
return codeDAO.listCodes(iCodeId.toUpperCase());
|
return codeDAO.listCodes(iCodeId.toUpperCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<HashMap<String, String>> listCtClsfs() throws Exception {
|
||||||
|
return codeDAO.listCtClsfs();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -22,11 +22,11 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
|||||||
@Controller
|
@Controller
|
||||||
public class KakaoController {
|
public class KakaoController {
|
||||||
|
|
||||||
private final static String K_CLIENT_ID = "e74d25210853313dd1fead4c6c1f06ec";
|
private final static String K_CLIENT_ID = "dawsdasd";
|
||||||
|
|
||||||
public static String getAuthorizationUrl(HttpSession session,String K_REDIRECT_URI) {
|
public static String getAuthorizationUrl(HttpSession session,String K_REDIRECT_URI) {
|
||||||
String kakaoUrl = "https://kauth.kakao.com/oauth/authorize?" + "client_id=" + K_CLIENT_ID + "&redirect_uri="
|
String kakaoUrl = "https://kauth.kakao.com/oauth/authorize?" + "client_id=" + K_CLIENT_ID
|
||||||
+ K_REDIRECT_URI + "&response_type=code";
|
+ "&redirect_uri="+ K_REDIRECT_URI + "&response_type=code";
|
||||||
return kakaoUrl;
|
return kakaoUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -22,6 +22,10 @@ public interface CollectionService
|
|||||||
|
|
||||||
public RisVO selectRisInfo(RisVO vo);
|
public RisVO selectRisInfo(RisVO vo);
|
||||||
|
|
||||||
public List<DeptVO> selectOrgList(CollectionVO vo);
|
public List<DeptVO> selectOrgList();
|
||||||
|
|
||||||
|
public List<CollectionVO> listItems(CollectionVO searchCollectionVO);
|
||||||
|
|
||||||
|
public int countListItems(CollectionVO searchCollectionVO);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -17,4 +17,6 @@ public interface InterestService
|
|||||||
|
|
||||||
public int countInterest(CollectionVO vo);
|
public int countInterest(CollectionVO vo);
|
||||||
|
|
||||||
|
public List<DeptVO> selectOrgList(CollectionVO vo);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -80,10 +80,28 @@ public class CollectionDAO extends EgovComAbstractDAO
|
|||||||
return selectOne("CollectionDAO.selectRisInfo", vo);
|
return selectOne("CollectionDAO.selectRisInfo", vo);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 문화원 목록 조회
|
* 문화원 목록 조회(검색필터용)
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<DeptVO> selectOrgList(CollectionVO vo) {
|
public List<DeptVO> selectOrgList() {
|
||||||
return selectList("CollectionDAO.selectOrgList",vo);
|
return selectList("CollectionDAO.selectOrgList");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 소장자료 목록 조회
|
||||||
|
* @param searchCollectionVO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<CollectionVO> listItems(CollectionVO searchCollectionVO) {
|
||||||
|
return selectList("CollectionDAO.listItems",searchCollectionVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 소장자료 목록 개수 조회
|
||||||
|
* @param searchCollectionVO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int countListItems(CollectionVO searchCollectionVO) {
|
||||||
|
return selectOne("CollectionDAO.countListItems",searchCollectionVO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -69,11 +69,29 @@ public class CollectionServiceImpl implements CollectionService
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 문화원 목록 조회
|
* 문화원 목록 조회(검색 필터용)
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see nlib.col.service.CollectionService#selectOrgList()
|
* @see nlib.col.service.CollectionService#selectOrgList()
|
||||||
*/
|
*/
|
||||||
public List<DeptVO> selectOrgList(CollectionVO vo) {
|
public List<DeptVO> selectOrgList() {
|
||||||
return collectionDAO.selectOrgList(vo);
|
return collectionDAO.selectOrgList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 소장자료 목록 조회
|
||||||
|
* (non-Javadoc)
|
||||||
|
* @see nlib.col.service.CollectionService#listItems(nlib.col.service.CollectionVO)
|
||||||
|
*/
|
||||||
|
public List<CollectionVO> listItems(CollectionVO searchCollectionVO) {
|
||||||
|
return collectionDAO.listItems(searchCollectionVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 소장자료 목록 개수 조회
|
||||||
|
* (non-Javadoc)
|
||||||
|
* @see nlib.col.service.CollectionService#countListItems(nlib.col.service.CollectionVO)
|
||||||
|
*/
|
||||||
|
public int countListItems(CollectionVO searchCollectionVO) {
|
||||||
|
return collectionDAO.countListItems(searchCollectionVO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -8,6 +8,7 @@ import org.springframework.stereotype.Repository;
|
|||||||
|
|
||||||
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
|
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
|
||||||
import nlib.col.service.CollectionVO;
|
import nlib.col.service.CollectionVO;
|
||||||
|
import nlib.col.service.DeptVO;
|
||||||
import nlib.restful.DataApi;
|
import nlib.restful.DataApi;
|
||||||
import nlib.restful.service.DataApiReqVO;
|
import nlib.restful.service.DataApiReqVO;
|
||||||
import nlib.restful.service.DataApiResVO;
|
import nlib.restful.service.DataApiResVO;
|
||||||
@ -60,4 +61,11 @@ public class InterestDAO extends EgovComAbstractDAO
|
|||||||
public void insertInterest(CollectionVO vo) {
|
public void insertInterest(CollectionVO vo) {
|
||||||
insert("InterestDAO.insertInterest",vo);
|
insert("InterestDAO.insertInterest",vo);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 문화원 목록 조회
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<DeptVO> selectOrgList(CollectionVO vo) {
|
||||||
|
return selectList("InterestDAO.selectOrgList",vo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -10,6 +10,7 @@ import org.springframework.stereotype.Service;
|
|||||||
|
|
||||||
import nlib.col.service.CartService;
|
import nlib.col.service.CartService;
|
||||||
import nlib.col.service.CollectionVO;
|
import nlib.col.service.CollectionVO;
|
||||||
|
import nlib.col.service.DeptVO;
|
||||||
import nlib.col.service.InterestService;
|
import nlib.col.service.InterestService;
|
||||||
import nlib.restful.service.DataApiReqVO;
|
import nlib.restful.service.DataApiReqVO;
|
||||||
import nlib.restful.service.DataApiResVO;
|
import nlib.restful.service.DataApiResVO;
|
||||||
@ -70,4 +71,12 @@ public class InterestServiceImpl implements InterestService
|
|||||||
public void insertInterest(CollectionVO vo) {
|
public void insertInterest(CollectionVO vo) {
|
||||||
interestDAO.insertInterest(vo);
|
interestDAO.insertInterest(vo);
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
* 문화원 목록 조회
|
||||||
|
* (non-Javadoc)
|
||||||
|
* @see nlib.col.service.CollectionService#selectOrgList()
|
||||||
|
*/
|
||||||
|
public List<DeptVO> selectOrgList(CollectionVO vo) {
|
||||||
|
return interestDAO.selectOrgList(vo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -30,9 +30,11 @@ import nlib.bbs.service.ArticleVO;
|
|||||||
import nlib.cmm.NlibCommonController;
|
import nlib.cmm.NlibCommonController;
|
||||||
import nlib.cmm.service.CodeService;
|
import nlib.cmm.service.CodeService;
|
||||||
import nlib.cmm.service.NlibProperty;
|
import nlib.cmm.service.NlibProperty;
|
||||||
|
import nlib.cmm.service.PagingVO;
|
||||||
import nlib.col.service.CollectionService;
|
import nlib.col.service.CollectionService;
|
||||||
import nlib.col.service.CollectionVO;
|
import nlib.col.service.CollectionVO;
|
||||||
import nlib.col.service.DeptVO;
|
import nlib.col.service.DeptVO;
|
||||||
|
import nlib.col.service.InterestService;
|
||||||
import nlib.col.service.RisVO;
|
import nlib.col.service.RisVO;
|
||||||
import nlib.restful.service.DataApiReqVO;
|
import nlib.restful.service.DataApiReqVO;
|
||||||
import nlib.restful.service.DataApiResVO;
|
import nlib.restful.service.DataApiResVO;
|
||||||
@ -55,6 +57,9 @@ public class CollectionController extends NlibCommonController
|
|||||||
@Resource(name="collectionService")
|
@Resource(name="collectionService")
|
||||||
private CollectionService collectionService;
|
private CollectionService collectionService;
|
||||||
|
|
||||||
|
@Resource(name = "interestService")
|
||||||
|
private InterestService interestService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 소장자료 화면을 호출한다.
|
* 소장자료 화면을 호출한다.
|
||||||
*
|
*
|
||||||
@ -66,15 +71,31 @@ public class CollectionController extends NlibCommonController
|
|||||||
String searchKeyword = paramMap.get("searchKeyword");
|
String searchKeyword = paramMap.get("searchKeyword");
|
||||||
String pageIndex = StringUtil.getString(paramMap.get("pageIndex"), "1");
|
String pageIndex = StringUtil.getString(paramMap.get("pageIndex"), "1");
|
||||||
String pageSize = StringUtil.getString(paramMap.get("pageSize") , DEFUALT_PAGE_SIZE);
|
String pageSize = StringUtil.getString(paramMap.get("pageSize") , DEFUALT_PAGE_SIZE);
|
||||||
|
List<DeptVO> vo = new ArrayList();
|
||||||
|
|
||||||
// 페이징 사이즈 코드 목록 조회 (DB방식으로 변경 2021.08.06 KNKIM)
|
// 페이징 사이즈 코드 목록 조회 (DB방식으로 변경 2021.08.06 KNKIM)
|
||||||
List<HashMap<String,String>> pageSizeCodes = codeService.listCodes("PAGE_SIZE_OPTION");
|
List<HashMap<String,String>> pageSizeCodes = codeService.listCodes("PAGE_SIZE_OPTION");
|
||||||
|
|
||||||
|
// 자료유형 코드 목록 조회
|
||||||
|
List<HashMap<String,String>> masterType = codeService.listCodes("MASTER_TYPE_DIV_CD");
|
||||||
|
List<HashMap<String,String>> dtlsType = codeService.listCodes("DTLS_TYPE_DIV_CD");
|
||||||
|
|
||||||
|
//주제분야 목록 조회
|
||||||
|
List<HashMap<String,String>> clsf = codeService.listCtClsfs();
|
||||||
|
|
||||||
|
//문화원 목록 조회
|
||||||
|
vo = collectionService.selectOrgList();
|
||||||
|
|
||||||
// 반환 정보
|
// 반환 정보
|
||||||
model.addAttribute("pageIndex" , pageIndex);
|
model.addAttribute("pageIndex" , pageIndex);
|
||||||
model.addAttribute("pageSize" , pageSize);
|
model.addAttribute("pageSize" , pageSize);
|
||||||
model.addAttribute("searchKeyword", searchKeyword);
|
model.addAttribute("searchKeyword", searchKeyword);
|
||||||
model.addAttribute("pageSizeCodes", pageSizeCodes);
|
model.addAttribute("pageSizeCodes", pageSizeCodes);
|
||||||
|
model.addAttribute("masterType", masterType);
|
||||||
|
model.addAttribute("dtlsType", dtlsType);
|
||||||
|
model.addAttribute("masterClsf", clsf);
|
||||||
|
model.addAttribute("dtlsClsf", clsf);
|
||||||
|
model.addAttribute("orgList",vo);
|
||||||
return "nlib/collection/listItems";
|
return "nlib/collection/listItems";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,22 +107,37 @@ public class CollectionController extends NlibCommonController
|
|||||||
*/
|
*/
|
||||||
@RequestMapping(value="/collection/listItemsAjax.do")
|
@RequestMapping(value="/collection/listItemsAjax.do")
|
||||||
public ResponseEntity<String> listItemsAjax(HttpServletRequest req,
|
public ResponseEntity<String> listItemsAjax(HttpServletRequest req,
|
||||||
Authentication authentication, @RequestBody Map<String, String> paramMap) {
|
Authentication authentication, @RequestBody CollectionVO searchCollectionVO) {
|
||||||
|
|
||||||
String searchKeyword = paramMap.get("searchKeyword");
|
//String searchKeyword = paramMap.get("searchKeyword");
|
||||||
String pageIndex = StringUtil.getString(paramMap.get("pageIndex"), "1");
|
if(searchCollectionVO.getPageIndex() < 1) searchCollectionVO.setPageIndex(1);
|
||||||
String pageSize = StringUtil.getString(paramMap.get("pageSize") , DEFUALT_PAGE_SIZE);
|
if(searchCollectionVO.getPageSize() < 1) searchCollectionVO.setPageSize(DEFUALT_PAGE_SIZE);
|
||||||
|
|
||||||
|
|
||||||
|
int totalCount= 0;
|
||||||
|
//사용자 정보를 가져온다.
|
||||||
|
NlibLoginVO loginVO = getNlibLoginVO(authentication);
|
||||||
|
|
||||||
|
searchCollectionVO.setPageStart(searchCollectionVO.getPageIndex(), searchCollectionVO.getPageSize());
|
||||||
|
List<CollectionVO> List = new ArrayList();
|
||||||
|
|
||||||
|
// 요청
|
||||||
|
List = collectionService.listItems(searchCollectionVO);
|
||||||
|
totalCount = collectionService.countListItems(searchCollectionVO);
|
||||||
|
|
||||||
|
PagingVO pageVO = new PagingVO();
|
||||||
|
pageVO.setPagingVO(totalCount, searchCollectionVO.getPageIndex(), searchCollectionVO.getPageSize());
|
||||||
|
|
||||||
//-------------------------------
|
//-------------------------------
|
||||||
// REQ VO 구성
|
// REQ VO 구성
|
||||||
//-------------------------------
|
//-------------------------------
|
||||||
DataApiReqVO reqVO = new DataApiReqVO();
|
/*DataApiReqVO reqVO = new DataApiReqVO();
|
||||||
reqVO.setPageIndex(pageIndex);
|
reqVO.setPageIndex(pageIndex);
|
||||||
reqVO.setPageSize(pageSize);
|
reqVO.setPageSize(pageSize);
|
||||||
reqVO.addInfoItem("searchKeyword", searchKeyword);
|
reqVO.putInfoItem("searchKeyword", searchKeyword);
|
||||||
|
|
||||||
// 요청
|
// 요청
|
||||||
DataApiResVO resVO = collectionService.listItems(reqVO);
|
//DataApiResVO resVO = collectionService.listItems(reqVO);
|
||||||
|
|
||||||
//-------------------------------
|
//-------------------------------
|
||||||
// JSON변환 응답 처리
|
// JSON변환 응답 처리
|
||||||
@ -111,9 +147,10 @@ public class CollectionController extends NlibCommonController
|
|||||||
// itemsCount: 255
|
// itemsCount: 255
|
||||||
// }
|
// }
|
||||||
HashMap<String, Object> retMap = new HashMap<String, Object>();
|
HashMap<String, Object> retMap = new HashMap<String, Object>();
|
||||||
retMap.put("data", resVO.getList());
|
retMap.put("data", resVO.getList(DataApiVO.XML_EL_NAME_RECORD));
|
||||||
retMap.put("itemsCount", resVO.getRecordTotCount());
|
retMap.put("itemsCount", resVO.getRecordTotCount());
|
||||||
|
retMap.put("data", List);
|
||||||
|
retMap.put("pageVO", pageVO);
|
||||||
return makeResponseEntityJson(retMap);
|
return makeResponseEntityJson(retMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -158,7 +195,7 @@ public class CollectionController extends NlibCommonController
|
|||||||
|
|
||||||
if(Ty.length() > 3)
|
if(Ty.length() > 3)
|
||||||
{
|
{
|
||||||
Ty.replace("IT_", "");
|
Ty = Ty.replaceFirst("IT_", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
String s = "TY - " + Ty;
|
String s = "TY - " + Ty;
|
||||||
|
|||||||
@ -86,7 +86,7 @@ public class InterestController extends NlibCommonController
|
|||||||
searchCollectionVO.setMbInfoId(loginVO.getMbInfoId());
|
searchCollectionVO.setMbInfoId(loginVO.getMbInfoId());
|
||||||
|
|
||||||
//문화원 목록 조회
|
//문화원 목록 조회
|
||||||
vo = collectionService.selectOrgList(searchCollectionVO);
|
vo = interestService.selectOrgList(searchCollectionVO);
|
||||||
|
|
||||||
model.addAttribute("deptList",vo);
|
model.addAttribute("deptList",vo);
|
||||||
model.addAttribute("searchCollection", searchCollectionVO);
|
model.addAttribute("searchCollection", searchCollectionVO);
|
||||||
@ -111,7 +111,7 @@ public class InterestController extends NlibCommonController
|
|||||||
NlibLoginVO loginVO = getNlibLoginVO(authentication);
|
NlibLoginVO loginVO = getNlibLoginVO(authentication);
|
||||||
|
|
||||||
searchCollectionVO.setMbInfoId(loginVO.getMbInfoId());
|
searchCollectionVO.setMbInfoId(loginVO.getMbInfoId());
|
||||||
searchCollectionVO.setPageStart((searchCollectionVO.getPageIndex()-1) * searchCollectionVO.getPageSize());
|
searchCollectionVO.setPageStart(searchCollectionVO.getPageIndex(), searchCollectionVO.getPageSize());
|
||||||
List<CollectionVO> List = new ArrayList();
|
List<CollectionVO> List = new ArrayList();
|
||||||
|
|
||||||
// 요청
|
// 요청
|
||||||
|
|||||||
@ -5,7 +5,10 @@
|
|||||||
|
|
||||||
<select id="listCodes" parameterType="String" resultType="EgovMap">
|
<select id="listCodes" parameterType="String" resultType="EgovMap">
|
||||||
SELECT B.S_CODE_ID
|
SELECT B.S_CODE_ID
|
||||||
|
, B.COLUMN1
|
||||||
|
, B.COLUMN2
|
||||||
, B.S_CODE_NM
|
, B.S_CODE_NM
|
||||||
|
|
||||||
FROM SM_CODE_M A,
|
FROM SM_CODE_M A,
|
||||||
SM_CODE_S B
|
SM_CODE_S B
|
||||||
WHERE A.L_CODE_ID = #{lCodeId}
|
WHERE A.L_CODE_ID = #{lCodeId}
|
||||||
@ -15,4 +18,15 @@
|
|||||||
ORDER BY B.SORT_SEQ
|
ORDER BY B.SORT_SEQ
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="listCtClsfs" resultType="EgovMap">
|
||||||
|
SELECT
|
||||||
|
CLSF_ID
|
||||||
|
,CLSF_NM
|
||||||
|
,UP_CLSF_ID
|
||||||
|
FROM
|
||||||
|
CT_CLSF
|
||||||
|
WHERE 1=1
|
||||||
|
ORDER BY REMARK;
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -13,8 +13,8 @@
|
|||||||
AND MASTER_ID = #{masterId}
|
AND MASTER_ID = #{masterId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectOrgList" parameterType="CollectionVO" resultType="DeptVO" >
|
<select id="selectOrgList" resultType="DeptVO" >
|
||||||
/* CollectionDAO.selectOrgList 문화원 목록 조회 */
|
/* CollectionDAO.selectOrgList 문화원 목록 조회 (검색 필터용) */
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
SELECT
|
SELECT
|
||||||
ORG_CD
|
ORG_CD
|
||||||
@ -24,17 +24,37 @@
|
|||||||
INNER JOIN
|
INNER JOIN
|
||||||
RG_MASTER RM
|
RG_MASTER RM
|
||||||
ON SD.ORG_CD = RM.MNG_ORG_CD
|
ON SD.ORG_CD = RM.MNG_ORG_CD
|
||||||
INNER JOIN
|
|
||||||
MB_INTEREST MI
|
|
||||||
ON RM.MASTER_ID = MI.MASTER_ID
|
|
||||||
WHERE 1=1
|
WHERE 1=1
|
||||||
AND SD.USE_YN = "Y"
|
AND SD.USE_YN = "Y"
|
||||||
AND SD.CLOSE_FLAG = "0"
|
AND SD.CLOSE_FLAG = "0"
|
||||||
AND IFNULL(NULLIF(SD.APPLY_START_YMD,''),"99999999") < date_format(NOW(), '%Y%m%d')
|
AND IFNULL(NULLIF(SD.APPLY_START_YMD,''),"99999999") < date_format(NOW(), '%Y%m%d')
|
||||||
AND IFNULL(NULLIF(SD.APPLY_CLOSE_YMD,''),"99999999") > date_format(NOW(), '%Y%m%d')
|
AND IFNULL(NULLIF(SD.APPLY_CLOSE_YMD,''),"99999999") > date_format(NOW(), '%Y%m%d')
|
||||||
AND MI.USE_YN = "Y"
|
|
||||||
AND MI.MB_INFO_ID = #{mbInfoId}
|
|
||||||
GROUP BY ORG_CD,DEPT_NM
|
GROUP BY ORG_CD,DEPT_NM
|
||||||
|
ORDER BY ORG_CD
|
||||||
]]>
|
]]>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="listItems" parameterType="CollectionVO" resultType="CollectionVO">
|
||||||
|
/* CollectionDAO.listItems 소장자료 목록조회 */
|
||||||
|
SELECT
|
||||||
|
*
|
||||||
|
FROM
|
||||||
|
RG_MASTER RM
|
||||||
|
WHERE 1=1
|
||||||
|
AND USE_FLAG = "Y"
|
||||||
|
LIMIT #{pageStart},#{pageSize}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="countListItems" parameterType="CollectionVO" resultType="Integer">
|
||||||
|
/* CollectionDAO.countListItems 소장자료 목록 개수 조회 */
|
||||||
|
SELECT
|
||||||
|
COUNT(*)
|
||||||
|
FROM
|
||||||
|
RG_MASTER RM
|
||||||
|
WHERE 1=1
|
||||||
|
AND USE_FLAG = "Y"
|
||||||
|
<!-- <if test='mngOrgCd != null and !mngOrgCd.equals("")'>
|
||||||
|
AND MNG_ORG_CD = #{mngOrgCd}
|
||||||
|
</if> -->
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -82,4 +82,29 @@
|
|||||||
AND MI.MB_INFO_ID = #{mbInfoId}
|
AND MI.MB_INFO_ID = #{mbInfoId}
|
||||||
AND MI.USE_YN = "Y"
|
AND MI.USE_YN = "Y"
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectOrgList" parameterType="CollectionVO" resultType="DeptVO" >
|
||||||
|
/* InterestDAO.selectOrgList 문화원 목록 조회 */
|
||||||
|
<![CDATA[
|
||||||
|
SELECT
|
||||||
|
ORG_CD
|
||||||
|
,DEPT_NM
|
||||||
|
FROM
|
||||||
|
SM_DEPT SD
|
||||||
|
INNER JOIN
|
||||||
|
RG_MASTER RM
|
||||||
|
ON SD.ORG_CD = RM.MNG_ORG_CD
|
||||||
|
INNER JOIN
|
||||||
|
MB_INTEREST MI
|
||||||
|
ON RM.MASTER_ID = MI.MASTER_ID
|
||||||
|
WHERE 1=1
|
||||||
|
AND SD.USE_YN = "Y"
|
||||||
|
AND SD.CLOSE_FLAG = "0"
|
||||||
|
AND IFNULL(NULLIF(SD.APPLY_START_YMD,''),"99999999") < date_format(NOW(), '%Y%m%d')
|
||||||
|
AND IFNULL(NULLIF(SD.APPLY_CLOSE_YMD,''),"99999999") > date_format(NOW(), '%Y%m%d')
|
||||||
|
AND MI.USE_YN = "Y"
|
||||||
|
AND MI.MB_INFO_ID = #{mbInfoId}
|
||||||
|
GROUP BY ORG_CD,DEPT_NM
|
||||||
|
]]>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -14,16 +14,16 @@
|
|||||||
<!-- GOOGLE OAuth Configuration -->
|
<!-- GOOGLE OAuth Configuration -->
|
||||||
<bean id="googleAuthVO" class="egovframework.com.ext.oauth.service.OAuthVO">
|
<bean id="googleAuthVO" class="egovframework.com.ext.oauth.service.OAuthVO">
|
||||||
<constructor-arg value="google" /><!-- Service Name -->
|
<constructor-arg value="google" /><!-- Service Name -->
|
||||||
<constructor-arg value="259455195838-eh7b4cm9nuhbsbaktq2aectf7utkubfs.apps.googleusercontent.com" /><!-- googleClientID -->
|
<constructor-arg value="590802608410-a03ul9al205h3h8rvhrlr2tulleftt0o.apps.googleusercontent.com" /><!-- googleClientID -->
|
||||||
<constructor-arg value="5Z_3PhwBgPTdkXTUGvSja4ro" /><!-- googleClientSecret -->
|
<constructor-arg value="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" /><!-- googleClientSecret -->
|
||||||
<constructor-arg value="https://nlib-dev.nculture.org/{callType}/{oauthServiceName}/callback.do" /><!-- googleRedirectUrl : callType(login|member) -->
|
<constructor-arg value="https://nlib-dev.nculture.org/{callType}/{oauthServiceName}/callback.do" /><!-- googleRedirectUrl : callType(login|member) -->
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<!-- KAKAO OAuth Configuration -->
|
<!-- KAKAO OAuth Configuration -->
|
||||||
<bean id="kakaoAuthVO" class="egovframework.com.ext.oauth.service.OAuthVO">
|
<bean id="kakaoAuthVO" class="egovframework.com.ext.oauth.service.OAuthVO">
|
||||||
<constructor-arg value="kakao" /><!-- Service Name -->
|
<constructor-arg value="kakao" /><!-- Service Name -->
|
||||||
<constructor-arg value="e74d25210853313dd1fead4c6c1f06ec" /><!-- kakaoClientID -->
|
<constructor-arg value="9c1b2249240c011edf40a1d487702232" /><!-- kakaoClientID -->
|
||||||
<constructor-arg value="AGxiWEwu2ytIifA1AY2PoqVSrdnRZiao" /><!-- kakaoClientSecret -->
|
<constructor-arg value="fxv4i1aztudvPj84DEUvMTnzWe29611G" /><!-- kakaoClientSecret -->
|
||||||
<constructor-arg value="https://nlib-dev.nculture.org/{callType}/{oauthServiceName}/callback.do" /><!-- kakaoRedirectUrl : callType(login|member) -->
|
<constructor-arg value="https://nlib-dev.nculture.org/{callType}/{oauthServiceName}/callback.do" /><!-- kakaoRedirectUrl : callType(login|member) -->
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -223,3 +223,45 @@ function insertInterest(masterId){
|
|||||||
alert(result);
|
alert(result);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function paging(pageVO)
|
||||||
|
{
|
||||||
|
$("#paging *").remove();
|
||||||
|
|
||||||
|
var html="";
|
||||||
|
var startPage = pageVO.startPage;
|
||||||
|
var endPage = pageVO.endPage;
|
||||||
|
|
||||||
|
if(pageVO.startPage != pageVO.lastPage )
|
||||||
|
{
|
||||||
|
if(pageVO.pageIndex != 1 ){
|
||||||
|
html+="<a href=\"#\" onclick=\"fn_search_article("+ 1 +"); return false;\">\<\<</a> "
|
||||||
|
html+="<a href=\"#\" onclick=\"fn_search_article("+ (pageVO.pageIndex*1 -1) +"); return false;\">\<</a> ";
|
||||||
|
}else{
|
||||||
|
html+="<a>\<\<</a> "
|
||||||
|
html+="<a>\<</a> ";
|
||||||
|
}
|
||||||
|
|
||||||
|
for(startPage; startPage <= endPage; startPage++ )
|
||||||
|
{
|
||||||
|
if(startPage != pageVO.pageIndex)
|
||||||
|
{
|
||||||
|
html+= "<a href=\"#\" onclick=\"fn_search_article("+ startPage +"); return false;\">" + startPage + "</a> "
|
||||||
|
}else{
|
||||||
|
html+= "<a>" + startPage + "</a> "
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(pageVO.pageIndex != pageVO.lastPage){
|
||||||
|
html+="<a href=\"#\" onclick=\"fn_search_article("+ (pageVO.pageIndex*1 +1) +"); return false;\">\></a> "
|
||||||
|
html+="<a href=\"#\" onclick=\"fn_search_article("+ pageVO.lastPage +"); return false;\">\>\></a> ";
|
||||||
|
}else{
|
||||||
|
html+="<a>\></a> "
|
||||||
|
html+="<a>\>\></a>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$("#paging").append(html);
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user