348 lines
10 KiB
Java
348 lines
10 KiB
Java
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;
|
|
}
|
|
}
|
|
}
|