검색엔진, 소장자료관 중간커밋

This commit is contained in:
JSYOO 2021-10-25 16:07:09 +09:00
parent 65d0203335
commit 291e66bf34
12 changed files with 1102 additions and 777 deletions

View File

@ -34,6 +34,5 @@
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -257,7 +257,6 @@
<artifactId>httpclient</artifactId>
<version>4.5.3</version>
</dependency>
<!-- 바코드 ZXing (DIGITALSHIP KNKIM 2021.06.25)-->
<dependency>
<groupId>com.google.zxing</groupId>

View File

@ -0,0 +1,65 @@
package nlib.sch.service;
import nlib.col.service.CollectionVO;
/**
* <pre>
* @Class Name : NlibSearchCollectionVO.java
*
* @Description : 검색엔진 결과리스트 VO
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 9. 23. JSYOO 최초 생성
* @ 2021.10. 06. KKN 자료에 대한 세부 항목, 생성자 함수 추가
*
*
* @author 이씨플라자 * DIGITALSHIP JSYOO
* @since 2021. 10. 22.
* @version 1.0
*
*/
public class NlibSearchCollectionVO extends CollectionVO {
public String getTITLE() {
return title;
}
public void setTITLE(String tITLE) {
title = tITLE;
}
public String getMNGT_NO() {
return mngtNo;
}
public void setMNGT_NO(String mNGT_NO) {
mngtNo = mNGT_NO;
}
public String getCREAT_YYYY() {
return creatYyyy;
}
public void setCREAT_YYYY(String cREAT_YYYY) {
creatYyyy = cREAT_YYYY;
}
public String getMASTER_ID() {
return masterId;
}
public void setMASTER_ID(String mASTER_ID) {
masterId = mASTER_ID;
}
public String getORG_NM() {
return title;
}
public void setORG_NM(String oRG_NM) {
orgNm = oRG_NM;
}
public String getRPRS_THUMB_URL() {
return rprsThumbUrl;
}
public void setRPRS_THUMB_URL(String rPRS_THUMB_URL) {
rprsThumbUrl = rPRS_THUMB_URL;
}
}

View File

@ -0,0 +1,45 @@
package nlib.sch.service;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.UriComponentsBuilder;
import nlib.util.StringUtil;
/**
* <pre>
* @Class Name : DataApiInterface.java
*
* @Description : DAO에서 상속할 DataApi의 부모 클래스들을 위한 인터페이스
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 7. 9. KNKIM 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 7. 9.
* @version 1.0
*
*/
public interface NlibSearchInterface {
}

View File

@ -0,0 +1,18 @@
package nlib.sch.service;
import nlib.sch.service.NlibSearchVO;
public interface NlibSearchService {
/** 검색결과 받기
* @return */
NlibSearchVO getSearch(NlibSearchVO searchVO) throws Exception;
/*
String getSearchEtc(SearchVO searchVO , Sf1VO sf1Vo) throws Exception;
int getSearch_All_cnt(SearchVO searchVO, Sf1VO sf1Vo) throws Exception;
SearchCollectionResult getSearch_ajax(SearchVO searchVO , Sf1VO sf1Vo) throws Exception;
*/
}

View File

@ -0,0 +1,347 @@
package nlib.sch.service;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import nlib.cmm.service.NlibProperty;
import nlib.util.StringUtil;
/**
* 검색엔진 . NlibSearchVO
* @Class Name : NlibSearchVO.java
* @author JSYOO
* @since 2021-10-18
* @version 1.0
*/
public class NlibSearchVO {
private String query =""; //검색어
private String collection = "lib_total"; //검색 대상 컬렉션 지정
private String listCount = NlibProperty.getProperty("list.paging.page.size"); //컬렉션별 출력 결과수
private String sort = "DATE"; //결과 정렬 DATE 날짜 내림차, RANK 정확도 내림차
private String startCount = ""; //검색 결과 시작 페이지
private String sfield = ""; //검색 영역
private String creatYyyyStart = ""; //생산년도 검색(시작일)
private String creatYyyyEnd = ""; //생산년도 검색(종료일)
private String createStartDate = ""; //연대 검색(시작일)
private String createEndDate = ""; //연대 검색(종료일)
private String mngtNo = ""; //관리번호
private String ageCode = ""; //시대
private String useStatus = ""; //이용구분
private String typeDivCd = ""; //자료유형
private String subjectCode = ""; //주제분야
private String orgNm = ""; //생산기관
private String realQuery ; //검색어(최종)
private String reQuery = ""; //결과내 재검색
private String reQueryChk ="query"; //결과내재검색 체크 유지
private String lib_total_totalCount = ""; //전체의 COUNT
private String lib_loan_totalCount = ""; //대출의 COUNT
private String lib_online_totalCount = ""; //온라인열람의 COUNT
private String lib_offline_totalCount = ""; //방문열람의 COUNT
private String lib_etc_totalCount = ""; //기타의 COUNT
private String totalCount = ""; //현재 선택된 콜렉션의 COUNT
private String filter_class = ""; //필터 더보기버튼 유지+depth1 open
private String filter_sido ; //필터 더보기버튼 유지+depth1 open
private String filter_thema ; //필터 더보기버튼 유지+depth1 open
private String filter_category ; //필터 더보기버튼 유지+depth1 open
private String filter_info_sido ; //필터 더보기버튼 유지
private String filter_info_type ; //필터 더보기버튼 유지
private String filter_mylist; //검색결과 필터 순서 저장
private String filter_info_mylist; //검색결과 필터 info 순서 저장
private String first_category ; //주제분야() 선택
private String second_category ; //주제분야() 선택
private String first_class ; //자료유형() 선택
private String second_class; //자료유형() 선택
private List<NlibSearchCollectionVO> resultList = new ArrayList<>(); // 자료 리스트
public String getFilter_class() {
return filter_class;
}
public void setFilter_class(String filter_class) {
this.filter_class = filter_class;
}
public String getFilter_sido() {
return filter_sido;
}
public void setFilter_sido(String filter_sido) {
this.filter_sido = filter_sido;
}
public String getFilter_thema() {
return filter_thema;
}
public void setFilter_thema(String filter_thema) {
this.filter_thema = filter_thema;
}
public String getFilter_category() {
return filter_category;
}
public void setFilter_category(String filter_category) {
this.filter_category = filter_category;
}
public String getFilter_info_sido() {
return filter_info_sido;
}
public void setFilter_info_sido(String filter_info_sido) {
this.filter_info_sido = filter_info_sido;
}
public String getFilter_info_type() {
return filter_info_type;
}
public void setFilter_info_type(String filter_info_type) {
this.filter_info_type = filter_info_type;
}
public String getFilter_mylist() {
return filter_mylist;
}
public void setFilter_mylist(String filter_mylist) {
this.filter_mylist = filter_mylist;
}
public String getFilter_info_mylist() {
return filter_info_mylist;
}
public void setFilter_info_mylist(String filter_info_mylist) {
this.filter_info_mylist = filter_info_mylist;
}
public String getRealQuery() {
return realQuery;
}
public void setRealQuery(String realQuery) {
this.realQuery = realQuery;
}
public String getReQuery() {
return reQuery;
}
public void setReQuery(String reQuery) {
this.reQuery = reQuery;
}
public String getReQueryChk() {
return reQueryChk;
}
public void setReQueryChk(String reQueryChk) {
this.reQueryChk = reQueryChk;
}
public String getListCount() {
return listCount;
}
public void setListCount(String listCount) {
this.listCount = listCount;
}
public String getSort() {
return sort;
}
public void setSort(String sort) {
this.sort = sort;
}
public String getStartCount() {
return startCount;
}
public void setStartCount(String startCount) {
this.startCount = startCount;
}
public String getSfield() {
return sfield;
}
public void setSfield(String sfield) {
this.sfield = sfield;
}
public String getCreatYyyyStart() {
return creatYyyyStart;
}
public void setCreatYyyyStart(String creatYyyyStart) {
this.creatYyyyStart = creatYyyyStart;
}
public String getCreatYyyyEnd() {
return creatYyyyEnd;
}
public void setCreatYyyyEnd(String creatYyyyEnd) {
this.creatYyyyEnd = creatYyyyEnd;
}
public String getCreateStartDate() {
return createStartDate;
}
public void setCreateStartDate(String createStartDate) {
this.createStartDate = createStartDate;
}
public String getCreateEndDate() {
return createEndDate;
}
public void setCreateEndDate(String createEndDate) {
this.createEndDate = createEndDate;
}
public String getMngtNo() {
return mngtNo;
}
public void setMngtNo(String mngtNo) {
this.mngtNo = mngtNo;
}
public String getAgeCode() {
return ageCode;
}
public void setAgeCode(String ageCode) {
this.ageCode = ageCode;
}
public String getUseStatus() {
return useStatus;
}
public void setUseStatus(String useStatus) {
this.useStatus = useStatus;
}
public String getTypeDivCd() {
return typeDivCd;
}
public void setTypeDivCd(String typeDivCd) {
this.typeDivCd = typeDivCd;
}
public String getSubjectCode() {
return subjectCode;
}
public void setSubjectCode(String subjectCode) {
this.subjectCode = subjectCode;
}
public String getOrgNm() {
return orgNm;
}
public void setOrgNm(String orgNm) {
this.orgNm = orgNm;
}
public String getQuery() {
return query;
}
public void setQuery(String query) {
this.query = query;
}
public String getCollection() {
return collection;
}
public void setCollection(String collection) {
this.collection = collection;
}
public String getLib_total_totalCount() {
return lib_total_totalCount;
}
public void setLib_total_totalCount(String lib_total_totalCount) {
this.lib_total_totalCount = lib_total_totalCount;
}
public String getLib_loan_totalCount() {
return lib_loan_totalCount;
}
public void setLib_loan_totalCount(String lib_loan_totalCount) {
this.lib_loan_totalCount = lib_loan_totalCount;
}
public String getLib_online_totalCount() {
return lib_online_totalCount;
}
public void setLib_online_totalCount(String lib_online_totalCount) {
this.lib_online_totalCount = lib_online_totalCount;
}
public String getLib_offline_totalCount() {
return lib_offline_totalCount;
}
public void setLib_offline_totalCount(String lib_offline_totalCount) {
this.lib_offline_totalCount = lib_offline_totalCount;
}
public String getLib_etc_totalCount() {
return lib_etc_totalCount;
}
public void setLib_etc_totalCount(String lib_etc_totalCount) {
this.lib_etc_totalCount = lib_etc_totalCount;
}
public List<NlibSearchCollectionVO> getResultList() {
return resultList;
}
public void setResultList(List<NlibSearchCollectionVO> resultList) {
this.resultList = resultList;
}
public String getFirst_category() {
return first_category;
}
public void setFirst_category(String first_category) {
this.first_category = first_category;
}
public String getSecond_category() {
return second_category;
}
public void setSecond_category(String second_category) {
this.second_category = second_category;
}
public String getFirst_class() {
return first_class;
}
public void setFirst_class(String first_class) {
this.first_class = first_class;
}
public String getSecond_class() {
return second_class;
}
public void setSecond_class(String second_class) {
this.second_class = second_class;
}
public String getTotalCount() {
return totalCount;
}
public void setTotalCount(String totalCount) {
this.totalCount = totalCount;
}
public void add(MultiValueMap<String, String> map,String name, String value) {
if(!"".equals(StringUtil.getString(value,"")))
{
map.add(name,value);
}
}
//검색요청시 URL 생성
public MultiValueMap<String, String> getSearchMap() {
MultiValueMap<String, String> map = new LinkedMultiValueMap<String,String>();
add(map,"query",this.query);
add(map,"collection",this.collection);
add(map,"sort",this.sort);
add(map,"startCount",this.startCount);
add(map,"sfield",this.sfield);
add(map,"CREAT_YYYY_START",this.creatYyyyStart);
add(map,"CREAT_YYYY_END",this.creatYyyyEnd);
add(map,"createStartDate",this.createStartDate);
add(map,"createEndDate,",this.createEndDate);
add(map,"MNGT_NO",this.mngtNo);
add(map,"AGE_CODE",this.ageCode);
add(map,"USE_STATUS",this.useStatus);
add(map,"TYPE_DIV_CD",this.typeDivCd);
add(map,"SUBJECT_CODE",this.subjectCode);
add(map,"ORG_NM,",this.orgNm);
add(map,"listCount",this.listCount);
return map;
}
// 탭별 total count set
public void setCollectionTotalCount (String collection, String totalCount) {
if(collection.equals("lib_loan"))
{
this.lib_loan_totalCount = totalCount;
}else if(collection.equals("lib_online"))
{
this.lib_online_totalCount = totalCount;
}else if(collection.equals("lib_offline"))
{
this.lib_offline_totalCount = totalCount;
}else if(collection.equals("lib_etc"))
{
this.lib_etc_totalCount = totalCount;
}else if(collection.equals("lib_total"))
{
this.lib_total_totalCount = totalCount;
}
}
}

View File

@ -0,0 +1,193 @@
package nlib.sch.service.impl;
import static kccf.sch.common.WNDefine.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.lang.reflect.Type;
import java.net.URL;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import javax.annotation.Resource;
import org.apache.commons.beanutils.BeanUtils;
import org.json.JSONException;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.http.converter.StringHttpMessageConverter;
import org.springframework.stereotype.Service;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.reflect.TypeToken;
import nlib.sch.service.NlibSearchVO;
import nlib.restful.DataApi;
import nlib.restful.service.DataApiInterface;
import nlib.restful.service.DataApiReqVO;
import nlib.restful.service.DataApiResVO;
import nlib.restful.service.impl.DataApiRESTful;
import nlib.sch.service.NlibSearchCollectionVO;
import nlib.sch.service.NlibSearchInterface;
import nlib.sch.service.NlibSearchService;
import nlib.util.StringUtil;
@Service("nlibSearchService")
public class NlibSearchServiceImpl implements NlibSearchService{
private static final Logger log = LoggerFactory.getLogger(NlibSearchServiceImpl.class);
/* DataApi 접속 서버 정보 */
@Value("#{properties['search.searchIp']}")
private String SEARCH_IP;
@Value("#{properties['search.searchPort']}")
private String SEARCH_PORT;
@Value("#{properties['search.protocol']}")
private String SEARCH_PROTOCOL;
/** RESTFul API 송수신 모듈 */
@Resource(name = "dataApi")
private DataApi dataApi;
public NlibSearchVO getSearch(NlibSearchVO searchVO) throws Exception {
try {
String collectionTemp="";
//-----------------------------------
// 입력값 검증작업
//-----------------------------------
/*resVO = DataApiInterface.checkReqCommonParams(reqVO);
if(resVO != null) return resVO;
HttpMethod method = reqVO.getReqMethod();*/
//-----------------------------------
// 파라메터 생성 작업 요청 처리
//-----------------------------------
String url = SEARCH_PROTOCOL + "://" + SEARCH_IP + ("80".equals(SEARCH_PORT) ? "" : ":" + SEARCH_PORT) + "/searchApi/searchApi.jsp";
log.debug("REQ URL : " + url);
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
ResponseEntity<String> responseEntity = null;
ResponseEntity<String> allResponseEntity = null;
RestTemplate restTemplate = new RestTemplate();
restTemplate.getMessageConverters()
.add(0, new StringHttpMessageConverter(StandardCharsets.UTF_8));
//단일 검색
MultiValueMap<String, String> parameters= searchVO.getSearchMap();
//전체 검색 ( 탭별 count가 목적)
collectionTemp = searchVO.getCollection();
searchVO.setCollection("ALL");
MultiValueMap<String, String> allParameters= searchVO.getSearchMap();
searchVO.setCollection(collectionTemp);
//post방식
parameters.forEach((k, v) -> log.debug("params > " + k + " : " + v));
allParameters.forEach((k, v) -> log.debug("allParams > " + k + " : " + v));
HttpEntity<MultiValueMap<String, String>> requestEntity = new HttpEntity(parameters, headers);
HttpEntity<MultiValueMap<String, String>> allRequestEntity = new HttpEntity(allParameters, headers);
responseEntity = restTemplate.postForEntity(url, requestEntity , String.class);
allResponseEntity = restTemplate.postForEntity(url, allRequestEntity , String.class);
//-----------------------------------
// 응답 처리
//-----------------------------------
HttpStatus statusCode = responseEntity.getStatusCode();
log.debug("RES StatusCode : " + statusCode);
String resultXML = responseEntity.getBody();
log.debug("RES resultXML : " + resultXML);
HttpStatus allStatusCode = allResponseEntity.getStatusCode();
log.debug("RES allStatusCode : " + allStatusCode);
String allResultXML = allResponseEntity.getBody();
log.debug("RES allResultXML : " + allResultXML);
//검색엔진 결과 json 파싱
JsonParser jsonParser = new JsonParser();
JsonObject jsonObject = null;
JsonObject tmp = null;
String collection = "";
String totalCount = "";
JsonArray jsonArray = null;
//전체검색 결과 탭별 count
jsonObject = (JsonObject) jsonParser.parse(allResultXML);
jsonObject = (JsonObject) jsonObject.get("SearchQueryResult");
jsonArray = (JsonArray) jsonObject.get("Collection");
for(int i=0;i<jsonArray.size();i++){
tmp = (JsonObject)jsonArray.get(i);
collection = tmp.get("Id").getAsString();
tmp = (JsonObject) tmp.get("DocumentSet");
totalCount = tmp.get("TotalCount").getAsString();
searchVO.setCollectionTotalCount(collection, totalCount);
};
//단일 결과데이터 담기
JsonArray colArray = null;
jsonObject = (JsonObject) jsonParser.parse(resultXML);
jsonObject = (JsonObject) jsonObject.get("SearchQueryResult");
jsonArray = (JsonArray) jsonObject.get("Collection");
List<NlibSearchCollectionVO> list = new ArrayList<>();
//NlibSearchCollectionVO vo = new NlibSearchCollectionVO();
Gson gson = new Gson();
int j;
for(int i=0;i<jsonArray.size();i++){
tmp = (JsonObject)jsonArray.get(i);
if(searchVO.getCollection().equals(tmp.get("Id").getAsString()))
{
tmp = (JsonObject) tmp.get("DocumentSet");
System.out.println(tmp.get("TotalCount").getAsString());
searchVO.setTotalCount(tmp.get("TotalCount").getAsString());
colArray = (JsonArray) tmp.get("Document");
//vo list로 json list 파싱
for(j=0;j<colArray.size();j++){
tmp = (JsonObject)colArray.get(j);
tmp = (JsonObject) tmp.get("Field");
vo = gson.fromJson(tmp, NlibSearchCollectionVO.class);
/* NlibSearchCollectionVO vo = new NlibSearchCollectionVO();
vo.setMasterId(tmp.get); = gson.fromJson(tmp, NlibSearchCollectionVO.class);*/
list.add(vo);
}
}
};
searchVO.setResultList(list);
} catch(Exception e) {
e.printStackTrace();
log.error("getSearch > Exception 발생 : " + e.toString());
}
return searchVO;
}
};

View File

@ -19,6 +19,7 @@ import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import cmm.Constant;
@ -29,7 +30,6 @@ import kccf.res.service.ResourcesService;
import kccf.sch.service.SearchCollectionResult;
import kccf.sch.service.SearchService;
import kccf.sch.service.vo.SearchCollectionVO;
import kccf.sch.service.vo.SearchVO;
import kccf.sch.service.vo.Sf1VO;
import nlib.cmm.NlibCommonController;
import nlib.cmm.service.CodeService;
@ -43,6 +43,9 @@ import nlib.col.service.InterestService;
import nlib.col.service.RisService;
import nlib.restful.service.DataApiReqVO;
import nlib.restful.service.DataApiResVO;
import nlib.sch.service.NlibSearchCollectionVO;
import nlib.sch.service.NlibSearchService;
import nlib.sch.service.NlibSearchVO;
import nlib.user.service.NlibLoginVO;
import nlib.util.StringUtil;
@ -73,6 +76,9 @@ public class NlibSearchController extends NlibCommonController {
@Resource(name = "collectionService")
private CollectionService collectionService;
@Resource(name = "nlibSearchService")
private NlibSearchService nlibSearchService;
/** resourcesService */
@Resource(name = "resourcesService")
private ResourcesService resourcesService;
@ -83,20 +89,19 @@ public class NlibSearchController extends NlibCommonController {
* @param req
* @return
*/
@RequestMapping("/search/searchList.do")
@RequestMapping(value = "/search/searchList.do")
public String searchList(
HttpServletRequest req
, Authentication authentication
, @RequestParam Map<String, String> paramMap
, ModelMap model
, @ModelAttribute("searchVO") SearchVO searchVO
, @ModelAttribute("searchVO") NlibSearchVO searchVO
, String all_totalCount
, HttpServletRequest request
, HttpServletResponse res) throws Exception {
String searchKeyword = paramMap.get("searchKeyword");
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> operList = new ArrayList();
// 페이징 사이즈 코드 목록 조회 (DB방식으로 변경 2021.08.06 KNKIM)
@ -109,8 +114,6 @@ public class NlibSearchController extends NlibCommonController {
//주제분야 목록 조회
List<HashMap<String,String>> clsf = codeService.listCtClsfs();
//문화원 목록 조회
/*vo = risService.selectOrgList();*/
// 반환 정보
model.addAttribute("pageIndex" , pageIndex);
@ -121,238 +124,62 @@ public class NlibSearchController extends NlibCommonController {
model.addAttribute("dtlsType", dtlsType);
model.addAttribute("firstCategoryList", clsf);
model.addAttribute("secondCategoryList", clsf);
/*model.addAttribute("orgList",vo);*/
//검색엔진
try{
searchVO.setCollection("reference_Coll");
// 검색관련 서버 설정
String searchIp = nlibProperty.getString("search.searchIp");
int searchPort = nlibProperty.getInt("search.searchPort");
int searchTimeOut = nlibProperty.getInt("search.searchTimeOut");
Sf1VO sf1Vo = new Sf1VO();
sf1Vo.setSearchIp(searchIp);
sf1Vo.setSearchPort(searchPort);
sf1Vo.setSearchTimeOut(searchTimeOut);
searchVO.setQuery(StringUtil.getString(searchVO.getQuery(), ""));
searchVO.setReQuery(StringUtil.getString(searchVO.getReQuery(), ""));
//결과내재검색만 입력했을경우
if(searchVO.getQuery().length() == 0 && searchVO.getReQuery().length() > 0)
{
searchVO.setQuery(searchVO.getReQuery());
searchVO.setReQuery("");
searchVO.setReQueryChk("query");
}
SearchCollectionResult collResult = searchService.getSearch(searchVO, sf1Vo);
all_totalCount = Integer.toString(searchService.getSearch_All_cnt(searchVO, sf1Vo));
// 결과
SearchCollectionVO collReferecne = new SearchCollectionVO();
SearchCollectionVO collCulturePost = new SearchCollectionVO();
SearchCollectionVO collCulturePostHot = new SearchCollectionVO();
SearchCollectionVO collTotal = new SearchCollectionVO();
SearchCollectionVO collInfo = new SearchCollectionVO();
SearchCollectionVO collMap = new SearchCollectionVO();
SearchCollectionVO collNumber = new SearchCollectionVO();
SearchCollectionVO collPick = new SearchCollectionVO();
SearchCollectionVO collStory = new SearchCollectionVO();
int totalCount = 0;
int page_totalCount =0;
// 탭의 totalcount등의 데이터를 가져온다.
ArrayList<SearchCollectionVO> collList = collResult.getCollectionList();
int collListSize = collList.size();
for(int i = 0 ; i < collListSize ; i++){
SearchCollectionVO coll = collList.get(i);
String collEn = coll.getCollectionName();
//검색엔진
try{
searchVO.setQuery("대출");
searchVO.setCollection("lib_loan");
searchVO.setQuery(StringUtil.getString(searchVO.getQuery(), ""));
searchVO.setReQuery(StringUtil.getString(searchVO.getReQuery(), ""));
if(collEn.indexOf("culturePostHot") < 0 && collEn.indexOf("total") < 0 && collEn.indexOf("_cate") < 0){
totalCount = totalCount + coll.getTotalCount();
//결과내재검색만 입력했을경우
if(searchVO.getQuery().length() == 0 && searchVO.getReQuery().length() > 0)
{
searchVO.setQuery(searchVO.getReQuery());
searchVO.setReQuery("");
searchVO.setReQueryChk("query");
}
if( !searchVO.getCollection().equals("ALL") && searchVO.getCollection().indexOf("_Coll") >= 0){
if(searchVO.getCollection().replace("_Coll", "").equals(collEn)){
page_totalCount = coll.getTotalCount();
}
searchVO = nlibSearchService.getSearch(searchVO);
//열람,대출 가능 상태
List<NlibSearchCollectionVO> resultList = searchVO.getResultList(); // 자료 리스트
CollectionVO col = new CollectionVO();
for(int i = 0; resultList.size() > i; i++)
{
col.setMasterId(resultList.get(i).getMASTER_ID());
operList.add(col);
}
if(collEn.equals("info")){
collInfo = coll;
}
else if(collEn.equals("map")){
collMap = coll;
}
else if(collEn.equals("number")){
collNumber = coll;
}
else if(collEn.equals("pick")){
collPick = coll;
}
else if(collEn.equals("reference")){
collReferecne = coll;
for(int j = 0 ; j < collReferecne.getSearchResultList().size() ; j++){
Map<Object ,Object> mapResult = collReferecne.getSearchResultList().get(j);
DataMap paramMap1 = new DataMap();
paramMap1.put("mId", mapResult.get("MEDIA_ID"));
if(StringUtils.isNotEmpty(mapResult.get("MEDIA_ID").toString())){
//DataMap media = cmmService.selectCmmAmsAssetsMediaDetail(paramMap1);
String url="";
/*String mediaId = media.getString("mid");
String mediaInterfaceId = media.getString("interfaceId");
String url = "";
if (StringUtils.isNotEmpty(mediaInterfaceId)) { // mediaInterfaceId가 존재할 경우만 URL 정보 생성
if(media.get("assetType") != null){
if(media.get("assetType").toString().equals("문서") ){
url = CmmUtil.getPropertyStr(Constant.KCCF_HOME_KEY)+"/npdfView.do?";
url += "npdf="+Constant.UA_TYPE_R+mediaInterfaceId; // MEDIA INTERFACE_ID 사용
}else if(media.get("assetType").toString().equals("링크")){
url = media.get("linkData").toString();
}else{
url = CmmUtil.getPropertyStr(Constant.KCCF_HOME_KEY)+"/lib/libraryDetail.do?contentId="+mediaId;
url += "&rfType="+Constant.UA_TYPE_R; // 히스토리 등록 사용
}
}
}*/
mapResult.put("LINK_URL", url);
}
}
}
else if(collEn.equals("culturePost")){
collCulturePost = coll;
}
else if(collEn.equals("total")){
collTotal = coll;
}
else if(collEn.equals("total_tags")){
model.addAttribute("total_tags", coll);
}
else if(collEn.indexOf("_cate") >= 0){ //cate
if(collEn.equals("first_class_cate")){
model.addAttribute("first_class_cate", coll);
}
else if(collEn.equals("second_class_cate")){
model.addAttribute("second_class_cate", coll);
}
else if(collEn.equals("first_council_cate")){
model.addAttribute("first_council_cate", coll);
}
else if(collEn.equals("second_council_cate")){
model.addAttribute("second_council_cate", coll);
}
else if(collEn.equals("first_category_cate")){
model.addAttribute("first_category_cate", coll);
}
else if(collEn.equals("second_category_cate")){
model.addAttribute("second_category_cate", coll);
}
else if(collEn.equals("first_theme_cate")){
model.addAttribute("first_theme_cate", coll);
}
else if(collEn.equals("second_theme_cate")){
model.addAttribute("second_theme_cate", coll);
}
}
else if(collEn.indexOf("culturePostHot") >= 0){ //cate
if(collEn.equals("culturePostHot")){
collCulturePostHot = coll;
}
else if(collEn.equals("culturePostHot_keywords")){
model.addAttribute("culturePostHot_keywords", coll);
}
else if(collEn.equals("culturePostHot_tags")){
model.addAttribute("culturePostHot_tags", coll);
}
}
}
// - (검색엔진 오류 일때 0값 으로 )
if(totalCount < 0){
totalCount = 0;
}
model.addAttribute("totalCount",totalCount);
model.addAttribute("reference", collReferecne);
model.addAttribute("culturePost", collCulturePost);
model.addAttribute("culturePostHot", collCulturePostHot);
model.addAttribute("total", collTotal);
model.addAttribute("all_totalCount",all_totalCount);
CollectionVO colVO = new CollectionVO();
// 검색엔진에서 받아온 데이터로 api통해 열람,대출신청상태등 받아온다
for(int i = 0; collReferecne.getSearchResultList().size() > i;i++)
{
/*collReferecne.getSearchResultList().get(i).get("MASTER_ID");*/
colVO.setMasterId("UR-91F3EB466E2743C48CC264BAC8CC573B");
operList.add(colVO);
}
//열람,대출 가능 상태
operList = collectionService.setDetailInfoForList(operList);
model.addAttribute("operList", operList);
// 경로
CmmUtil.setNfsPathModelMap(request,model);
// 페이징 관련
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(searchVO.getStartCount());
if(searchVO.getCollection().indexOf("toon") >= 0){
if(searchVO.getViewCount() == 10){
paginationInfo.setRecordCountPerPage(12);
}else{
paginationInfo.setRecordCountPerPage(searchVO.getViewCount());
}
}else{
paginationInfo.setRecordCountPerPage(searchVO.getViewCount());
}
paginationInfo.setPageSize((CmmUtil.isMobile(request)) ? 5 :10);
//paginationInfo.setTotalRecordCount(totalCount);
paginationInfo.setTotalRecordCount(searchVO.getCollection().equals("ALL") || searchVO.getCollection().equals("") ? totalCount :page_totalCount );
model.addAttribute("paginationInfo", paginationInfo);
//serviceVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
//serviceVO.setLastIndex(paginationInfo.getLastRecordIndex());
//serviceVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
model.addAttribute("searchVO", searchVO);
//System.out.println("\n\n\n\n\n\n\n/*****************totalSearchList-searchVO.toString()********************/"+searchVO.toString());
}catch(Exception e){
e.printStackTrace();
}
List<String> councilList = new ArrayList<String>();
councilList.add("마포문화원");
councilList.add("서울문화원");
councilList.add("종로문화원");
/*List<DataMap> councilList = resourcesService.selectCouncilList(); */
model.addAttribute("councilList", councilList);
operList = collectionService.setDetailInfoForList(operList);
model.addAttribute("operList", operList);
// 경로
CmmUtil.setNfsPathModelMap(request,model);
model.addAttribute("searchVO", searchVO);
}catch(Exception e){
e.printStackTrace();
}
//자료유형
model.addAttribute("firstClassList", codeService.listCodes(Constant.CODE_ID_MASTER_TYPE_DIV_CD));
model.addAttribute("secondClassList", codeService.listCodes(Constant.CODE_ID_DTLS_TYPE_DIV_CD));
// ams 서버 패스 정보
CmmUtil.setAmsPathModelMap(request,model);
searchVO.setQuery(searchVO.getQuery().replaceAll("\\\"", "&quot;"));
searchVO.setExactQuery(searchVO.getExactQuery().replaceAll("\\\"", "&quot;"));
List<String> councilList = new ArrayList<String>();
councilList.add("마포문화원");
councilList.add("서울문화원");
councilList.add("종로문화원");
/*List<DataMap> councilList = resourcesService.selectCouncilList(); */
model.addAttribute("councilList", councilList);
//자료유형
model.addAttribute("firstClassList", codeService.listCodes(Constant.CODE_ID_MASTER_TYPE_DIV_CD));
model.addAttribute("secondClassList", codeService.listCodes(Constant.CODE_ID_DTLS_TYPE_DIV_CD));
searchVO.setQuery(searchVO.getQuery().replaceAll("\\\"", "&quot;"));
return "nlib/collection/searchList";
}
@ -362,7 +189,7 @@ public class NlibSearchController extends NlibCommonController {
* @param req
* @return
*/
@RequestMapping(value="/collection/listItemsAjax.do")
@RequestMapping(value="/collection/listItemsAjax.do", method = RequestMethod.POST)
public ResponseEntity<String> listItemsAjax(HttpServletRequest req,
Authentication authentication, @RequestBody CollectionVO searchCollectionVO) {
@ -420,23 +247,31 @@ public class NlibSearchController extends NlibCommonController {
* @param request
* @param model
* @return
* @throws Exception
*/
@RequestMapping(value="/search/getDetailedSearchFormPopup.do")
public String getMemberQrcodeFormPopup(HttpServletRequest request, ModelMap model) {
public String getDetailedSearchFormPopup(HttpServletRequest request, ModelMap model) throws Exception {
//주제분야 목록 조회
List<HashMap<String,String>> clsf = codeService.listCtClsfs();
model.addAttribute("firstCategoryList", clsf);
model.addAttribute("secondCategoryList", clsf);
NlibLoginVO loginVO = getNlibLoginVO(request);
model.addAttribute("loginVO", loginVO);
//자료유형
model.addAttribute("firstClassList", codeService.listCodes(Constant.CODE_ID_MASTER_TYPE_DIV_CD));
model.addAttribute("secondClassList", codeService.listCodes(Constant.CODE_ID_DTLS_TYPE_DIV_CD));
return "nlib/search/getDetailedSearchFormPopup";
}
/**
* 소장자료 상세 내용 조회한다.
*
* @param req
* @return
*//*
@RequestMapping("/collection/selectItemInfo.do")
@RequestMapping("/search/selectItemInfo.do")
public String selectItemInfo(HttpServletRequest req, Authentication authentication, @RequestParam Map<String, String> paramMap, ModelMap model) {
// 목록 이동시 전달할 매개변수
String searchKeyword = paramMap.get("searchKeyword");

View File

@ -23,6 +23,7 @@
CLSF_ID
,CLSF_NM
,UP_CLSF_ID
,REMARK
FROM
CT_CLSF
WHERE 1=1

View File

@ -100,38 +100,12 @@ window.onload = function() {
reference_filterDel();
}; // window.onload
<%//검색필터 서브메뉴 보이기%>
function fn_show_sub(subId,subClass){
if($("#" + subId).css("display") == "none")
{
$("."+subClass).css("display","none");
$("#" + subId).css("display","block");
}else{
$("#" + subId).css("display","none");
}
}
//탭 이동
function fn_tabMove_sch(itemType){
$("#itemType").val(itemType);
alert(itemType);
fnFilterSch();
}
<%//검색필터 메뉴 더보기%>
function fn_show_more(showMoreId){
if($("#" + showMoreId).html() == "더 보기")
{
$("."+showMoreId).css("display","block");
$("#" + showMoreId).html("접기");
}
else if($("#" + showMoreId).html() == "접기")
{
$("."+showMoreId).css("display","none");
$("#" + showMoreId).html("더 보기");
}
}
function docView(){
alert("원문보기");
@ -166,367 +140,316 @@ function fn_search_article(pageIndex) {
</head>
<body>
<style>
.client-photo {
float: left;
margin: 0 20px 0 10px;
}
.client-photo img {
border-radius: 50%;
border: 1px solid #ddd;
}
.client-info {
margin-top: 10px;
}
.client-info p {
line-height: 25px;
}
</style>
<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="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="itemType" value="${searchVO.itemType }" />
<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}"
varStatus="status">
<c:forEach var="map" items="${pageSizeItem}" varStatus="status">
<c:if test="${map.key eq 'sCodeId'}">
<option value="<c:out value="${map.value }" />">
</c:if>
<c:if test="${map.key eq 'sCodeNm'}">${map.value}</option>
</c:if>
</c:forEach>
</c:forEach>
</select>
<input type="hidden" name="pageSize" id="pageSize" title="" value="${pageSize }" />
<input type="hidden" name="pageIndex" id="pageIndex" title="페이지번호" value="${pageIndex }" />
<input type="text" name="query" id="query" title="검색어" <c:if test="${!(searchVO.reQueryChk eq 'query') }">style="display:none;"</c:if> placeholder="검색어를 입력하세요." value="${searchVO.query}" size="35" maxlength="50" />
<input type="text" name="reQuery" id="reQuery" title="재검색" <c:if test="${!(searchVO.reQueryChk eq 'reQuery') }">style="display:none;"</c:if> placeholder="결과내재검색" value="${searchVO.reQuery}" size="35" maxlength="50" />
<input type="button" name="btnSearch" id="btnSearch" onclick="fnFilterSch();" value="검색" />
<input type="checkbox" id="reQueryChk" name="reQueryChk" value="query" <c:if test="${searchVO.reQueryChk eq 'reQuery' }">checked="checked"</c:if>><label for="reQueryChk">결과내재검색</label>
<div>
<dl>
<dt class="blind">검색결과 안내</dt>
<dd>
<c:choose>
<c:when test="${searchVO.realQuery ne '' && (!empty searchVO.realQuery) }">
<em>'${searchVO.realQuery}'</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>
<div>
<input type="button" style="width: 100px;" name="btnSearch" onclick="fn_tabMove_sch('all');" value="전체()" />
<input type="button" style="width: 100px;" name="btnSearch" onclick="fn_tabMove_sch('visit_Coll');" value="방문열람()" />
<input type="button" style="width: 100px;" name="btnSearch" onclick="fn_tabMove_sch('rent_Coll');" value="대출()" />
<input type="button" style="width: 100px;" name="btnSearch" onclick="fn_tabMove_sch('online_Coll');" value="온라인열람()" />
<input type="button" style="width: 100px;" name="btnSearch" onclick="fn_tabMove_sch('etc_Coll);" value="기타()" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="button" onclick="insertInterest('UR-2AAA037F482D45E1A720F3152F10C008');" value="관심">
<input type="button" onclick="risShow('UR-2AAA037F482D45E1A720F3152F10C008');" value="RIS">
</div>
<div style="text-align: left;">
<div id="searchMenu" style="display: inline-block; width: 200px; margin-top: 5px; vertical-align: top;">
<ul>
<h3>검색필터</h3>
<ul id="reference_fillter_append">
<!-- 소장자료 섹션 -->
<div class="location data">
<h2 class="blind">소장자료 섹션영역</h2>
<div class="inner">
<div class="row-top">
<div class="location-box">
<ul class="loc">
<li>HOME</li>
<li class="on">소장자료</li>
</ul>
</ul>
<ul>
<h3>자료유형</h3>
<li>
<div class="depth-1">
<%-- <div class="check"><input type="checkbox" id="data-type-chk" /><label for="data-type-chk">전체(<span>${second_class_cate.totalCount}</span>)</label></div> --%>
<div class="check">
<input type="checkbox" id="data-type-chk" disabled="disabled" /><label
for="data-type-chk">전체(<span><c:choose>
<c:when test="${empty second_class_cate}">0</c:when>
<c:otherwise>${second_class_cate.totalCount} </c:otherwise>
</c:choose></span>)
</label>
<ul class="tit">
<li><span>소장</span>자료</li>
</ul>
</div>
<div class="arr"><img src="/images/icon/icon-join-arr2.png" alt="화살표 아이콘"></div>
</div>
<div class="contents row-bottom">
<div class="data-box">
<div class="article-side">
<section class="filter-wrap">
<div class="filter-head">
<h2>검색필터</h2>
<button type="button" class="btn-filter-reset">초기화</button>
</div>
<div class="choice-condition">
<ul id="reference_fillter_append">
<li>문서 &#62; 고문서</li>
<li>문서 &#62; 일반문서</li>
<li>도면/지도 &#62; 탁본</li>
</ul>
</div>
<div class="filter-condition">
<div class="filter">
<div class="filter-tit">
<h3>자료유형</h3>
</div>
<div class="filter-list">
<ul id="ul_category1List">
<li>
<c:forEach var="firstClassList" items="${firstClassList}" varStatus="fcStatus">
<li>
<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} </label>
</div>
</div>
<ul class="depth-2">
<c:forEach var="secondClassList" items="${secondClassList}" varStatus="seStatus">
<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>
</div>
</li>
</c:if>
</c:forEach>
</ul>
</li>
</c:forEach>
</li>
</ul>
</div>
<button type="button" class="btn-toggle-more">더보기</button>
</div>
<div class="filter">
<div class="filter-tit">
<h3>주제분야</h3>
<button type="button" class="btn-toggle">닫기</button>
</div>
<div class="filter-list">
<ul id="ul_category2List">
<c:set var="count" value="0" />
<c:forEach var="firstCategoryInfo" items="${firstCategoryList}" varStatus="status">
<c:if test="${firstCategoryInfo.upClsfId eq '2' }">
<li>
<div class="depth-1 <c:if test="${fn:contains(searchVO.filter_category, firstCategoryInfo.clsfId) }"> on</c:if>">
<div class="check"><input type="checkbox" value="${firstCategoryInfo.clsfId}" id="theme-chk${count+1}" name="first_category" <c:if test="${fn:contains(searchVO.first_category, firstCategoryInfo.clsfId) }">checked="checked"</c:if>/><label for="theme-chk${count+1}">${firstCategoryInfo.clsfNm}(<span>0</span>)</label></div>
</div>
<ul class="depth-2">
<c:forEach var="secondCategoryInfo" items="${secondCategoryList}" varStatus="seStatus">
<c:if test="${firstCategoryInfo.clsfId eq secondCategoryInfo.upClsfId }">
<li><div class="check"><input type="checkbox" value="${secondCategoryInfo.clsfId}" id="theme-chk${count+1}-${seStatus.index+1}" name="second_category" <c:if test="${fn:contains(searchVO.second_category, secondCategoryInfo.clsfId) }">checked="checked"</c:if>/><label for="theme-chk${count+1}-${seStatus.index+1}">${secondCategoryInfo.clsfNm}(<span>0</span>)</label></div></li>
</c:if>
</c:forEach>
</ul>
</li>
<c:set var="count" value="${count+1 }" />
</c:if>
</c:forEach>
</ul>
</div>
<button type="button" class="btn-toggle-more">더보기</button>
</div>
<div class="filter">
<div class="filter-tit">
<h3>생산년도</h3>
</div>
<div class="filter-list year">
<ul>
<li>
<label for="m-year-1"><input type="radio" id="m-year-1" name="m-year" checked="checked" value="all">전체</label>
</li>
<li>
<label for="m-year-2-1"><input type="radio" id="m-year-2" name="m-year" value="date">
<input type="text" id="m-year-2-1" placeholder="예) 2017"> ~ <input type="text" id="m-year-2-2" placeholder="예) 2018">
</label>
</li>
</ul>
</div>
<button type="button" class="btn-apply">적용</button>
</div>
<div class="filter">
<div class="filter-tit">
<h3>생산기관</h3>
</div>
<div class="filter-list">
<ul id="ul_category3List">
<c:forEach var="councilList" items="${councilList}" varStatus="status">
<li>
<div class="depth-1">
<div class="check"><input type="checkbox" id="agency-chk1"/><label for="agency-chk1">${councilList}</label></div>
</div>
</li>
</c:forEach>
</ul>
</div>
<button type="button" class="btn-toggle-more">더보기</button>
</div>
</div>
</section>
</div>
<div class="list-box culture-box">
<div class="tab">
<ul class="tabs">
<li><a href="#" onclick="fn_tabMove_sch('lib_total');">전체<span>(<c:out value="${searchVO.lib_total_totalCount}"/>)</span></a></li>
<li><a href="#" onclick="fn_tabMove_sch('lib_offline');">방문열람<span>(<c:out value="${searchVO.lib_offline_totalCount}"/>)</span></a></li>
<li><a href="#" onclick="fn_tabMove_sch('lib_loan');">대출<span>(<c:out value="${searchVO.lib_loan_totalCount}"/>)</span></a></li>
<li><a href="#" onclick="fn_tabMove_sch('lib_online');">온라인열람<span>(<c:out value="${searchVO.lib_online_totalCount}"/>)</span></a></li>
<li><a href="#" onclick="fn_tabMove_sch('lib_etc');">기타<span>(<c:out value="${searchVO.lib_etc_totalCount}"/>)</span></a></li>
</ul>
<div class="title">
<span class="count">총 <em><c:out value="${searchVO.totalCount}"/></em>건</span>
<div class="list-search-wrap list-top">
<div class="re-search">
<label for="reQueryChk"><input type="checkbox" id="reQueryChk" name="reQueryChk" value="query" <c:if test="${searchVO.reQueryChk eq 'reQuery' }">checked="checked"</c:if>>결과 내 재검색</label>
</div>
<div class="list-select page-size">
<select name="" id="" title="리스트 개수 선택">
<option value="12">12개씩보기</option>
<option value="24">24개씩보기</option>
<option value="36">36개씩보기</option>
<option value="48">48개씩보기</option>
</select>
</div>
<div class="list-input">
<input type="text" name="query" id="query" title="검색어" <c:if test="${!(searchVO.reQueryChk eq 'query') }">style="display:none;"</c:if> placeholder="검색어를 입력하세요." value="${searchVO.query}" maxlength="50" />
<input type="text" name="reQuery" id="reQuery" title="재검색" <c:if test="${!(searchVO.reQueryChk eq 'reQuery') }">style="display:none;"</c:if> placeholder="결과내재검색" value="${searchVO.reQuery}" maxlength="50" />
<button type="submit">검색</button>
</div>
</div>
</div>
<div class="tab_content">
<div class="tabs_item">
<div class="inner">
<div class="list-cart-wrap">
<div class="list-data">
<div class="list t-tit-line">
<div class="t-data">자료정보</div>
<div class="t-btn">이용</div>
</div>
<c:forEach var="result" items="${searchVO.resultList}"> <!-- 리스트 출력 시작 -->
<div class="list">
<div class="t-data">
<div class="img"><a href="#">
<c:choose>
<c:when test="${!empty result.RPRS_THUMB_URL}">
<img src="${result.RPRS_THUMB_URL}" alt="${result.TITLE }">
</c:when>
<c:otherwize>
<img src="/images/thumbnail/noimage-s.jpg" alt="${result.TITLE }">
</c:otherwize>
</c:choose>
</a><span class="favorites"><img src="images/icon/icon-cart-Favorites.png" class="off" alt="즐겨찾기 아이콘"><img src="images/icon/icon-cart-Favorites-on.png" class="on" alt="즐겨찾기 아이콘"></span>
</div>
<div class="type">
<span class="online">온라인열람</span>
<span class="loan">대출</span>
<span class="visit">방문열람</span>
</div>
<div class="title"><a href="#">경주읍성 남문 장례문의 옥루</a></div>
<div class="code">KCCF1010010001</div>
<div class="subject">
<span>주제분야 : 도서간행물 &#62; 연속간행물</span>
<span>주제분야 : 자연과지리 &#62; 자연환경</span>
<span>생산기관 : 경북경주문화원</span>
<span>생산년도 : 2021</span>
</div>
</div>
<div class="t-btn">
<button type="button" class="btn-color">원문보기</button>
<button type="button" class="btn-gray">RIS</button>
</div>
</div>
<div class="list">
<div class="t-data">
<div class="img"><a href="#"><img src="/images/img/img-cart-img01.jpg" alt=""></a><span class="favorites"><img src="images/icon/icon-cart-Favorites.png" class="off" alt="즐겨찾기 아이콘"><img src="images/icon/icon-cart-Favorites-on.png" class="on" alt="즐겨찾기 아이콘"></span></div>
<div class="type">
<span class="online">온라인열람</span>
<span class="loan">대출</span>
<span class="visit">방문열람</span>
</div>
<div class="title"><a href="#">경주읍성 남문 장례문의 옥루</a></div>
<div class="code">KCCF1010010001</div>
<div class="subject">
<span>주제분야 : 도서간행물 &#62; 연속간행물</span>
<span>주제분야 : 자연과지리 &#62; 자연환경</span>
<span>생산기관 : 경북경주문화원</span>
<span>생산년도 : 2021</span>
</div>
</div>
<div class="t-btn">
<p>대출신청 가능<br>방문열람신청 가능</p>
</div>
</div>
<div class="list">
<div class="t-data">
<div class="img"><a href="#"><img src="/images/img/img-cart-img01.jpg" alt=""></a><span class="favorites"><img src="images/icon/icon-cart-Favorites.png" class="off" alt="즐겨찾기 아이콘"><img src="images/icon/icon-cart-Favorites-on.png" class="on" alt="즐겨찾기 아이콘"></span></div>
<div class="type">
<span class="online">온라인열람</span>
<span class="loan">대출</span>
<span class="visit">방문열람</span>
</div>
<div class="title"><a href="#">경주읍성 남문 장례문의 옥루</a></div>
<div class="code">KCCF1010010001</div>
<div class="subject">
<span>주제분야 : 도서간행물 &#62; 연속간행물</span>
<span>주제분야 : 자연과지리 &#62; 자연환경</span>
<span>생산기관 : 경북경주문화원</span>
<span>생산년도 : 2021</span>
</div>
</div>
<div class="t-btn">
<button type="button" class="btn-color">원문보기</button>
<button type="button" class="btn-gray">RIS</button>
</div>
</div>
</c:forEach> <!-- 리스트 출력 끝부분 -->
</div>
</div>
<ul class="paging">
<li class="btn btn-first"><a href="#" onclick="linkPage(1); return false;" title="처음으로">처음으로</a></li>
<li class="btn btn-prev"><a href="#" onclick="linkPage(1); return false;" title="이전">이전</a></li>
<li class="on"><a href="#" title="현재위치 페이지">1</a></li>
<li><a href="?pageIndex=2" onclick="linkPage(2); return false;" title="2 페이지">2</a></li>
<li><a href="?pageIndex=3" onclick="linkPage(3); return false;" title="3 페이지">3</a></li>
<li><a href="?pageIndex=4" onclick="linkPage(4); return false;" title="4 페이지">4</a></li>
<li><a href="?pageIndex=5" onclick="linkPage(5); return false;" title="5 페이지">5</a></li>
<li><a href="?pageIndex=6" onclick="linkPage(6); return false;" title="6 페이지">6</a></li>
<li><a href="?pageIndex=7" onclick="linkPage(7); return false;" title="7 페이지">7</a></li>
<li><a href="?pageIndex=8" onclick="linkPage(8); return false;" title="8 페이지">8</a></li>
<li><a href="?pageIndex=9" onclick="linkPage(9); return false;" title="9 페이지">9</a></li>
<li><a href="?pageIndex=10" onclick="linkPage(10); return false;" title="10 페이지">10</a></li>
<li class="btn btn-next"><a href="#" onclick="linkPage(11); return false;" title="다음">다음</a></li>
<li class="btn btn-last"><a href="#" onclick="linkPage(418); return false;" title="맨끝으로">맨끝으로</a></li>
</ul>
</div>
</div>
<div class="tabs_item">
<div class="inner">
02
</div>
</div>
<div class="tabs_item">
<div class="inner">
03
</div>
</div>
<div class="tabs_item">
<div class="inner">
04
</div>
</div>
<div class="tabs_item">
<div class="inner">
05
</div>
</div>
</div>
</div>
</li>
<c:forEach var="firstClassList" items="${firstClassList}"
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="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>
</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 }">
<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>
</div>
</li>
</c:if>
</c:forEach>
</ul>
</li>
</c:forEach>
<li><a href="javascript:void(0);" id="showMoreType"
onclick="fn_show_more('showMoreType'); return false;">더 보기</a></li>
</ul>
<ul>
<h3>주제분야</h3>
<c:set var="count" value="0" />
<c:forEach var="firstCategoryInfo" items="${firstCategoryList}" varStatus="status">
<c:if test="${firstCategoryInfo.upClsfId eq '2' }">
<li
<c:if test ="${count >= 4}"> class="showMoreClsf" style="display:none;" </c:if>>
<div class="depth-1 <c:if test="${fn:contains(searchVO.filter_category, firstCategoryInfo.clsfId) }"> on</c:if>">
<div class="check"><input type="checkbox" value="${firstCategoryInfo.clsfId}" id="theme-chk${count+1}" name="first_category" <c:if test="${fn:contains(searchVO.first_category, firstCategoryInfo.clsfId) }">checked="checked"</c:if>/><label for="theme-chk${count+1}">${firstCategoryInfo.clsfNm}(<span>0</span>)</label></div>
</div>
<ul class="depth-2" style="display: none;">
<c:forEach var="secondCategoryInfo" items="${secondCategoryList}" varStatus="seStatus">
<c:if test="${firstCategoryInfo.clsfId eq secondCategoryInfo.upClsfId }">
<li><div class="check"><input type="checkbox" value="${secondCategoryInfo.clsfId}" id="theme-chk${count+1}-${seStatus.index+1}" name="second_category" <c:if test="${fn:contains(searchVO.second_category, secondCategoryInfo.clsfId) }">checked="checked"</c:if>/><label for="theme-chk${count+1}-${seStatus.index+1}">${secondCategoryInfo.clsfNm}(<span>0</span>)</label></div></li>
</c:if>
</c:forEach>
</ul>
</li>
<c:set var="count" value="${count+1 }" />
</c:if>
</c:forEach>
<li><a href="javascript:void(0);" id="showMoreClsf"
onclick="fn_show_more('showMoreClsf'); return false;">더 보기</a></li>
</ul>
<ul>
<h3>생산년도</h3>
<div>
<input type="radio" name="createDate" value="allDate">전체<br>
<input type="radio" name="createDate" value="date">
<input type="text" placeholder="예)2017">~<input type="text" placeholder="예)2018"><br>
(<input type="checkbox">미상포함)
<a href="javascript:void(0);" onclick="selectCreateDate(); return false;">적용</a>
</div>
</ul>
<ul>
<h3>생산기관</h3>
<c:forEach var="councilList" items="${councilList}" varStatus="status">
${councilList} <br>
</c:forEach>
</ul>
</div>
<div style="display: inline-block;">
<table id="itemList">
<tr>
<th style='width:800px;'>자료정보</th>
<th style='width:200px;'>이용</th>
</tr>
<c:forEach var="result" items="${reference.searchResultList}">
<tr>
<td>
<c:if test="${!empty result.MAIN_IMG}"><!-- 썸네일이 있는 경우 -->
<img src="${result.MAIN_IMG}" style="width:150px;height:200px;" alt="${result.TITLE}" />
<c:if test="${!empty result.COPYRIGHT and result.COPYRIGHT ne ''}"><p class="source-origin">출처:${result.COPYRIGHT}</p></c:if>
</c:if>
<input type="button" value="관심" onclick="insertInterest('${result.MASTER_ID}');">
<c:forEach var="operList" items="${operList}">
<c:if test="${result.MASTER_ID eq operList.masterId}">
<c:if test="${(!empty operList.openDivCd) && (operList.openDivCd ne '3') }">
온라인열람&nbsp;
</c:if>
<c:if test="${(!empty operList.operOutRangeCd) && (operList.operOutRangeCd ne '02')}">
대출&nbsp;
</c:if>
<c:if test="${(!empty operList.operReadRangeCd) && (operList.operReadRangeCd ne '03')}">
방문열람&nbsp;
</c:if>
<c:if test="${(!empty operList.openDivCd) && (operList.openDivCd ne '3') && (!empty operList.operOutRangeCd) && (operList.operOutRangeCd ne '02') && (!empty operList.operReadRangeCd) && (operList.operReadRangeCd ne '03') }">
기타
</c:if>
</c:if>
</c:forEach>
<br>
<span class="tit-txt">[${result.FIRST_CLASS_NM}]<c:out value="${result.TITLE}"/></span><br>
<c:if test="${!empty result.FIRST_CLASS_NM}"><em><%--자료유형 : --%>자료유형 : </em>${result.FIRST_CLASS_NM} <c:if test="${!empty result.SECOND_CLASS_NM}">&gt; ${result.SECOND_CLASS_NM}</c:if></c:if>
<c:if test="${!empty result.FIRST_CATEGORY_NM}"><em><%--주제분야 : --%>주제분야 : </em>${result.FIRST_CATEGORY_NM} <c:if test="${!empty result.SECOND_CATEGORY_NM}">&gt; ${result.SECOND_CATEGORY_NM}</c:if></c:if>
<c:if test="${!empty result.PUBLISHER}">| 생산기관 : ${result.PUBLISHER}</c:if>
<c:if test="${(!empty result.GENYEAR) && (result.GENYEAR ne '0')}">| 생산년도 : ${result.GENYEAR}</c:if>
<br>
<%-- <c:if test="${!empty result.COUNCIL_NM_TOT}"><li><em>소장처 : </em>${result.COUNCIL_NM_TOT}</li></c:if> --%>
</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>
<div id="paging" name="paging"
style="display: block; text-align: center;"></div>
</div>
</div>
</div>
</div>
<input type="text" name="articleNo" id="articleNo" value=""
title="선택글번호" readonly />
</form>
<script>
//<![CDATA[
//자료유형-카테고리 cnt세팅
<c:forEach items="${first_class_cate.searchResultList}" var="result">
$("#referencelistForm input:checkbox[name='first_class']").each(function (index, item) {
if($(this).val() == "${result.first_class_nm}" ){
$(this).next('label').children().text('<fmt:formatNumber value="${result.first_class_cnt}" pattern="#,###" />');
}
});
</c:forEach>
<c:forEach items="${second_class_cate.searchResultList}" var="result">
$("#referencelistForm input:checkbox[name='second_class']").each(function (index, item) {
var second_class_nm_arr = "${result.second_class_nm}".split("^");
if($(this).val() == second_class_nm_arr[1] ){
$(this).next('label').children().text('<fmt:formatNumber value="${result.second_class_cnt}" pattern="#,###" />');
}
});
</c:forEach>
//주제분야-카테고리 cnt세팅
<c:forEach items="${first_category_cate.searchResultList}" var="result">
$("#referencelistForm input:checkbox[name='first_category']").each(function (index, item) {
if($(this).val() == "${result.first_category_nm}" ){
$(this).next('label').children().text('<fmt:formatNumber value="${result.first_category_cnt}" pattern="#,###" />');
}
});
</c:forEach>
<c:forEach items="${second_category_cate.searchResultList}" var="result">
$("#referencelistForm input:checkbox[name='second_category']").each(function (index, item) {
var second_class_nm_arr = "${result.second_category_nm}".split("^");
if($(this).val() == second_class_nm_arr[1] ){
$(this).next('label').children().text('<fmt:formatNumber value="${result.second_category_cnt}" pattern="#,###" />');
}
});
</c:forEach>
//지방문화원-카테고리cnt 세팅
<c:forEach items="${first_council_cate.searchResultList}" var="result">
$("#referencelistForm [name='sido_name']").each(function (index, item) {
if($(this).val() == "${result.first_council_nm}" ){
$(this).next('label').children().text('<fmt:formatNumber value="${result.first_council_cnt}" pattern="#,###" />');
}
});
</c:forEach>
<c:forEach items="${second_council_cate.searchResultList}" var="result">
$("#referencelistForm [name='sojang_council']").each(function (index, item) {
var second_class_nm_arr = "${result.second_council_nm}".split("^");
if($(this).val() == second_class_nm_arr[1] ){
$(this).next('label').children().text('<fmt:formatNumber value="${result.second_council_cnt}" pattern="#,###" />');
}
});
</c:forEach>
fnLabel_reference();
//filterFn();
//fnLabel_reference_detail();
//sido-tab height 유지
$('div.depth-1.on').each(function () {
if($(this).find('input').attr('name') == 'sido_name') {
$(".pop-culture-center .line-1").data("idx", "1");
$(".pop-culture-center .line-2").data("idx", "2");
$(".pop-culture-center .line-3").data("idx", "3");
target = $(".pop-filter li.line-" + $(this).find('input').parents("li").data("idx") + "");
size = $(this).find('input').parents("div.depth-1").next().outerHeight() + 50 ;
$(".line-1 , .line-2, .line-3").attr("style" , '');
target.css("height" , size );
}else if($(this).find('input').attr('name') == 'first_class') {
if($(this).find('input').val() != 'A' && $(this).find('input').val() != 'B' && $(this).find('input').val() != 'C'){
$('.filter .filter-class.btn-toggle-more').text('접기');
$('.filter .filter-class.btn-toggle-more').siblings('.filter-list').children('ul').children('li').css('display', 'block');
}
}
else if($(this).find('input').attr('name') == 'first_category') {
if($(this).find('input').val() != 'A' && $(this).find('input').val() != 'B' && $(this).find('input').val() != 'C' && $(this).find('input').val() != 'D'){
$('.filter .filter-category.btn-toggle-more').text('접기');
$('.filter .filter-category.btn-toggle-more').siblings('.filter-list').children('ul').children('li').css('display', 'block');
}
}
});
//mobileSearchResultTab();
//]]>
</script>
</div>
</body>
</html>

View File

@ -115,7 +115,7 @@ $(document).ready(function() {
<div class="selected-conditions">
<div class="title">
<p>선택조건</p>
<button type="button" class="btn-reset-conditions">초기화</button>
<button type="button" class="btn-reset-conditions" name="subject">초기화</button>
</div>
<ul class="conditions">
<li><button type="button" title="삭제">자연과 지리 <span class="sign">&gt;</span> 마을경관</button></li>
@ -124,90 +124,22 @@ $(document).ready(function() {
</div>
<div class="conditions-box">
<div class="line line1">
<div class="depth1">
<div class="depth1-check check tab"><input type="checkbox" value="A" id="subject-chk1" /><label for="subject-chk1">자연과지리</label></div>
<ul class="depth2">
<li><div class="check"><input type="checkbox" value="A01" id="subject-chk1-1" /><label for="subject-chk1-1">자연환경</label></div></li>
<li><div class="check"><input type="checkbox" value="A02" id="subject-chk1-2" /><label for="subject-chk1-2">동식물</label></div></li>
<li><div class="check"><input type="checkbox" value="A03" id="subject-chk1-3" /><label for="subject-chk1-3">마을경관</label></div></li>
<li><div class="check"><input type="checkbox" value="A04" id="subject-chk1-4" /><label for="subject-chk1-4">향토지</label></div></li>
</ul>
</div>
<div class="depth1">
<div class="depth1-check check tab"><input type="checkbox" value="B" id="subject-chk2" /><label for="subject-chk2">지방의역사</label></div>
<ul class="depth2">
<li><div class="check"><input type="checkbox" value="B01" id="subject-chk2-1" /><label for="subject-chk2-1">선사</label></div></li>
<li><div class="check"><input type="checkbox" value="B02" id="subject-chk2-2" /><label for="subject-chk2-2">삼국~통일신라</label></div></li>
<li><div class="check"><input type="checkbox" value="B03" id="subject-chk2-3" /><label for="subject-chk2-3">고려</label></div></li>
<li><div class="check"><input type="checkbox" value="B04" id="subject-chk2-4" /><label for="subject-chk2-4">조선</label></div></li>
<li><div class="check"><input type="checkbox" value="B05" id="subject-chk2-5" /><label for="subject-chk2-5">개항기(1876~1910)</label></div></li>
<li><div class="check"><input type="checkbox" value="B06" id="subject-chk2-6" /><label for="subject-chk2-6">일제강점기</label></div></li>
<li><div class="check"><input type="checkbox" value="B07" id="subject-chk2-7" /><label for="subject-chk2-7">현대</label></div></li>
</ul>
</div>
<div class="depth1">
<div class="depth1-check check tab"><input type="checkbox" value="C" id="subject-chk3" /><label for="subject-chk3">문화유산</label></div>
<ul class="depth2">
<li><div class="check"><input type="checkbox" value="C01" id="subject-chk3-1" /><label for="subject-chk3-1">선사 유적 및 유물</label></div></li>
<li><div class="check"><input type="checkbox" value="C02" id="subject-chk3-2" /><label for="subject-chk3-2">건축유적</label></div></li>
<li><div class="check"><input type="checkbox" value="C03" id="subject-chk3-3" /><label for="subject-chk3-3">조각</label></div></li>
<li><div class="check"><input type="checkbox" value="C04" id="subject-chk3-4" /><label for="subject-chk3-4">서화</label></div></li>
<li><div class="check"><input type="checkbox" value="C05" id="subject-chk3-5" /><label for="subject-chk3-5">공예</label></div></li>
<li><div class="check"><input type="checkbox" value="C06" id="subject-chk3-6" /><label for="subject-chk3-6">기타</label></div></li>
</ul>
</div>
<div class="depth1">
<div class="depth1-check check tab"><input type="checkbox" value="D" id="subject-chk4" /><label for="subject-chk4">성씨와 인물</label></div>
<ul class="depth2">
<li><div class="check"><input type="checkbox" value="D01" id="subject-chk4-1" /><label for="subject-chk4-1">주민</label></div></li>
<li><div class="check"><input type="checkbox" value="D02" id="subject-chk4-2" /><label for="subject-chk4-2">성씨</label></div></li>
<li><div class="check"><input type="checkbox" value="D03" id="subject-chk4-3" /><label for="subject-chk4-3">인물</label></div></li>
</ul>
</div>
<div class="depth1">
<div class="depth1-check check tab"><input type="checkbox" value="E" id="subject-chk5" /><label for="subject-chk5">정치와 행정</label></div>
<ul class="depth2">
<li><div class="check"><input type="checkbox" value="E01" id="subject-chk5-1" /><label for="subject-chk5-1">지방정치</label></div></li>
<li><div class="check"><input type="checkbox" value="E02" id="subject-chk5-2" /><label for="subject-chk5-2">지방행정</label></div></li>
<li><div class="check"><input type="checkbox" value="E03" id="subject-chk5-3" /><label for="subject-chk5-3">사법 및 치안</label></div></li>
<li><div class="check"><input type="checkbox" value="E04" id="subject-chk5-4" /><label for="subject-chk5-4">지역사회운동</label></div></li>
</ul>
</div>
<div class="depth1">
<div class="depth1-check check tab"><input type="checkbox" value="F" id="subject-chk6" /><label for="subject-chk6">경제와 산업</label></div>
<ul class="depth2">
<li><div class="check"><input type="checkbox" value="F01" id="subject-chk6-1" /><label for="subject-chk6-1">총론</label></div></li>
<li><div class="check"><input type="checkbox" value="F02" id="subject-chk6-2" /><label for="subject-chk6-2">농림수산업</label></div></li>
<li><div class="check"><input type="checkbox" value="F03" id="subject-chk6-3" /><label for="subject-chk6-3">광공업</label></div></li>
<li><div class="check"><input type="checkbox" value="F04" id="subject-chk6-4" /><label for="subject-chk6-4">금융 및 보험업</label></div></li>
<li><div class="check"><input type="checkbox" value="F05" id="subject-chk6-5" /><label for="subject-chk6-5">상업 및 서비스업</label></div></li>
<li><div class="check"><input type="checkbox" value="F06" id="subject-chk6-6" /><label for="subject-chk6-6">교통, 통신 및 건설업</label></div></li>
</ul>
</div>
<div class="depth1">
<div class="depth1-check check tab"><input type="checkbox" value="G" id="subject-chk7" /><label for="subject-chk7">종교와 문화</label></div>
<ul class="depth2">
<li><div class="check"><input type="checkbox" value="G01" id="subject-chk7-1" /><label for="subject-chk7-1">종교</label></div></li>
<li><div class="check"><input type="checkbox" value="G02" id="subject-chk7-2" /><label for="subject-chk7-2">교육</label></div></li>
<li><div class="check"><input type="checkbox" value="G03" id="subject-chk7-3" /><label for="subject-chk7-3">문화예술</label></div></li>
<li><div class="check"><input type="checkbox" value="G04" id="subject-chk7-4" /><label for="subject-chk7-4">언론</label></div></li>
<li><div class="check"><input type="checkbox" value="G05" id="subject-chk7-5" /><label for="subject-chk7-5">체육</label></div></li>
</ul>
</div>
<div class="depth1">
<div class="depth1-check check tab"><input type="checkbox" value="H" id="subject-chk8" /><label for="subject-chk8">생할과 민속</label></div>
<ul class="depth2">
<li><div class="check"><input type="checkbox" value="H01" id="subject-chk8-1" /><label for="subject-chk8-1">생활</label></div></li>
<li><div class="check"><input type="checkbox" value="H02" id="subject-chk8-2" /><label for="subject-chk8-2">민속</label></div></li>
</ul>
</div>
<div class="depth1">
<div class="depth1-check check tab"><input type="checkbox" value="I" id="subject-chk9" /><label for="subject-chk9">구비전승어문학</label></div>
<ul class="depth2">
<li><div class="check"><input type="checkbox" value="I01" id="subject-chk9-1" /><label for="subject-chk9-1">지명유래</label></div></li>
<li><div class="check"><input type="checkbox" value="I02" id="subject-chk9-2" /><label for="subject-chk9-2">어문학</label></div></li>
</ul>
</div>
<c:set var="count" value="0" />
<c:forEach var="firstCategoryInfo" items="${firstCategoryList}" varStatus="status">
<c:if test="${firstCategoryInfo.upClsfId eq '2' }">
<div class="depth1">
<div class="depth1-check check tab"><input type="checkbox" value="${firstCategoryInfo.remark}" id="subject-chk${count+1}" /><label for="subject-chk${count+1}">${firstCategoryInfo.clsfNm}</label></div>
<ul class="depth2">
<c:forEach var="secondCategoryInfo" items="${secondCategoryList}" varStatus="seStatus">
<c:if test="${firstCategoryInfo.clsfId eq secondCategoryInfo.upClsfId }">
<li><div class="check"><input type="checkbox" value="${secondCategoryInfo.remark}" id="subject-chk${count+1}-${seStatus.index+1}" name="second_category" /><label for="subject-chk${count+1}-${seStatus.index+1}">${secondCategoryInfo.clsfNm}</label></div></li>
</c:if>
</c:forEach>
</ul>
</div>
<c:set var="count" value="${count+1 }" />
</c:if>
</c:forEach>
</div><!-- //line-1 -->
</div>
</fieldset>
@ -217,7 +149,7 @@ $(document).ready(function() {
<div class="selected-conditions">
<div class="title">
<p>선택조건</p>
<button type="button" class="btn-reset-conditions">초기화</button>
<button type="button" class="btn-reset-conditions" name="datype">초기화</button>
</div>
<ul class="conditions">
<li><button type="button" title="삭제">도서간행물 <span class="sign">&gt;</span> 단행본</button></li>
@ -226,76 +158,26 @@ $(document).ready(function() {
</div>
<div class="conditions-box">
<div class="line line1">
<div class="depth1">
<div class="depth1-check check tab"><input type="checkbox" value="A" id="datype-chk1" /><label for="datype-chk1">도서간행물</label></div>
<ul class="depth2">
<li><div class="check"><input type="checkbox" value="A01" id="datype-chk1-1" /><label for="datype-chk1-1">총서·총류</label></div></li>
<li><div class="check"><input type="checkbox" value="A02" id="datype-chk1-2" /><label for="datype-chk1-2">단행본</label></div></li>
<li><div class="check"><input type="checkbox" value="A03" id="datype-chk1-3" /><label for="datype-chk1-3">보고서</label></div></li>
<li><div class="check"><input type="checkbox" value="A04" id="datype-chk1-4" /><label for="datype-chk1-4">자료집</label></div></li>
<li><div class="check"><input type="checkbox" value="A05" id="datype-chk1-5" /><label for="datype-chk1-5">연속간행물</label></div></li>
<li><div class="check"><input type="checkbox" value="A06" id="datype-chk1-6" /><label for="datype-chk1-6">고서적</label></div></li>
<li><div class="check"><input type="checkbox" value="A99" id="datype-chk1-7" /><label for="datype-chk1-7">기타</label></div></li>
</ul>
</div>
<div class="depth1">
<div class="depth1-check check tab"><input type="checkbox" value="B" id="datype-chk2" /><label for="datype-chk2">문서</label></div>
<ul class="depth2">
<li><div class="check"><input type="checkbox" value="B01" id="datype-chk2-1" /><label for="datype-chk2-1">고문서</label></div></li>
<li><div class="check"><input type="checkbox" value="B02" id="datype-chk2-2" /><label for="datype-chk2-2">일반문서</label></div></li>
<li><div class="check"><input type="checkbox" value="B03" id="datype-chk2-3" /><label for="datype-chk2-3">행정문서</label></div></li>
<li><div class="check"><input type="checkbox" value="B04" id="datype-chk2-4" /><label for="datype-chk2-4">보고서</label></div></li>
<li><div class="check"><input type="checkbox" value="B05" id="datype-chk2-5" /><label for="datype-chk2-5">자료집</label></div></li>
<li><div class="check"><input type="checkbox" value="B99" id="datype-chk2-6" /><label for="datype-chk2-6">기타</label></div></li>
</ul>
</div>
<div class="depth1">
<div class="depth1-check check tab"><input type="checkbox" value="C" id="datype-chk3" /><label for="datype-chk3">시청각물</label></div>
<ul class="depth2">
<li><div class="check"><input type="checkbox" value="C01" id="datype-chk3-1" /><label for="datype-chk3-1">사진</label></div></li>
<li><div class="check"><input type="checkbox" value="C02" id="datype-chk3-2" /><label for="datype-chk3-2">동영상</label></div></li>
<li><div class="check"><input type="checkbox" value="C03" id="datype-chk3-3" /><label for="datype-chk3-3">음원</label></div></li>
<li><div class="check"><input type="checkbox" value="C04" id="datype-chk3-4" /><label for="datype-chk3-4">전자책(PDF, PPT 등)</label></div></li>
<li><div class="check"><input type="checkbox" value="C99" id="datype-chk3-5" /><label for="datype-chk3-5">기타</label></div></li>
</ul>
</div>
<div class="depth1">
<div class="depth1-check check tab"><input type="checkbox" value="D" id="datype-chk4" /><label for="datype-chk4">도안</label></div>
<ul class="depth2">
<li><div class="check"><input type="checkbox" value="D01" id="datype-chk4-1" /><label for="datype-chk4-1">지도</label></div></li>
<li><div class="check"><input type="checkbox" value="D02" id="datype-chk4-2" /><label for="datype-chk4-2">도면</label></div></li>
<li><div class="check"><input type="checkbox" value="D03" id="datype-chk4-3" /><label for="datype-chk4-3">탁본</label></div></li>
<li><div class="check"><input type="checkbox" value="D99" id="datype-chk4-4" /><label for="datype-chk4-4">기타</label></div></li>
</ul>
</div>
<div class="depth1">
<div class="depth1-check check tab"><input type="checkbox" value="E" id="datype-chk5" /><label for="datype-chk5">박물</label></div>
<ul class="depth2">
<li><div class="check"><input type="checkbox" value="E01" id="datype-chk5-1" /><label for="datype-chk5-1">서화</label></div></li>
<li><div class="check"><input type="checkbox" value="E02" id="datype-chk5-2" /><label for="datype-chk5-2">조각ㆍ공예품</label></div></li>
<li><div class="check"><input type="checkbox" value="E03" id="datype-chk5-3" /><label for="datype-chk5-3">민속용구</label></div></li>
<li><div class="check"><input type="checkbox" value="E04" id="datype-chk5-4" /><label for="datype-chk5-4">행정박물</label></div></li>
<li><div class="check"><input type="checkbox" value="E05" id="datype-chk5-5" /><label for="datype-chk5-5">상장</label></div></li>
<li><div class="check"><input type="checkbox" value="E06" id="datype-chk5-6" /><label for="datype-chk5-6">VR</label></div></li>
<li><div class="check"><input type="checkbox" value="E07" id="datype-chk5-7" /><label for="datype-chk5-7">AR</label></div></li>
<li><div class="check"><input type="checkbox" value="E08" id="datype-chk5-8" /><label for="datype-chk5-8">3D 스캔</label></div></li>
<li><div class="check"><input type="checkbox" value="E99" id="datype-chk5-9" /><label for="datype-chk5-9">기타</label></div></li>
</ul>
</div>
<div class="depth1">
<div class="depth1-check check tab"><input type="checkbox" value="G" id="datype-chk6" /><label for="datype-chk6">웹정보자료</label></div>
<ul class="depth2">
<li><div class="check"><input type="checkbox" value="G01" id="datype-chk6-1" /><label for="datype-chk6-1">웹콘텐츠</label></div></li>
<li><div class="check"><input type="checkbox" value="G02" id="datype-chk6-2" /><label for="datype-chk6-2">외부자료링크</label></div></li>
<li><div class="check"><input type="checkbox" value="G03" id="datype-chk6-3" /><label for="datype-chk6-3">웹사이트</label></div></li>
</ul>
</div>
<div class="depth1">
<div class="depth1-check check tab"><input type="checkbox" value="F" id="datype-chk7" /><label for="datype-chk7">기타</label></div>
<ul class="depth2">
<li><div class="check"><input type="checkbox" value="F99" id="datype-chk7-1" /><label for="datype-chk7-1">기타</label></div></li>
</ul>
</div>
<c:forEach var="firstClassList" items="${firstClassList}" varStatus="fcStatus">
<div class="depth1">
<div class="depth1-check check tab">
<input type="checkbox" value="${firstClassList.column1}" name="first_class" id="datype-chk${fcStatus.index+1}" />
<label for="data-type-chk${fcStatus.index+1}">${firstClassList.sCodeNm}</label>
</div>
<ul class="depth2">
<c:forEach var="secondClassList" items="${secondClassList}" varStatus="seStatus">
<c:if test="${firstClassList.column1 eq secondClassList.column2 }">
<li>
<div class="check">
<input type="checkbox" value="${secondClassList.sCodeId}" name="second_class" id="datype-chk${fcStatus.index+1}-${seStatus.index+1}" />
<label for="datype-chk${fcStatus.index+1}-${seStatus.index+1}">${secondClassList.sCodeNm}</label>
</div>
</li>
</c:if>
</c:forEach>
</ul>
</div>
</c:forEach>
</div><!-- //line-1 -->
</div>
</fieldset>

View File

@ -140,15 +140,33 @@ $(document).ready(function(){
});
$('.pop-advanced-search .depth2 input').change(function() {
var html = "";
var depth1 = "";
var depth2 = "";
if ($(this).is(':checked')) {
depth1 = $(this).parents('.depth2').siblings('.depth1-check').find('label').text();
depth2 = $("label[for='"+$(this).attr('id')+"']").text();
html = "<li><button type=\"button\" onclick=\"function('');\" title=\"삭제\" name=\""+ $(this).attr('id') +"\">" + depth1 + "<span class=\"sign\"> > </span>"+ depth2 +"</button></li>"
$(this).parents('.depth2').siblings('.depth1-check').find('input').prop('checked', true);
$(this).parents('.conditions-box').siblings('.selected-conditions').find('.conditions').append(html);
} else {
if ($(this).parents('.depth2').find('input:checked').length <= 0) {
$(this).parents('.depth2').siblings('.depth1-check').find('input').prop('checked', false);
$("button[name="+$(this).attr('id')+"]").remove();
}
}
});
// 상세검색 초기화
$('.pop-advanced-search .btn-reset-conditions').on('click', function() {
alert("DAD");
$("input[id^='"+$(this).attr('name')+"-chk']").each(function() {
$(this).prop('checked', false);
});
});
// depth-1 열고 닫기
$('.filter-tit .btn-toggle').on('click', function() {
if($(this).text() == '닫기') {