검색엔진 적용중
This commit is contained in:
parent
494935be56
commit
03aaab28b1
@ -83,8 +83,8 @@ public class NlibSearchController extends NlibCommonController {
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/collection/listItems.do")
|
||||
public String listItems(
|
||||
@RequestMapping("/search/searchList.do")
|
||||
public String searchList(
|
||||
HttpServletRequest req
|
||||
, Authentication authentication
|
||||
, @RequestParam Map<String, String> paramMap
|
||||
@ -97,7 +97,7 @@ public class NlibSearchController extends NlibCommonController {
|
||||
String pageIndex = StringUtil.getString(paramMap.get("pageIndex"), "1");
|
||||
String pageSize = StringUtil.getString(paramMap.get("pageSize") , DEFUALT_PAGE_SIZE);
|
||||
List<DeptVO> vo = new ArrayList();
|
||||
List<CollectionVO> list = new ArrayList();
|
||||
List<CollectionVO> operList = new ArrayList();
|
||||
|
||||
// 페이징 사이즈 코드 목록 조회 (DB방식으로 변경 2021.08.06 KNKIM)
|
||||
List<HashMap<String,String>> pageSizeCodes = codeService.listCodes("PAGE_SIZE_OPTION");
|
||||
@ -119,15 +119,13 @@ public class NlibSearchController extends NlibCommonController {
|
||||
model.addAttribute("pageSizeCodes", pageSizeCodes);
|
||||
model.addAttribute("masterType", masterType);
|
||||
model.addAttribute("dtlsType", dtlsType);
|
||||
model.addAttribute("masterClsf", clsf);
|
||||
model.addAttribute("dtlsClsf", clsf);
|
||||
model.addAttribute("firstCategoryInfo", clsf);
|
||||
model.addAttribute("secondCategoryInfo", clsf);
|
||||
/*model.addAttribute("orgList",vo);*/
|
||||
|
||||
|
||||
//검색엔진
|
||||
try{
|
||||
searchVO.setRealQuery("한복");
|
||||
searchVO.setQuery("한복");
|
||||
searchVO.setCollection("reference_Coll");
|
||||
// 검색관련 서버 설정
|
||||
String searchIp = nlibProperty.getString("search.searchIp");
|
||||
@ -285,15 +283,13 @@ public class NlibSearchController extends NlibCommonController {
|
||||
{
|
||||
/*collReferecne.getSearchResultList().get(i).get("MASTER_ID");*/
|
||||
colVO.setMasterId("UR-91F3EB466E2743C48CC264BAC8CC573B");
|
||||
list.add(colVO);
|
||||
operList.add(colVO);
|
||||
}
|
||||
System.out.println(list.size());
|
||||
System.out.println(list.get(0).getMasterId());
|
||||
System.out.println(list.get(1).getMasterId());
|
||||
System.out.println(list.get(2).getMasterId());
|
||||
System.out.println(list.get(3).getMasterId());
|
||||
list = collectionService.setDetailInfoForList(list);
|
||||
|
||||
//열람,대출 가능 상태
|
||||
operList = collectionService.setDetailInfoForList(operList);
|
||||
|
||||
model.addAttribute("operList", operList);
|
||||
|
||||
// 경로
|
||||
CmmUtil.setNfsPathModelMap(request,model);
|
||||
|
||||
@ -82,6 +82,13 @@ window.onload = function() {
|
||||
|
||||
}; // window.onload
|
||||
|
||||
|
||||
function fnFilterSch(){
|
||||
$("input[name=query]").val($("#searchKeyword").val());
|
||||
document.referencelistForm.action="${pageContext.request.contextPath}/search/searchList.do";
|
||||
document.referencelistForm.submit();
|
||||
}
|
||||
|
||||
<%//검색필터 서브메뉴 보이기%>
|
||||
function fn_show_sub(subId,subClass){
|
||||
if($("#" + subId).css("display") == "none")
|
||||
@ -169,7 +176,44 @@ function fn_search_article(pageIndex) {
|
||||
<h1>${pageTitle }</h1>
|
||||
|
||||
<form name="referencelistForm" id="referencelistForm" method="post">
|
||||
|
||||
<input type="hidden" name="collection" value="<c:out value='${searchVO.collection}'/>" />
|
||||
<input type="hidden" name="sortField" value="<c:out value='${searchVO.sortField}'/>" />
|
||||
<input type="hidden" name="searchField" value="<c:out value='${searchVO.searchField}'/>" />
|
||||
<input type="hidden" name="query" value="${searchVO.query}" />
|
||||
<input type="hidden" name="exactQuery" value='${searchVO.exactQuery}'/>
|
||||
<input type="hidden" name="andQuery" value='${searchVO.andQuery}' />
|
||||
<input type="hidden" name="notQuery" value='${searchVO.notQuery}' />
|
||||
<input type="hidden" name="viewCount" value='${searchVO.viewCount}' />
|
||||
<input type="hidden" name="startCount" value='${searchVO.startCount}' />
|
||||
|
||||
<input type="hidden" name="series" value='${searchVO.series}' />
|
||||
<input type="hidden" name="theme" value='${searchVO.theme}' />
|
||||
<input type="hidden" name="mgnt_no" value='${searchVO.mgnt_no}' />
|
||||
<input type="hidden" name="trs_age" value='${searchVO.trs_age}' />
|
||||
|
||||
<input type="hidden" name="chronological_start" value='${searchVO.chronological_start}' />
|
||||
<input type="hidden" name="chronological_end" value='${searchVO.chronological_end}' />
|
||||
<input type="hidden" name="genyear_start" value='${searchVO.genyear_start}' />
|
||||
<input type="hidden" name="genyear_end" value='${searchVO.genyear_end}' />
|
||||
|
||||
<input type="hidden" name="search_area_council_info" value='${searchVO.search_area_council_info}' />
|
||||
<input type="hidden" name="content_type" value='${searchVO.content_type}' />
|
||||
|
||||
<input type="hidden" name="all_totalCount" value='${all_totalCount}' />
|
||||
<input type="hidden" name="gubun" value='2' />
|
||||
|
||||
<input type="hidden" name="filter_class" />
|
||||
<input type="hidden" name="filter_sido" />
|
||||
<input type="hidden" name="filter_thema" />
|
||||
<input type="hidden" name="filter_category" />
|
||||
<input type="hidden" name="filter_info_sido" />
|
||||
<input type="hidden" name="filter_info_type" />
|
||||
|
||||
<input type="hidden" name="filter_mylist" id="filter_mylist" value="${searchVO.filter_mylist}" />
|
||||
<input type="hidden" name="filter_info_mylist" id="filter_info_mylist" value="${searchVO.filter_info_mylist}" />
|
||||
|
||||
<input type="hidden" name="gubun_ajax" value="2"/>
|
||||
|
||||
<!-- 검색조건 -->
|
||||
<select name="pageSize" id="pageSize" title="목록에 보여줄 글 개수">
|
||||
<c:forEach var="pageSizeItem" items="${pageSizeCodes}"
|
||||
@ -189,13 +233,21 @@ function fn_search_article(pageIndex) {
|
||||
value="${itemType }" /> <input type="text" name="searchKeyword"
|
||||
id="searchKeyword" title="검색어" value="${searchKeyword }" size="35"
|
||||
maxlength="50" /> <input type="button" name="btnSearch"
|
||||
id="btnSearch" value="검색" />
|
||||
id="btnSearch" onclick="fnFilterSch();" value="검색" />
|
||||
<div>
|
||||
<dl>
|
||||
<dt class="blind">검색결과 안내</dt>
|
||||
<dd>
|
||||
<em>'${searchVO.realQuery}'</em>에 대한 검색결과는 총 <strong><fmt:formatNumber
|
||||
value="${reference.totalCount}" pattern="#,###" /></strong>건 입니다.
|
||||
<c:choose>
|
||||
<c:when test="${searchVO.query ne '' && (!empty searchVO.query) }">
|
||||
<em>'${searchVO.query}'</em>에 대한 검색결과는 총 <strong><fmt:formatNumber
|
||||
value="${reference.totalCount}" pattern="#,###" /></strong>건 입니다.
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
총<fmt:formatNumber
|
||||
value="${reference.totalCount}" pattern="#,###" /></strong> 건
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
@ -233,29 +285,20 @@ function fn_search_article(pageIndex) {
|
||||
varStatus="fcStatus">
|
||||
<li
|
||||
<c:if test ="${fcStatus.index >= 4}"> class="showMoreType" style="display:none;" </c:if>>
|
||||
<div
|
||||
class="depth-1 <c:if test="${fn:contains(searchVO.filter_class, firstClassList.column1) }"> on</c:if>">
|
||||
<div class="depth-1 <c:if test="${fn:contains(searchVO.filter_class, firstClassList.column1) }"> on</c:if>">
|
||||
<div class="check">
|
||||
<input type="checkbox" value="${firstClassList.column1}"
|
||||
name="first_class" id="data-type-chk${fcStatus.index+1}"
|
||||
<c:if test="${fn:contains(searchVO.first_class, firstClassList.column1) }">checked="checked"</c:if> /><label
|
||||
for="data-type-chk${fcStatus.index+1}">${firstClassList.sCodeNm}(<span>0</span>)
|
||||
</label>
|
||||
<input type="checkbox" value="${firstClassList.column1}" name="first_class" id="data-type-chk${fcStatus.index+1}" <c:if test="${fn:contains(searchVO.first_class, firstClassList.column1) }">checked="checked"</c:if> />
|
||||
<label for="data-type-chk${fcStatus.index+1}">${firstClassList.sCodeNm}(<span>0</span>) </label>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="depth-2" style="display: none;">
|
||||
<c:forEach var="secondClassList" items="${secondClassList}"
|
||||
varStatus="seStatus">
|
||||
<c:if
|
||||
test="${firstClassList.column1 eq secondClassList.column2 }">
|
||||
<c:if test="${firstClassList.column1 eq secondClassList.column2 }">
|
||||
<li>
|
||||
<div class="check">
|
||||
<input type="checkbox" value="${secondClassList.sCodeId}"
|
||||
name="second_class"
|
||||
id="data-type-chk${fcStatus.index+1}-${seStatus.index+1}"
|
||||
<c:if test="${fn:contains(searchVO.second_class, secondClassList.sCodeId) }">checked="checked"</c:if> /><label
|
||||
for="data-type-chk${fcStatus.index+1}-${seStatus.index+1}">${secondClassList.sCodeNm}(<span>0</span>)
|
||||
</label>
|
||||
<input type="checkbox" value="${secondClassList.sCodeId}" name="second_class" id="data-type-chk${fcStatus.index+1}-${seStatus.index+1}" <c:if test="${fn:contains(searchVO.second_class, secondClassList.sCodeId) }">checked="checked"</c:if> />
|
||||
<label for="data-type-chk${fcStatus.index+1}-${seStatus.index+1}">${secondClassList.sCodeNm}(<span>0</span>)</label>
|
||||
</div>
|
||||
</li>
|
||||
</c:if>
|
||||
@ -269,19 +312,16 @@ function fn_search_article(pageIndex) {
|
||||
<ul>
|
||||
<h3>주제분야</h3>
|
||||
<c:set var="count" value="0" />
|
||||
<c:forEach var="masterClsf" items="${masterClsf}"
|
||||
varStatus="status">
|
||||
<c:if test="${masterClsf.upClsfId eq '2' }">
|
||||
<c:forEach var="firstCategoryList" items="${firstCategoryInfo}" varStatus="status">
|
||||
<c:if test="${firstCategoryList.upClsfId eq '2' }">
|
||||
<li
|
||||
<c:if test ="${count >= 4}"> class="showMoreClsf" style="display:none;" </c:if>>
|
||||
<a href="javascript:void(0);"
|
||||
onclick="fn_show_sub('${masterClsf.clsfId}_clsf_sub','clsfSub'); return false;">${masterClsf.clsfNm }</a>
|
||||
<ul id="${masterClsf.clsfId}_clsf_sub" class="clsfSub"
|
||||
<div class="depth-1 <c:if test="${fn:contains(searchVO.filter_category, firstCategoryList.cslfId) }"> on</c:if>">
|
||||
<ul id="${firstCategoryList.clsfId}_clsf_sub" class="clsfSub"
|
||||
style="display: none;">
|
||||
<c:forEach var="dtlsClsf" items="${dtlsClsf}"
|
||||
varStatus="status">
|
||||
<c:if test="${masterClsf.clsfId eq dtlsClsf.upClsfId }">
|
||||
<li>${dtlsClsf.clsfNm}</li>
|
||||
<c:forEach var="secondCategoryList" items="${secondCategoryInfo}" varStatus="seStatus">
|
||||
<c:if test="${firstCategoryList.clsfId eq secondCategoryList.upClsfId }">
|
||||
<li>${secondCategoryList.clsfNm}</li>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</ul>
|
||||
@ -328,7 +368,22 @@ function fn_search_article(pageIndex) {
|
||||
<br>
|
||||
<%-- <c:if test="${!empty result.COUNCIL_NM_TOT}"><li><em>소장처 : </em>${result.COUNCIL_NM_TOT}</li></c:if> --%>
|
||||
</td>
|
||||
<td>ttttt</td>
|
||||
<td>
|
||||
<c:forEach var="operList" items="${operList}">
|
||||
<c:if test="${result.MASTER_ID eq operList.masterId}">
|
||||
<c:if test="${!empty operList.operOutRangeNm}">
|
||||
${operList.operOutRangeNm}<br>
|
||||
</c:if>
|
||||
<c:if test="${!empty operList.operReadRangeNm}">
|
||||
${operList.operReadRangeNm}<br>
|
||||
</c:if>
|
||||
<c:if test="${(!empty operList.openDivCd) && (operList.openDivCd ne '3') }">
|
||||
<input type="button" value="원문보기"/><br>
|
||||
</c:if>
|
||||
<input type="button" value="RIS" onclick="risShow('${operList.masterId}');"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<tr>
|
||||
</c:forEach>
|
||||
</table>
|
||||
@ -405,9 +460,9 @@ function fn_search_article(pageIndex) {
|
||||
|
||||
//fnLabel_reference();
|
||||
|
||||
filterFn();
|
||||
//filterFn();
|
||||
|
||||
fnLabel_reference_detail();
|
||||
//fnLabel_reference_detail();
|
||||
|
||||
|
||||
//sido-tab height 유지
|
||||
|
||||
@ -271,9 +271,9 @@
|
||||
</div>
|
||||
<ul class="depth-2">
|
||||
<c:forEach items="${schSecondCategoryList}" var="secondCategoryInfo" varStatus="seStatus">
|
||||
<c:if test="${firstCategoryInfo.sCodeId eq fn:substring(secondCategoryInfo.sCodeId,0,1)}" >
|
||||
<li><div class="check"><input type="checkbox" value="${secondCategoryInfo.sCodeId}" id="theme-chk${fiStatus.index+1}-${seStatus.index+1}" name="second_category" <c:if test="${fn:contains(searchVO.second_category, secondCategoryInfo.sCodeId) }">checked="checked"</c:if>/><label for="theme-chk${fiStatus.index+1}-${seStatus.index+1}">${secondCategoryInfo.sCodeNm}(<span>0</span>)</label></div></li>
|
||||
</c:if>
|
||||
<c:if test="${firstCategoryInfo.sCodeId eq fn:substring(secondCategoryInfo.sCodeId,0,1)}" >
|
||||
<li><div class="check"><input type="checkbox" value="${secondCategoryInfo.sCodeId}" id="theme-chk${fiStatus.index+1}-${seStatus.index+1}" name="second_category" <c:if test="${fn:contains(searchVO.second_category, secondCategoryInfo.sCodeId) }">checked="checked"</c:if>/><label for="theme-chk${fiStatus.index+1}-${seStatus.index+1}">${secondCategoryInfo.sCodeNm}(<span>0</span>)</label></div></li>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
|
||||
// 목록 보기로 이동
|
||||
function fn_list() {
|
||||
$("#articleForm").attr("action", "${pageContext.request.contextPath}/collection/listItems.do");
|
||||
$("#articleForm").attr("action", "${pageContext.request.contextPath}/search/searchList.do");
|
||||
$("#articleForm").submit();
|
||||
}
|
||||
</script>
|
||||
@ -63,7 +63,7 @@ function fn_list() {
|
||||
<h1>${pageTitle }</h1>
|
||||
|
||||
<form name="articleForm" id="articleForm"
|
||||
action="${pageContext.request.contextPath}/collection/listItems.do"
|
||||
action="${pageContext.request.contextPath}/search/searchList.do"
|
||||
method="post">
|
||||
<div>
|
||||
<div class="image">
|
||||
|
||||
@ -3,36 +3,29 @@
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||
<ul class="gnb">
|
||||
<!-- 이용/소개 -->
|
||||
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/inform/selectGreeting.do';">인사말</a></li>
|
||||
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/inform/selectNCultureOperationInfo.do';">이용안내</a></li>
|
||||
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/board/listNotices.do';">공지사항</a></li>
|
||||
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/bbs/listAncmnts.do';">공지사항(DB)</a></li>
|
||||
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/board/listFAQs.do';">자주하는질문</a></li>
|
||||
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/bbs/listFaqs.do';">자주하는질문(DB)</a></li>
|
||||
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/board/listQnAs.do';">묻고답하기</a></li>
|
||||
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/bbs/listQnas.do';">Q&A(DB)</a></li>
|
||||
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/inform/selectNCultureLocationInfo.do';">찾아오시는길</a></li>
|
||||
|
||||
<li><a href="javascript:void(0)" onclick="javascript:location.href='${pageContext.request.contextPath}/inform/selectGreeting.do';">인사말</a></li>
|
||||
<li><a href="javascript:void(0)" onclick="javascript:location.href='${pageContext.request.contextPath}/inform/selectNCultureOperationInfo.do';">이용안내</a></li>
|
||||
<li><a href="javascript:void(0)" onclick="javascript:location.href='${pageContext.request.contextPath}/inform/selectNCultureLocationInfo.do';">찾아오시는길</a></li>
|
||||
|
||||
<!-- 자료검색 -->
|
||||
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/collection/listItems.do';">소장자료검색</a></li>
|
||||
<li><a href="javascript:void(0)" onclick="javascript:location.href='${pageContext.request.contextPath}/collection/listItems.do';">소장자료</a></li>
|
||||
|
||||
<li><a href="javascript:void(0)" onclick="javascript:location.href='${pageContext.request.contextPath}/bbs/listAncmnts.do';">공지사항</a></li>
|
||||
<li><a href="javascript:void(0)" onclick="javascript:location.href='${pageContext.request.contextPath}/bbs/listFaqs.do';">FAQ</a></li>
|
||||
<li><a href="javascript:void(0)" onclick="javascript:location.href='${pageContext.request.contextPath}/bbs/listQnas.do';">Q&A</a></li>
|
||||
|
||||
|
||||
<!-- 내정보 : 조회/수정 -->
|
||||
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/userInfo/putMyInfo.do';">내정보</a></li>
|
||||
<!-- 내정보 : 대출/예약/열람/관심자료 -->
|
||||
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/rent/listRentItems.do';">대출</a></li>
|
||||
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/rent/listReservations.do';">예약</a></li>
|
||||
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/rent/listRequestsForViewingItem.do';">열람요청</a></li>
|
||||
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/interest/listInterests.do';">관심자료</a></li>
|
||||
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/cmm/listNotifications.do';">알림</a></li>
|
||||
<li><a href="javascript:void(0)" onclick="javascript:location.href='${pageContext.request.contextPath}/interest/listInterests.do';">관심자료</a></li>
|
||||
<li><a href="javascript:void(0)" onclick="javascript:location.href='${pageContext.request.contextPath}/rent/listRentItems.do';">대출관리</a></li>
|
||||
<!-- <li><a href="javascript:void(0)" onclick="javascript:location.href='${pageContext.request.contextPath}/rent/listReservations.do';">예약</a></li> -->
|
||||
<li><a href="javascript:void(0)" onclick="javascript:location.href='${pageContext.request.contextPath}/rent/listRequestsForViewingItem.do';">방문열람</a></li>
|
||||
|
||||
<!-- 개발자용 메뉴 -->
|
||||
<li><a href="#" style="color:#FF5;" onclick="javascript:location.href='${pageContext.request.contextPath}/sample/getSampleInfoForm.do';">통신API</a></li>
|
||||
<li><a href="#" style="color:#FF5;" onclick="javascript:location.href='${pageContext.request.contextPath}/sample/barcode/getMemberQRCodeForm.do';">QR코드</a></li>
|
||||
<li><a href="#" style="color:#FF5;" onclick="javascript:location.href='${pageContext.request.contextPath}/sample/password/getSampleEncoder.do';">암호화</a></li>
|
||||
<li><a href="#" style="color:#FF5;" onclick="javascript:location.href='${pageContext.request.contextPath}/system/reloadProperties.do';">프로퍼티갱신</a></li>
|
||||
<li><a href="#" style="color:#FF5;" onclick="javascript:location.href='${pageContext.request.contextPath}/code/listCodes.do';">코드조회</a></li>
|
||||
<li><a href="#" style="color:#FF5;" onclick="javascript:location.href='${pageContext.request.contextPath}/sample/getItemInfo.do';">자료상세조회:API샘플</a></li>
|
||||
<li><a href="#" style="color:#FF5;" onclick="javascript:location.href='${pageContext.request.contextPath}/sample/listRentItem.do';">목록조회:API샘플</a></li>
|
||||
<li><a href="javascript:void(0)" style="color:#FF5;" onclick="javascript:location.href='${pageContext.request.contextPath}/sample/password/getSampleEncoder.do';">암호화</a></li>
|
||||
<li><a href="javascript:void(0)" style="color:#FF5;" onclick="javascript:location.href='${pageContext.request.contextPath}/system/reloadProperties.do';">환경설정갱신</a></li>
|
||||
<li><a href="javascript:void(0)" style="color:#FF5;" onclick="javascript:location.href='${pageContext.request.contextPath}/code/listCodes.do';">코드조회</a></li>
|
||||
<li><a href="javascript:void(0)" style="color:#FF5;" onclick="javascript:location.href='${pageContext.request.contextPath}/sample/listRentItem.do';">목록조회:API샘플</a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user