검색엔진 개발중
This commit is contained in:
parent
e2d9ffdb64
commit
6f913c7d75
209
src/main/java/nlib/sch/Constant.java
Normal file
209
src/main/java/nlib/sch/Constant.java
Normal file
@ -0,0 +1,209 @@
|
|||||||
|
package nlib.sch;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 상수 정의
|
||||||
|
* @author Kdmistrator
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class Constant {
|
||||||
|
public static final String ENCODING_UTF8 = "UTF-8";
|
||||||
|
//public static final String NAVER_API_CLIENT_ID = "8eXEekRgHTb5SgAJNqOT"; // server//사용하지 말것
|
||||||
|
//public static final String NAVER_API_CLIENT_ID = "E2NR9PXuVJf6GHnnaGrs"; // local //사용하지 말것
|
||||||
|
//public static final String GOOGLE_API_KEY = "AIzaSyBs9SeIzKKCM392GpdqxORkHDItauzm7WA"; // 사용하지 말것
|
||||||
|
|
||||||
|
// FCM Server key
|
||||||
|
public static final String FCM_SERVER_SEND_URL = "https://fcm.googleapis.com/fcm/send";
|
||||||
|
public static final String FCM_SERVER_KEY = "AAAAYRjFhhA:APA91bHcWX8Uan5cc1MuXGvwPQdgcmmRwiuYlO_-FA_o-ysoHBvFlwiGUqApNIWCUbsbSTGbKwEVKqPu8WZV5GH7nbVjo5wWXtXyUzn9PfRdEjEsuhK_XhdLEJ5rH714pnBeu-KNgUxm";
|
||||||
|
public static final String FCM_SEND_YN = "N";
|
||||||
|
|
||||||
|
// kccf home key
|
||||||
|
public static final String KCCF_HOME_KEY = "kccf.home";
|
||||||
|
|
||||||
|
// com/context-properties.xml 의 ams 서버관련 키값
|
||||||
|
public static final String AMS_SERVER_KEY = "ams.server";
|
||||||
|
public static final String AMS_FILE_PATH_KEY = "ams.file.url.path";
|
||||||
|
public static final String AMS_ASSETS_PATH_KEY = "ams.assets.url.path";
|
||||||
|
public static final String AMS_THUMBNAIL_PATH_KEY = "ams.thumbnail.url.path";
|
||||||
|
public static final String NFS_DOC_KEY = "ams.doc.path";
|
||||||
|
|
||||||
|
// upload 경로
|
||||||
|
public static final String UPLOAD_HOME_KEY = "file.upload.home"; // 서버경로 (upload폴더 상위경로) : 로컬 개발시 upload 파일이 로컬에 존재하지 않을 경우 사용
|
||||||
|
|
||||||
|
//pdfview
|
||||||
|
public static final String PDF_VIEW_KEY = "pdf.view.path";
|
||||||
|
|
||||||
|
// com/context-properties.xml 의 nas 서버관련 키값
|
||||||
|
public static final String NFS_NAS_KEY = "ams.nas.path";
|
||||||
|
|
||||||
|
// 나클립스 동영상 플레이어 주소
|
||||||
|
public static final String MEDIA_PLAYER_KEY = "naclips.server";
|
||||||
|
public static final String MEDIA_PLAYER_VOD_KEY = "naclips.vod.path";
|
||||||
|
public static final String MEDIA_PLAYER_AUDIO_KEY = "naclips.audio.path";
|
||||||
|
|
||||||
|
public static final String [] AREA_CODE_ARRAY = {"02", "051", "053", "032", "062", "042", "052", "044" , "031" , "033" , "043" , "041" , "063", "061" , "054" , "055" , "064" , "070", "0505"};
|
||||||
|
public static final String [] MOBILE_CODE_ARRAY = {"010", "011", "016", "017", "018", "019"};
|
||||||
|
|
||||||
|
public static final String [] DF_SIDO_CODE_ARRAY = {"11","26","27","28","29","30","31","41","42","43","44","45","46","47","48","49"};
|
||||||
|
public static final String [] DF_SIDO_NAME_ARRAY = {"서울","부산","대구","인천","광주","대전","울산","경기","강원","충북","충남","전북","전남","경북","경남","제주"};
|
||||||
|
|
||||||
|
public static final String [] AIS_SIDO_NAME_ARRAY = {"서울","부산","대구","인천","광주","대전","울산","경기","강원","충북","충남","전북","전남","경북","경남","제주","세종","북한","전국"};
|
||||||
|
public static final String [] AIS_SIDO_PARAM_NAME_ARRAY = {"서울특별시","부산광역시","대구광역시","인천광역시","광주광역시","대전광역시","울산광역시","경기도","강원도","충청북도","충청남도","전라북도","전라남도","경상북도","경상남도","제주특별자치도","세종특별자치시","북한","전국"};
|
||||||
|
|
||||||
|
public static final String [] SIDO_NAME_ARRAY = {"서울특별시","부산광역시","대구광역시","인천광역시","광주광역시","대전광역시","울산광역시","경기도","강원도","충청북도","충청남도","전라북도","전라남도","경상북도","경상남도","세종특별자치시","제주특별자치도"};
|
||||||
|
|
||||||
|
public static final String [] DF_DISS_CODE_ARRAY = {"1","2","3","4","5"};
|
||||||
|
public static final String [] DF_DISS_NAME_ARRAY = {"감기","눈병","식중독","천식","피부병"};
|
||||||
|
|
||||||
|
public static final String [] FCST_TIME_ARRAY = {"03","06","09","12","15","18","21","00"};
|
||||||
|
public static final String [][] FCST_TIME_MAPPING_ARRAY = {{"01","02","03"}, {"04","05","06"},{"07","08","09"},{"10","11","12"},{"13","14","15"},{"16","17","18"},{"19","20","21"},{"22","23","00"}};
|
||||||
|
|
||||||
|
public static final String [] GIA_COTENT_TYPE_ID_ARRAY = {"12","14","15","25","28","32","38","39"};
|
||||||
|
public static final String [] GIA_COTENT_TYPE_NAME_ARRAY = {"관광지","문화시설","축제/공연/행사","여행코스","레포츠","숙박","쇼핑","음식"};
|
||||||
|
// 축제/공연/행사 -> 공연ㆍ행사
|
||||||
|
|
||||||
|
public static final String [] DF_COUNCIL_CODE_ARRAY = {"GW","GG","GB","GN","GJ","DG","DJ","BU","SU","SJ","US","IC","JB","JN","JJ","CB","CN"};
|
||||||
|
public static final String [] AMS_ASSET_TYPE_ARRAY = {"이미지","동영상","오디오","문서","링크"};
|
||||||
|
public static final String [] AMS_CATEGORY_ARRAY = {"A","B","C","D","E","F","G","H","I"};
|
||||||
|
|
||||||
|
public static final String USE_AT_Y = "Y";
|
||||||
|
public static final String USE_AT_N = "N";
|
||||||
|
|
||||||
|
public static final String CMS_SERIES_DEFAULT = "마을신앙";
|
||||||
|
|
||||||
|
public static final String QNA_ANSW_N = "답변대기";
|
||||||
|
public static final String QNA_ANSW_Y = "답변완료";
|
||||||
|
public static final String QNA_PROC_P = "2";
|
||||||
|
public static final String QNA_PROC_C = "3";
|
||||||
|
|
||||||
|
public static final String VIEW_TYPE_L = "L"; //목록
|
||||||
|
public static final String VIEW_TYPE_D = "D"; //상세
|
||||||
|
|
||||||
|
|
||||||
|
public static final String LOGIN_HIS_TYPE_I = "I";
|
||||||
|
public static final String LOGIN_HIS_TYPE_O = "O";
|
||||||
|
|
||||||
|
public static final String CODE_ID_COM004 = "COM004"; // 게시판
|
||||||
|
public static final String CODE_ID_COM013 = "COM013"; // 회원상태
|
||||||
|
public static final String CODE_ID_COM034 = "COM034"; // 이용자
|
||||||
|
public static final String CODE_ID_FMS004 = "FMS004"; // 테마
|
||||||
|
public static final String CODE_ID_FMS005 = "FMS005"; // 시리즈
|
||||||
|
public static final String CODE_ID_FMS006 = "FMS006"; // 시대
|
||||||
|
public static final String CODE_ID_FMS007 = "FMS007"; // 자료유형
|
||||||
|
public static final String CODE_ID_FMS008 = "FMS008"; // 콘텐츠유형
|
||||||
|
public static final String CODE_ID_FMS009 = "FMS009"; // 지역
|
||||||
|
public static final String CODE_ID_FMS012 = "FMS012"; // 자료유형(대분류)
|
||||||
|
public static final String CODE_ID_FMS013 = "FMS013"; // 자료유형(중분류)
|
||||||
|
public static final String CODE_ID_MASTER_TYPE_DIV_CD = "MASTER_TYPE_DIV_CD"; // 자료유형(대분류)
|
||||||
|
public static final String CODE_ID_DTLS_TYPE_DIV_CD = "DTLS_TYPE_DIV_CD"; // 자료유형(중분류)
|
||||||
|
public static final String CODE_ID_FMS014 = "FMS014"; // 주제분야(대주제)
|
||||||
|
public static final String CODE_ID_FMS015 = "FMS015"; // 주제분야(중주제)
|
||||||
|
public static final String CODE_ID_FMS016 = "FMS016"; // 지역문화정보
|
||||||
|
public static final String CODE_ID_FMS017 = "FMS017"; // 배너위치
|
||||||
|
public static final String CODE_ID_FMS018 = "FMS018"; // 문화원 지역
|
||||||
|
public static final String CODE_ID_FMS019 = "FMS019"; // 지역문화 PICK(자산유형)
|
||||||
|
public static final String CODE_ID_FMS020 = "FMS020"; // 로고위치
|
||||||
|
|
||||||
|
public static final String [] ASSETS_CLASS_ARRAY = {"기획","일반","특화","기타"}; //콘텐츠유형
|
||||||
|
public static final String [] ASSETS_CLASS_ARRAY_PICK = {"일반","특화"}; // 지역문화Pick 콘텐츠유형
|
||||||
|
public static final String [] ASSETS_TYPE_ARRAY_PICK = {"문서", "이미지", "동영상", "오디오", "링크"}; // 지역문화Pick 자산유형 ("웹툰" 제외)
|
||||||
|
public static final String [] ASSETS_TYPE_ARRAY_PICK_ALL = {"문서", "이미지", "동영상", "오디오", "링크", "웹툰"};
|
||||||
|
|
||||||
|
public static final String RES_SEARCHTYPE = "문화원소장"; // 소장자료 검색조건
|
||||||
|
|
||||||
|
public static final String CODE_ID_COM013_P = "P"; // 회원 가입승인상태
|
||||||
|
public static final String CODE_ID_COM013_D = "D"; // 회원삭제 상태
|
||||||
|
|
||||||
|
public static final String CODE_ID_FMS017_M01 = "M01"; // 배너위치 메인
|
||||||
|
public static final String CODE_ID_FMS017_M02 = "M02"; // 배너위치 PICK
|
||||||
|
public static final String CODE_ID_FMS017_M99 = "M99"; // 배너위치 문화원
|
||||||
|
|
||||||
|
public static final int BBS_ID_NOTICE_MAIN_VIEW = 3;
|
||||||
|
public static final int BBS_ID_QNA_MAIN_VIEW = 4;
|
||||||
|
public static final int BBS_ID_CUL_MAIN_VIEW = 2;
|
||||||
|
|
||||||
|
public static final String BASE_DISTANCE = "10";
|
||||||
|
|
||||||
|
public static final int CMM_CONTENTS_LIMIT_CNT = 6; // 지역문화Pick 목록 이미지 개수 변경 (2019.10.02)
|
||||||
|
public static final int CMM_TAGS_LIMIT_CNT = 9;
|
||||||
|
public static final int CMM_CONTENTS_SMALL_LIMIT_CNT = 2;
|
||||||
|
|
||||||
|
public static final String RECOMMEND_YN_Y = "Y";
|
||||||
|
public static final String RECOMMEND_YN_N = "N";
|
||||||
|
|
||||||
|
public static final String HAVE_DETAIL_CONDITION_Y = "Y";
|
||||||
|
public static final String HAVE_DETAIL_CONDITION_N = "N";
|
||||||
|
|
||||||
|
public static final String SEARCH_TYPE_1 = "1";
|
||||||
|
public static final String SEARCH_TYPE_2 = "2";
|
||||||
|
|
||||||
|
public static final String BBS_TOP_YN_Y = "Y";
|
||||||
|
public static final int BBS_TOP_CNT = 4;
|
||||||
|
|
||||||
|
public static final String PMS_CONT_TYPE_G = "EXT_GIA_INFO"; // 한국관광공사
|
||||||
|
public static final String PMS_CONT_TYPE_C = "CMM_COUNCIL_INFO"; // 문화원
|
||||||
|
|
||||||
|
public static final String CONTENT_TYPE_A = "A"; // 지역문화 PICK
|
||||||
|
public static final String CONTENT_TYPE_B = "B"; // BBS
|
||||||
|
public static final String CONTENT_TYPE_C = "C"; // 지역문화이야기
|
||||||
|
public static final String CONTENT_TYPE_G = "G"; // 지역문화체험 -한국관광공사 api
|
||||||
|
public static final String CONTENT_TYPE_I = "I"; // 문화원
|
||||||
|
public static final String CONTENT_TYPE_P = "P"; // 지역문화포스트
|
||||||
|
public static final String CONTENT_TYPE_T = "T"; // 지역문화툰
|
||||||
|
|
||||||
|
public static final String ACTIVITY_TYPE_B = "B"; // 스크랩
|
||||||
|
public static final String ACTIVITY_TYPE_O = "O"; // 최근열람
|
||||||
|
|
||||||
|
public static final String[] M_TYPE_ARRAY = {"이미지","동영상","오디오","링크"};
|
||||||
|
public static final String M_TYPE_I = "I"; // 이미지
|
||||||
|
public static final String M_TYPE_V = "V"; // 비디오(동영상)
|
||||||
|
public static final String M_TYPE_A = "A"; // 오디오
|
||||||
|
|
||||||
|
// 사용 구분
|
||||||
|
public static final String UA_TYPE_W = "W"; // 웹
|
||||||
|
public static final String UA_TYPE_M = "M"; // 모바일웹
|
||||||
|
public static final String UA_TYPE_A = "A"; // 앱
|
||||||
|
public static final String UA_TYPE_R = "R"; // RIS
|
||||||
|
|
||||||
|
|
||||||
|
public static final String BBS_ID_NOTICE = "BBSMSTR_000000000001"; // 공지사항
|
||||||
|
public static final String BBS_ID_FAQ = "BBSMSTR_000000000002"; // FAQ
|
||||||
|
public static final String BBS_ID_CUL = "BBSMSTR_000000000003"; // 문화원소식
|
||||||
|
public static final String BBS_ID_OUR = "BBSMSTR_000000000004"; // 우리문화
|
||||||
|
|
||||||
|
public static final String [] BBS_ID_ARRAY = {BBS_ID_NOTICE,BBS_ID_FAQ,BBS_ID_CUL,BBS_ID_OUR};
|
||||||
|
public static final String [] BBS_NAME_ARRAY = {"공지사항","FAQ","문화원소식","우리문화"};
|
||||||
|
|
||||||
|
public static final String [] BBS_MAIN_CUL_TYPE_ARRAY1 = {"공지","뉴스"};
|
||||||
|
public static final String [] BBS_MAIN_CUL_TYPE_ARRAY2 = {"행사","축제"};
|
||||||
|
|
||||||
|
public static final String AUTH_GROUP_DEFAULT_ID = "GROUP_00000000000000";
|
||||||
|
public static final String AUTH_ORGNZT_DEFAULT_ID = "ORGNZT_0000000000000";
|
||||||
|
|
||||||
|
public static final String AUTH_ROLE_ANONYMOUS = "ROLE_ANONYMOUS";
|
||||||
|
public static final String AUTH_ROLE_KDM = "ROLE_KDM";
|
||||||
|
public static final String AUTH_ROLE_KDM_URL = "/kdm/usr/kdmMgrList.do";
|
||||||
|
public static final String AUTH_ROLE_SYM = "ROLE_SYM";
|
||||||
|
public static final String AUTH_ROLE_SYM_URL = "/kdm/usr/kdmMgrList.do";
|
||||||
|
|
||||||
|
public static final String[] INTERCEPTOR_PASS_PATH_ARRAY = {"kdm"};
|
||||||
|
|
||||||
|
public static final String ANDROID = "android";
|
||||||
|
public static final String IOS = "ios";
|
||||||
|
public static final String PREFIX_M = "/m";
|
||||||
|
|
||||||
|
public static final String SCHEDULER_EXT_DF_INFO = "건강질병관리";
|
||||||
|
public static final String SCHEDULER_EXT_FD_INFO = "문화정보";
|
||||||
|
public static final String SCHEDULER_EXT_GIA_INFO = "관광정보";
|
||||||
|
public static final String SCHEDULER_MAIN_A_INFO = "메인 지역문화PICK";
|
||||||
|
public static final String SCHEDULER_MAIN_C_INFO = "메인 지역문화이야기";
|
||||||
|
public static final String SCHEDULER_MAIN_G_INFO = "메인 지역문화정보";
|
||||||
|
public static final String SCHEDULER_MAIN_P_INFO = "메인 지역문화포스트";
|
||||||
|
public static final String SCHEDULER_MEDIA_HST_INFO = "월별 지방문화원 인기자료";
|
||||||
|
|
||||||
|
public static final String [] SCHEDULER_NAME_ARRAY = {SCHEDULER_EXT_DF_INFO,SCHEDULER_EXT_FD_INFO,SCHEDULER_EXT_GIA_INFO};
|
||||||
|
|
||||||
|
public static enum META_OG_TYPE { website, article };
|
||||||
|
|
||||||
|
public static final String [] NCULTURE_URL_ARRAY = {"www","www1","www2","cms","cms1","cms2","ams","ams1","ams2","vod","vod1","vod2","api","api1","api2","app","app1","app2","vr","cms-dev","ams-dev","kccf-jira","kccf-wiki","kccf-ci","cloud","kccf2019","doc","webzine","docs","minio","minio-dev","port-dev","app-dev","api-dev","vod-dev","newcms","ncms","ncms-dev","ncms-test","newcms-dev","ams-test","ci","local"};
|
||||||
|
}
|
||||||
196
src/main/java/nlib/sch/util/DataMap.java
Normal file
196
src/main/java/nlib/sch/util/DataMap.java
Normal file
@ -0,0 +1,196 @@
|
|||||||
|
package nlib.sch.util;
|
||||||
|
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import egovframework.rte.psl.dataaccess.util.CamelUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Class Name : DataMap.java
|
||||||
|
* @author Kdmistrator
|
||||||
|
* @version 1.0
|
||||||
|
* DB 리턴 받을때 사용하거나 Map 타입으로 사용할때 사용한다.
|
||||||
|
*/
|
||||||
|
public class DataMap extends LinkedHashMap<String, Object> implements Map<String, Object>{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(DataMap.class);
|
||||||
|
|
||||||
|
public static DataMap getNewDataMap(){
|
||||||
|
return new DataMap();
|
||||||
|
}
|
||||||
|
public static DataMap getNewDataMap(HttpServletRequest request){
|
||||||
|
DataMap map = new DataMap();
|
||||||
|
map.defaultSetInfo(request, map);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
private void defaultSetInfo(HttpServletRequest request, DataMap map){
|
||||||
|
map.setString("contentType",request.getContentType());
|
||||||
|
map.setString("contextPath",request.getContextPath());
|
||||||
|
map.setString("uri",request.getRequestURI());
|
||||||
|
map.setString("protocol",request.getProtocol());
|
||||||
|
map.setString("ip", NlibCmmUtil.getIpAddress(request));
|
||||||
|
}
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
private static DataMap makePrameterMap(HttpServletRequest request){
|
||||||
|
DataMap resultMap = new DataMap();
|
||||||
|
Map<String, String[]> maps = request.getParameterMap();
|
||||||
|
Set<String> keySet = maps.keySet();
|
||||||
|
Iterator<String> keys = keySet.iterator();
|
||||||
|
while (keys.hasNext()) {
|
||||||
|
String key = keys.next();
|
||||||
|
String[] value = maps.get(key);
|
||||||
|
if (value.length > 1){
|
||||||
|
//for (String val : value) {
|
||||||
|
//resultMap.put(key, val);
|
||||||
|
//}
|
||||||
|
resultMap.put(key, value);
|
||||||
|
} else {
|
||||||
|
if(value[0] instanceof String) {
|
||||||
|
resultMap.put(key, value[0].toString());
|
||||||
|
} else {
|
||||||
|
resultMap.put(key, value[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
resultMap.defaultSetInfo(request, resultMap);
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
public static DataMap getParamMap(HttpServletRequest request){
|
||||||
|
return makePrameterMap(request);
|
||||||
|
}
|
||||||
|
private static String nvlTrim(String obj) {
|
||||||
|
String result = "";
|
||||||
|
if (obj != null)
|
||||||
|
result = obj.trim();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
public Object get(String key){
|
||||||
|
Object o = null;
|
||||||
|
try {
|
||||||
|
o = super.get(key);
|
||||||
|
} catch (NullPointerException e) {
|
||||||
|
LOGGER.error("Error in get() key="+key, e);
|
||||||
|
}
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
public String [] getStringArray(String key) {
|
||||||
|
String [] r = null;
|
||||||
|
try {
|
||||||
|
if(super.get(key) instanceof String[]){
|
||||||
|
r = (String [])super.get(key);
|
||||||
|
}else{
|
||||||
|
r = new String[1];
|
||||||
|
r[0]= getString(key);
|
||||||
|
}
|
||||||
|
} catch (NullPointerException e) {
|
||||||
|
LOGGER.error("Error in getStringArray() key="+key, e);
|
||||||
|
}
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
public String getString(String key) {
|
||||||
|
String r = "";
|
||||||
|
try {
|
||||||
|
if(super.get(key) != null){
|
||||||
|
r = super.get(key).toString();
|
||||||
|
}
|
||||||
|
} catch (NullPointerException e) {
|
||||||
|
LOGGER.error("Error in getString() key="+key, e);
|
||||||
|
}
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
public int getInt(String key) {
|
||||||
|
return getInt(key, 0);
|
||||||
|
}
|
||||||
|
public int getInt(String key, int defaultInt) {
|
||||||
|
int result = 0;
|
||||||
|
String str = getString(key);
|
||||||
|
try {
|
||||||
|
if(StringUtils.isNotEmpty(str)) {
|
||||||
|
result = new Integer(str).intValue();
|
||||||
|
}
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
LOGGER.error("Error in getInt() key="+key+", getString(key)=="+getString(key), e);
|
||||||
|
result = defaultInt;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
public long getLong(String key) {
|
||||||
|
return getLong(key, 0);
|
||||||
|
}
|
||||||
|
public long getLong(String key, long defaultLong) {
|
||||||
|
long result = 0;
|
||||||
|
String str = getString(key);
|
||||||
|
try {
|
||||||
|
if(StringUtils.isNotEmpty(str)) {
|
||||||
|
Double tmp = Double.parseDouble(str);
|
||||||
|
result = tmp.longValue();
|
||||||
|
}
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
LOGGER.error("Error in getLong() key="+key+", getString(key)=="+getString(key), e);
|
||||||
|
result = defaultLong;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
public double getDouble(String key) {
|
||||||
|
return getDouble(key, 0);
|
||||||
|
}
|
||||||
|
public double getDouble(String key, double defaultDouble) {
|
||||||
|
double result = 0;
|
||||||
|
String str = getString(key);
|
||||||
|
try {
|
||||||
|
if(StringUtils.isNotEmpty(str)) {
|
||||||
|
result = new Long(str).doubleValue();
|
||||||
|
}
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
LOGGER.error("Error in getDouble() key="+key+", getString(key)="+getString(key), e);
|
||||||
|
result = defaultDouble;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
public boolean getBoolean(String key){
|
||||||
|
return getBoolean(key, false);
|
||||||
|
}
|
||||||
|
public boolean getBoolean(String key, boolean defaltValue){
|
||||||
|
boolean result = defaltValue;
|
||||||
|
String strObj = nvlTrim(key);
|
||||||
|
if (strObj.length() > 0){
|
||||||
|
result = strObj.toLowerCase().equals("true");
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
public void setString(String key, String value){
|
||||||
|
super.put(key, value);
|
||||||
|
}
|
||||||
|
public void setInt(String key, int value){
|
||||||
|
super.put(key, value);
|
||||||
|
}
|
||||||
|
public void setInt(String key, String value){
|
||||||
|
super.put(key, new Integer(value).intValue());
|
||||||
|
}
|
||||||
|
public void setLong(String key, long value){
|
||||||
|
super.put(key, value);
|
||||||
|
}
|
||||||
|
public void setLong(String key, String value){
|
||||||
|
super.put(key, new Long(value).longValue());
|
||||||
|
}
|
||||||
|
public void setDouble(String key, double value){
|
||||||
|
super.put(key, value);
|
||||||
|
}
|
||||||
|
public void setDouble(String key, String value){
|
||||||
|
super.put(key, new Double(value).doubleValue());
|
||||||
|
}
|
||||||
|
public void setBoolean(String key, boolean value){
|
||||||
|
super.put(key, new Boolean(value));
|
||||||
|
}
|
||||||
|
public Object put(String key, Object value) {
|
||||||
|
return super.put(CamelUtil.convert2CamelCase((String) key), value);
|
||||||
|
}
|
||||||
|
}
|
||||||
1068
src/main/java/nlib/sch/util/NlibCmmUtil.java
Normal file
1068
src/main/java/nlib/sch/util/NlibCmmUtil.java
Normal file
File diff suppressed because it is too large
Load Diff
447
src/main/java/nlib/sch/web/SearchController.java
Normal file
447
src/main/java/nlib/sch/web/SearchController.java
Normal file
@ -0,0 +1,447 @@
|
|||||||
|
package nlib.sch.web;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.security.core.Authentication;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
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.RequestParam;
|
||||||
|
|
||||||
|
import cmm.Constant;
|
||||||
|
import cmm.util.CmmUtil;
|
||||||
|
import cmm.util.DataMap;
|
||||||
|
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
||||||
|
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;
|
||||||
|
import nlib.cmm.service.NlibProperty;
|
||||||
|
import nlib.cmm.service.PagingVO;
|
||||||
|
import nlib.col.service.CartService;
|
||||||
|
import nlib.col.service.CollectionService;
|
||||||
|
import nlib.col.service.CollectionVO;
|
||||||
|
import nlib.col.service.DeptVO;
|
||||||
|
import nlib.col.service.InterestService;
|
||||||
|
import nlib.col.service.RisService;
|
||||||
|
import nlib.restful.service.DataApiReqVO;
|
||||||
|
import nlib.restful.service.DataApiResVO;
|
||||||
|
import nlib.user.service.NlibLoginVO;
|
||||||
|
import nlib.util.StringUtil;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class SearchController extends NlibCommonController {
|
||||||
|
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(SearchController.class);
|
||||||
|
static final String DEFUALT_PAGE_SIZE = NlibProperty.getProperty("list.paging.page.size");
|
||||||
|
|
||||||
|
@Resource(name = "cartService")
|
||||||
|
private CartService cartService;
|
||||||
|
|
||||||
|
@Resource(name = "codeService")
|
||||||
|
private CodeService codeService;
|
||||||
|
|
||||||
|
@Resource(name="risService")
|
||||||
|
private RisService risService;
|
||||||
|
|
||||||
|
@Resource(name = "interestService")
|
||||||
|
private InterestService interestService;
|
||||||
|
|
||||||
|
@Resource(name = "nlibProperty")
|
||||||
|
protected NlibProperty nlibProperty;
|
||||||
|
|
||||||
|
@Resource(name = "searchService")
|
||||||
|
private SearchService searchService;
|
||||||
|
|
||||||
|
@Resource(name = "collectionService")
|
||||||
|
private CollectionService collectionService;
|
||||||
|
|
||||||
|
/** resourcesService */
|
||||||
|
@Resource(name = "resourcesService")
|
||||||
|
private ResourcesService resourcesService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 소장자료 화면을 호출한다.
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/collection/listItems.do")
|
||||||
|
public String listItems(
|
||||||
|
HttpServletRequest req
|
||||||
|
, Authentication authentication
|
||||||
|
, @RequestParam Map<String, String> paramMap
|
||||||
|
, ModelMap model
|
||||||
|
, @ModelAttribute("searchVO") SearchVO 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> list = new ArrayList();
|
||||||
|
|
||||||
|
// 페이징 사이즈 코드 목록 조회 (DB방식으로 변경 2021.08.06 KNKIM)
|
||||||
|
List<HashMap<String,String>> pageSizeCodes = codeService.listCodes("PAGE_SIZE_OPTION");
|
||||||
|
|
||||||
|
// 자료유형 코드 목록 조회
|
||||||
|
List<HashMap<String,String>> masterType = codeService.listCodes("MASTER_TYPE_DIV_CD");
|
||||||
|
List<HashMap<String,String>> dtlsType = codeService.listCodes("DTLS_TYPE_DIV_CD");
|
||||||
|
|
||||||
|
//주제분야 목록 조회
|
||||||
|
List<HashMap<String,String>> clsf = codeService.listCtClsfs();
|
||||||
|
|
||||||
|
//문화원 목록 조회
|
||||||
|
/*vo = risService.selectOrgList();*/
|
||||||
|
|
||||||
|
// 반환 정보
|
||||||
|
model.addAttribute("pageIndex" , pageIndex);
|
||||||
|
model.addAttribute("pageSize" , pageSize);
|
||||||
|
model.addAttribute("searchKeyword", searchKeyword);
|
||||||
|
model.addAttribute("pageSizeCodes", pageSizeCodes);
|
||||||
|
model.addAttribute("masterType", masterType);
|
||||||
|
model.addAttribute("dtlsType", dtlsType);
|
||||||
|
model.addAttribute("masterClsf", clsf);
|
||||||
|
model.addAttribute("dtlsClsf", clsf);
|
||||||
|
/*model.addAttribute("orgList",vo);*/
|
||||||
|
|
||||||
|
|
||||||
|
//검색엔진
|
||||||
|
try{
|
||||||
|
searchVO.setRealQuery("한복");
|
||||||
|
searchVO.setQuery("한복");
|
||||||
|
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);
|
||||||
|
|
||||||
|
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();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(collEn.indexOf("culturePostHot") < 0 && collEn.indexOf("total") < 0 && collEn.indexOf("_cate") < 0){
|
||||||
|
totalCount = totalCount + coll.getTotalCount();
|
||||||
|
}
|
||||||
|
|
||||||
|
if( !searchVO.getCollection().equals("ALL") && searchVO.getCollection().indexOf("_Coll") >= 0){
|
||||||
|
if(searchVO.getCollection().replace("_Coll", "").equals(collEn)){
|
||||||
|
page_totalCount = coll.getTotalCount();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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-13EC7F809B9346FEB445CEF9961B7398");
|
||||||
|
list.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);
|
||||||
|
|
||||||
|
|
||||||
|
// 경로
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
String resultUrl ="";
|
||||||
|
|
||||||
|
//자료유형
|
||||||
|
model.addAttribute("firstClassList", codeService.listCodes(Constant.CODE_ID_MASTER_TYPE_DIV_CD));
|
||||||
|
model.addAttribute("secondClassList", codeService.listCodes(Constant.CODE_ID_DTLS_TYPE_DIV_CD));
|
||||||
|
|
||||||
|
List<DataMap> councilList = resourcesService.selectCouncilList();
|
||||||
|
model.addAttribute("councilList", councilList);
|
||||||
|
|
||||||
|
// ams 서버 패스 정보
|
||||||
|
CmmUtil.setAmsPathModelMap(request,model);
|
||||||
|
searchVO.setQuery(searchVO.getQuery().replaceAll("\\\"", """));
|
||||||
|
searchVO.setExactQuery(searchVO.getExactQuery().replaceAll("\\\"", """));
|
||||||
|
return "nlib/collection/listItems";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 소장자료를 조회한다.
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping(value="/collection/listItemsAjax.do")
|
||||||
|
public ResponseEntity<String> listItemsAjax(HttpServletRequest req,
|
||||||
|
Authentication authentication, @RequestBody CollectionVO searchCollectionVO) {
|
||||||
|
|
||||||
|
//String searchKeyword = paramMap.get("searchKeyword");
|
||||||
|
if(searchCollectionVO.getPageIndex() < 1) searchCollectionVO.setPageIndex(1);
|
||||||
|
if(searchCollectionVO.getPageSize() < 1) searchCollectionVO.setPageSize(DEFUALT_PAGE_SIZE);
|
||||||
|
|
||||||
|
|
||||||
|
int totalCount= 0;
|
||||||
|
//사용자 정보를 가져온다.
|
||||||
|
NlibLoginVO loginVO = getNlibLoginVO(authentication);
|
||||||
|
|
||||||
|
searchCollectionVO.setPageStart(searchCollectionVO.getPageIndex(), searchCollectionVO.getPageSize());
|
||||||
|
List<CollectionVO> List = new ArrayList();
|
||||||
|
|
||||||
|
// 요청
|
||||||
|
List = risService.listItems(searchCollectionVO);
|
||||||
|
totalCount = risService.countListItems(searchCollectionVO);
|
||||||
|
|
||||||
|
PagingVO pageVO = new PagingVO();
|
||||||
|
pageVO.setPagingVO(totalCount, searchCollectionVO.getPageIndex(), searchCollectionVO.getPageSize());
|
||||||
|
|
||||||
|
//-------------------------------
|
||||||
|
// REQ VO 구성
|
||||||
|
//-------------------------------
|
||||||
|
/*DataApiReqVO reqVO = new DataApiReqVO();
|
||||||
|
reqVO.setPageIndex(pageIndex);
|
||||||
|
reqVO.setPageSize(pageSize);
|
||||||
|
reqVO.putInfoItem("searchKeyword", searchKeyword);*/
|
||||||
|
|
||||||
|
// 요청
|
||||||
|
//DataApiResVO resVO = collectionService.listItems(reqVO);
|
||||||
|
|
||||||
|
//-------------------------------
|
||||||
|
// JSON변환 응답 처리
|
||||||
|
//-------------------------------
|
||||||
|
// JS-GRID 페이징 처리를 포함한 응답값 처리
|
||||||
|
// {data: [{...}],
|
||||||
|
// itemsCount: 255
|
||||||
|
// }
|
||||||
|
HashMap<String, Object> retMap = new HashMap<String, Object>();
|
||||||
|
/*retMap.put("data", resVO.getList(DataApiVO.XML_EL_NAME_RECORD));
|
||||||
|
retMap.put("itemsCount", resVO.getRecordTotCount());*/
|
||||||
|
retMap.put("data", List);
|
||||||
|
retMap.put("pageVO", pageVO);
|
||||||
|
|
||||||
|
return makeResponseEntityJson(retMap);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 소장자료 상세 내용 조회한다.
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*//*
|
||||||
|
@RequestMapping("/collection/selectItemInfo.do")
|
||||||
|
public String selectItemInfo(HttpServletRequest req, Authentication authentication, @RequestParam Map<String, String> paramMap, ModelMap model) {
|
||||||
|
// 목록 이동시 전달할 매개변수
|
||||||
|
String searchKeyword = paramMap.get("searchKeyword");
|
||||||
|
String pageIndex = paramMap.get("pageIndex");
|
||||||
|
String pageSize = paramMap.get("pageSize");
|
||||||
|
String message = paramMap.get("message");
|
||||||
|
|
||||||
|
// 게시물 번호
|
||||||
|
String articleNo = paramMap.get("articleNo");
|
||||||
|
|
||||||
|
log.debug("selectQnA > pageIndex = " + pageIndex);
|
||||||
|
log.debug("selectQnA > pageSize = " + pageSize);
|
||||||
|
log.debug("selectQnA > searchKeyword = " + searchKeyword);
|
||||||
|
log.debug("selectQnA > articleNo = " + articleNo);
|
||||||
|
log.debug("selectQnA > message = " + message);
|
||||||
|
|
||||||
|
//-------------------------------
|
||||||
|
// REQ VO 구성
|
||||||
|
//-------------------------------
|
||||||
|
DataApiReqVO reqVO = new DataApiReqVO();
|
||||||
|
reqVO.setPageIndex(pageIndex);
|
||||||
|
reqVO.setPageSize(pageSize);
|
||||||
|
reqVO.addInfoItem("boardNo", "QNA"); // 게시판ID
|
||||||
|
reqVO.addInfoItem("articleNo", articleNo); // 게시물번호
|
||||||
|
|
||||||
|
// 요청
|
||||||
|
DataApiResVO resVO = collectionService.selectItemInfo(reqVO);
|
||||||
|
|
||||||
|
// 반환 정보
|
||||||
|
model.addAttribute("articleNo" , articleNo);
|
||||||
|
model.addAttribute("article" , resVO.getInfo()); // 게시물 상세
|
||||||
|
model.addAttribute("message" , message);
|
||||||
|
model.addAttribute("pageIndex" , pageIndex);
|
||||||
|
model.addAttribute("pageSize" , pageSize);
|
||||||
|
model.addAttribute("searchKeyword", searchKeyword);
|
||||||
|
|
||||||
|
return "nlib/collection/selectItemInfo";
|
||||||
|
}*/
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?><!--Converted at: Wed May 11 15:49:38 KST 2016-->
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="CollectionDAO">
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,85 @@
|
|||||||
|
<%@ page contentType="text/html; charset=utf-8"%>
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
|
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
|
||||||
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||||
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||||
|
<%-- <%@ taglib prefix="cfn" uri="/WEB-INF/tlds/function.tld" %> --%>
|
||||||
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||||
|
<%@ page import="cmm.util.CmmUtil" %>
|
||||||
|
<%@ page import="cmm.Constant" %>
|
||||||
|
<%
|
||||||
|
String pdfPath = CmmUtil.getPropertyStr(Constant.PDF_VIEW_KEY);
|
||||||
|
%>
|
||||||
|
<ul class="list res-card" id="sch_ref_list">
|
||||||
|
<c:forEach var="result" items="${reference.searchResultList}">
|
||||||
|
<li>
|
||||||
|
<c:if test="${!empty result.MAIN_IMG}"><!-- 썸네일이 있는 경우 -->
|
||||||
|
<div class="thumb">
|
||||||
|
<%-- <img src="${cfn:assetImgUrl(result.MAIN_IMG)}" alt="${result.TITLE}" /> --%>
|
||||||
|
<img src="${result.MAIN_IMG}" alt="${result.TITLE}" />
|
||||||
|
<c:if test="${!empty result.COPYRIGHT and result.COPYRIGHT ne ''}"><p class="source-origin">출처:${result.COPYRIGHT}</p></c:if>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
|
||||||
|
<div class="data-wrap">
|
||||||
|
<div class="data-tit">
|
||||||
|
<span class="tit-txt"><c:out value="${result.TITLE}"/></span>
|
||||||
|
</div>
|
||||||
|
<ul class="list-info other">
|
||||||
|
<c:if test="${!empty result.FIRST_CATEGORY_NM}"><li><em><%--주제분야 : --%></em>${result.FIRST_CATEGORY_NM} <c:if test="${!empty result.SECOND_CATEGORY_NM}">> ${result.SECOND_CATEGORY_NM}</c:if></li></c:if>
|
||||||
|
<c:if test="${!empty result.FIRST_CLASS_NM}"><li><em><%--자료유형 : --%></em>${result.FIRST_CLASS_NM} <c:if test="${!empty result.SECOND_CLASS_NM}">> ${result.SECOND_CLASS_NM}</c:if></li></c:if>
|
||||||
|
<c:if test="${!empty result.PUBLISHER}"><li>${result.PUBLISHER}</li></c:if>
|
||||||
|
<c:if test="${(!empty result.GENYEAR) && (result.GENYEAR ne '0')}"><li>${result.GENYEAR}년도</li></c:if>
|
||||||
|
</ul>
|
||||||
|
<ul class="list-info other">
|
||||||
|
<c:if test="${!empty result.COUNCIL_NM_TOT}"><li><em>소장처 : </em>${result.COUNCIL_NM_TOT}</li></c:if>
|
||||||
|
</ul>
|
||||||
|
<p class="list-desc"><c:if test="${!empty result.SUMMARY}">${result.SUMMARY}</c:if></p>
|
||||||
|
<div class="button-area left-align next-items">
|
||||||
|
<c:if test="${result.ORG_OPEN_AT eq 'Y'}">
|
||||||
|
<c:set var="docPath" value="${nfsNasPath}${nfsDocPath}"/>
|
||||||
|
<c:if test="${fn:contains(result.STRE_FILE_NAME, '/' )}">
|
||||||
|
<c:set var="docPath" value="${nfsNasPath}"/>
|
||||||
|
</c:if>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${result.ASSET_TYPE eq '이미지'}"><a href="#" class="see-img original-viewer" data-aId="${result.ASSETS_ID}" data-mId="${result.MEDIA_ID}" data-mType="I">사진보기</a></c:when>
|
||||||
|
<c:when test="${result.ASSET_TYPE eq '동영상'}"><a href="#" class="see-video original-viewer" data-aId="${result.ASSETS_ID}" data-mId="${result.MEDIA_ID}" data-mType="V">영상보기</a></c:when>
|
||||||
|
<c:when test="${result.ASSET_TYPE eq '오디오'}"><a href="#" class="see-audio original-viewer" data-aId="${result.ASSETS_ID}" data-mId="${result.MEDIA_ID}" data-mType="A">음향듣기</a></c:when>
|
||||||
|
<c:when test="${result.ASSET_TYPE eq '문서'}">
|
||||||
|
<%-- 원본 연결
|
||||||
|
<a href="#" class="see-doc btn-view-original" data-mId="${result.MEDIA_ID}" onclick="util.docView( '${result.MEDIA_ID}'); return false;" >원문보기</a>
|
||||||
|
--%>
|
||||||
|
<%-- 분할파일 연결 (테스트query:임진란 임원선출) --%>
|
||||||
|
<a href="#none" onclick="reference_viewOcr('${result.MEDIA_ID }', '${searchVO.query}', <%-- '${cfn:unidocsViewer(docPath ,result.STRE_FILE_NAME)}' --%>'czsczsc'); return false;" class="original-viewer" target="_blank">원문보기</a>
|
||||||
|
</c:when>
|
||||||
|
<%-- <c:when test="${result.ASSET_TYPE eq '링크'}"><a href="${result.linkData}" target="_blank">원문보기</a></c:when> --%>
|
||||||
|
<c:when test="${result.ASSET_TYPE eq '링크'}"><a href="${result.LINK_DATA}" class="see-link original-viewer" data-mId="${result.MEDIA_ID}" target="_blank">원문보기</a></c:when>
|
||||||
|
</c:choose>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${result.ORG_OPEN_AT eq 'Y' and result.ASSET_TYPE eq '문서'}">
|
||||||
|
<c:if test="${!empty result.TABLE_OF_CONTENTS and result.TABLE_OF_CONTENTS ne ''}">
|
||||||
|
<button type="button" class="only-icon table-of-contents" data-mId="${result.MEDIA_ID}">목차</button>
|
||||||
|
</c:if>
|
||||||
|
</c:if>
|
||||||
|
<a href="#none" class="only-icon ris-viewer" onclick="util.risDownloadFile('${result.ASSETS_ID}','${result.MEDIA_ID}'); return false;">RIS</a>
|
||||||
|
<c:if test="${result.ORG_OPEN_AT eq 'Y'}">
|
||||||
|
<button type="button" class="btn-share only-icon sharing" data-cUrl="${result.LINK_URL}">공유하기</button>
|
||||||
|
</c:if>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</c:forEach>
|
||||||
|
</ul>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
//구글 analytics event
|
||||||
|
$('.ris-viewer').on('click', function(e) {
|
||||||
|
var name = $(this).parents('.list-select-wrap').parents('.data-wrap').find('.tit-txt').text();
|
||||||
|
name = "지방문화원자료 RIS | " + name;
|
||||||
|
gtag('event', 'ris click', {
|
||||||
|
'event_category': '지방문화원자료',
|
||||||
|
'event_label': name,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
442
src/main/webapp/WEB-INF/jsp/nlib/collection/searchList.jsp
Normal file
442
src/main/webapp/WEB-INF/jsp/nlib/collection/searchList.jsp
Normal file
@ -0,0 +1,442 @@
|
|||||||
|
|
||||||
|
<%
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* @Class Name : searchList.jsp
|
||||||
|
*
|
||||||
|
* @Description : 소장 자료를 조회한다.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @ ------------ -------- ---------------------------
|
||||||
|
* @ 수정일 수정자 수정내용
|
||||||
|
* @ ------------ -------- ---------------------------
|
||||||
|
* @ 2021. 10. 13. JSYOO 최초 생성
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author 이씨플라자 * DIGITALSHIP JSYOO
|
||||||
|
* @since 2021. 10. 13.
|
||||||
|
* @version 1.0
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
%>
|
||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||||
|
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
|
||||||
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||||
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||||
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||||
|
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
|
||||||
|
<%@ taglib prefix="validator"
|
||||||
|
uri="http://www.springmodules.org/tags/commons-validator"%>
|
||||||
|
|
||||||
|
<c:set var="pageTitle">소장 자료</c:set>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<title>${pageTitle}</title>
|
||||||
|
<!-- GRID -->
|
||||||
|
<link type="text/css" rel="stylesheet"
|
||||||
|
href="${pageContext.request.contextPath}/js/jsgrid/nlib-jsgrid.css" />
|
||||||
|
<link type="text/css" rel="stylesheet"
|
||||||
|
href="${pageContext.request.contextPath}/js/jsgrid/nlib-jsgrid-theme.css" />
|
||||||
|
<script
|
||||||
|
src="${pageContext.request.contextPath}/js/jquery-ui/jquery-ui.js"></script>
|
||||||
|
<script
|
||||||
|
src="${pageContext.request.contextPath}/js/jsgrid/nlib-jsgrid.js"></script>
|
||||||
|
<script type="text/javaScript" language="javascript">
|
||||||
|
|
||||||
|
|
||||||
|
window.onload = function() {
|
||||||
|
|
||||||
|
// 페이지 크기 변경시 재조회
|
||||||
|
$("#pageSize").on("change", function(e) {
|
||||||
|
$("#pageIndex").val(1);
|
||||||
|
fn_search_article($("#pageIndex").val());
|
||||||
|
});
|
||||||
|
|
||||||
|
// 검색 버튼 클릭
|
||||||
|
$("#btnSearch").on("click", function(e) {
|
||||||
|
fn_search_article($("#pageSize").val(), 1);
|
||||||
|
});
|
||||||
|
|
||||||
|
//초기 자료 조회
|
||||||
|
fn_search_article($("#pageIndex").val());
|
||||||
|
|
||||||
|
$("input:checkbox").on('change', function() {
|
||||||
|
if ( $(this).prop('checked') )
|
||||||
|
{
|
||||||
|
$(this).parent().parent(".depth-1").parent().children(".depth-2").css("display","block");
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$(this).parent().parent(".depth-1").parent().children(".depth-2").css("display","none");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}; // 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_show_more(showMoreId){
|
||||||
|
if($("#" + showMoreId).html() == "더 보기")
|
||||||
|
{
|
||||||
|
$("."+showMoreId).css("display","block");
|
||||||
|
$("#" + showMoreId).html("접기");
|
||||||
|
}
|
||||||
|
else if($("#" + showMoreId).html() == "접기")
|
||||||
|
{
|
||||||
|
$("."+showMoreId).css("display","none");
|
||||||
|
$("#" + showMoreId).html("더 보기");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//탭 이동
|
||||||
|
function fn_tabMove_sch(itemType){
|
||||||
|
$("#itemType").val(itemType);
|
||||||
|
fn_search_article($("#pageIndex").val());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function docView(){
|
||||||
|
alert("원문보기");
|
||||||
|
}
|
||||||
|
|
||||||
|
function risDownloadFile(){
|
||||||
|
alert("RIS");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 선택한 게시글 상세 보기로 이동
|
||||||
|
function fn_view_detail(articleNo) {
|
||||||
|
$("#articleNo").val(articleNo);
|
||||||
|
$("#referencelistForm").attr("action", "${pageContext.request.contextPath}/collection/selectItemInfo.do");
|
||||||
|
$("#referencelistForm").submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 그리드 데이터 조회 호출
|
||||||
|
function fn_search_article(pageIndex) {
|
||||||
|
var reqUrl = "${pageContext.request.contextPath}/collection/listItemsAjax.do";
|
||||||
|
|
||||||
|
$("#pageIndex").val(pageIndex);
|
||||||
|
|
||||||
|
var inputData = {
|
||||||
|
"pageIndex" : pageIndex
|
||||||
|
, "pageSize": $("#pageSize").val()
|
||||||
|
, "searchKeyWord" : $("#searchKeyWord").val()
|
||||||
|
, "typeCodeNm" : $("#itemType").val()
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</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">
|
||||||
|
|
||||||
|
<!-- 검색조건 -->
|
||||||
|
<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="hidden" name="itemType" id="itemType" title=""
|
||||||
|
value="${itemType }" /> <input type="text" name="searchKeyword"
|
||||||
|
id="searchKeyword" title="검색어" value="${searchKeyword }" size="35"
|
||||||
|
maxlength="50" /> <input type="button" name="btnSearch"
|
||||||
|
id="btnSearch" value="검색" />
|
||||||
|
<div>
|
||||||
|
<dl>
|
||||||
|
<dt class="blind">검색결과 안내</dt>
|
||||||
|
<dd>
|
||||||
|
<em>'${searchVO.realQuery}'</em>에 대한 검색결과는 총 <strong><fmt:formatNumber
|
||||||
|
value="${reference.totalCount}" pattern="#,###" /></strong>건 입니다.
|
||||||
|
</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="기타()" />
|
||||||
|
</div>
|
||||||
|
<div style="text-align: left;">
|
||||||
|
<div id="searchMenu"
|
||||||
|
style="display: inline-block; width: 200px; margin-top: 5px; vertical-align: top;">
|
||||||
|
<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>
|
||||||
|
</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="masterClsf" items="${masterClsf}"
|
||||||
|
varStatus="status">
|
||||||
|
<c:if test="${masterClsf.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"
|
||||||
|
style="display: none;">
|
||||||
|
<c:forEach var="dtlsClsf" items="${dtlsClsf}"
|
||||||
|
varStatus="status">
|
||||||
|
<c:if test="${masterClsf.clsfId eq dtlsClsf.upClsfId }">
|
||||||
|
<li>${dtlsClsf.clsfNm}</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>
|
||||||
|
</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>
|
||||||
|
<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}">> ${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}">> ${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>ttttt</td>
|
||||||
|
<tr>
|
||||||
|
</c:forEach>
|
||||||
|
</table>
|
||||||
|
<div id="paging" name="paging"
|
||||||
|
style="display: block; text-align: center;"></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>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -0,0 +1,426 @@
|
|||||||
|
<%@ page contentType="text/html; charset=utf-8"%>
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
|
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
|
||||||
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||||
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||||
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||||
|
<%@ page import="cmm.util.CmmUtil" %>
|
||||||
|
<style>
|
||||||
|
|
||||||
|
@CHARSET "UTF-8";
|
||||||
|
/*info 지역*/
|
||||||
|
.depth-2-info{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.depth-2-info > li{
|
||||||
|
display: none;
|
||||||
|
}filter-category
|
||||||
|
|
||||||
|
|
||||||
|
/*좌측*/
|
||||||
|
#picklistForm .filter .check input[type="checkbox"]:checked + label{
|
||||||
|
color:#333;
|
||||||
|
}
|
||||||
|
#numberlistForm .filter .check input[type="checkbox"]:checked + label{
|
||||||
|
color:#333;
|
||||||
|
}
|
||||||
|
#storylistForm .filter .check input[type="checkbox"]:checked + label{
|
||||||
|
color:#333;
|
||||||
|
}
|
||||||
|
#referencelistForm .filter .check input[type="checkbox"]:checked + label{
|
||||||
|
color:#333;
|
||||||
|
}
|
||||||
|
#infolistForm .filter .check input[type="checkbox"]:checked + label{
|
||||||
|
color:#333;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 링크 밑줄 없애기 */
|
||||||
|
#infolistForm .filter .check input[type="checkbox"] + label:focus, .filter .check input[type="checkbox"] + label:hover{
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#referencelistForm .filter .check input[type="checkbox"] + label:focus, .filter .check input[type="checkbox"] + label:hover{
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#storylistForm .filter .check input[type="checkbox"] + label:focus, .filter .check input[type="checkbox"] + label:hover{
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#numberlistForm .filter .check input[type="checkbox"] + label:focus, .filter .check input[type="checkbox"] + label:hover{
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#picklistForm .filter .check input[type="checkbox"] + label:focus, .filter .check input[type="checkbox"] + label:hover{
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*최근검색어*/
|
||||||
|
.mykeyword_width{
|
||||||
|
/* width: auto !important; /*calc(100% - 60px)*/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<form name="listForm" id="referencelistForm" action="/sch/totalSearchList.do" 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"/>
|
||||||
|
|
||||||
|
<section id="contents" class="result-search">
|
||||||
|
<div class="contents-frame inner-center">
|
||||||
|
<div class="article-main">
|
||||||
|
<div class="result-top">
|
||||||
|
<dl>
|
||||||
|
<dt class="blind">검색결과 안내</dt>
|
||||||
|
<dd><em>'${searchVO.realQuery}'</em>에 대한 검색결과는 총 <strong><fmt:formatNumber value="${all_totalCount}" pattern="#,###" /></strong>건 입니다.</dd>
|
||||||
|
</dl>
|
||||||
|
<!-- <form> -->
|
||||||
|
<fieldset>
|
||||||
|
<legend>결과내 재검색</legend>
|
||||||
|
<div class="rescan-input ">
|
||||||
|
<input type="text" placeholder="결과내재검색" title="검색어 입력" value="${searchVO.reQuery}" name="reQuery" onkeypress="util.setEnterkeyEnabled(event, fnRe_sch);">
|
||||||
|
<button type="button" onclick="fnRe_sch();">검색</button>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
<!-- </form> -->
|
||||||
|
</div>
|
||||||
|
<nav class="search-tab-wrap">
|
||||||
|
<h2 class="blind">검색결과 카테고리</h2>
|
||||||
|
<div class="tab-box">
|
||||||
|
<ul class="tab-result">
|
||||||
|
<li <c:if test="${empty searchVO.collection or searchVO.collection eq 'ALL'}">class="on"</c:if>><a href="#" onclick="fnTabMove_sch('ALL');">통합검색 <span class="counts">(<fmt:formatNumber value="${totalCount}" pattern="#,###" />)</span> </a></li><!-- 활성화 class on 적용 -->
|
||||||
|
<li <c:if test="${searchVO.collection eq 'pick_Coll'}">class="on"</c:if>><a href="#" onclick="fnTabMove_sch('pick_Coll'); ">지역문화Pick <span class="counts">(<fmt:formatNumber value="${pick.totalCount}" pattern="#,###" />)</span></a></li>
|
||||||
|
<li <c:if test="${searchVO.collection eq 'culturePost_Coll'}">class="on"</c:if>><a href="#LINK" onclick="fnTabMove_sch('culturePost_Coll'); return false;">지역문화포스트 <span class="counts">(${culturePost.totalCount})</span></a></li>
|
||||||
|
<li <c:if test="${searchVO.collection eq 'story_Coll'}">class="on"</c:if>><a href="#LINK" onclick="fnTabMove_sch('story_Coll'); return false;">지역문화이야기 <span class="counts">(<fmt:formatNumber value="${story.totalCount}" pattern="#,###" />)</span></a></li>
|
||||||
|
<li <c:if test="${searchVO.collection eq 'reference_Coll'}">class="on"</c:if>><a href="#LINK" onclick="fnTabMove_sch('reference_Coll'); return false;">지방문화원자료 <span class="counts">(<fmt:formatNumber value="${reference.totalCount}" pattern="#,###" />)</span></a></li>
|
||||||
|
<li <c:if test="${searchVO.collection eq 'info_Coll'}">class="on"</c:if>><a href="#LINK" onclick="fnTabMove_sch('info_Coll'); return false;">지역문화정보 <span class="counts">(<fmt:formatNumber value="${info.totalCount}" pattern="#,###" />)</span> </a></li>
|
||||||
|
<li <c:if test="${searchVO.collection eq 'toon_Coll'}">class="on"</c:if>><a href="#LINK" onclick="fnTabMove_sch('toon_Coll'); return false;">지역문화툰 <span class="counts">(<fmt:formatNumber value="${toon.totalCount}" pattern="#,###" />)</span> </a></li>
|
||||||
|
<li <c:if test="${searchVO.collection eq 'number_Coll'}">class="on"</c:if>><a href="#LINK" onclick="fnTabMove_sch('number_Coll'); return false;">지역문화# <span class="counts">(<fmt:formatNumber value="${number.totalCount}" pattern="#,###" />)</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<section class="list-box resources-box">
|
||||||
|
<div class="title">
|
||||||
|
<h2>지방문화원자료</h2>
|
||||||
|
<span class="count">총 <em><fmt:formatNumber value="${reference.totalCount}" pattern="#,###" /></em>건</span>
|
||||||
|
<c:if test="${reference.totalCount > 0}">
|
||||||
|
<div class="list-search-wrap">
|
||||||
|
<ul class="tab-btn">
|
||||||
|
<li <c:if test="${empty searchVO.sortField or searchVO.sortField eq 'RANK/DESC'}">class="on"</c:if>><button onclick="doSorting('RANK/DESC','#referencelistForm'); return false;">정확도순</button></li>
|
||||||
|
<li <c:if test="${searchVO.sortField eq 'DATE/DESC'}">class="on"</c:if>><button onclick="doSorting('DATE/DESC','#referencelistForm'); return false;">최신순</button></li>
|
||||||
|
<li <c:if test="${searchVO.sortField eq 'DATE/ASC'}">class="on"</c:if>><button onclick="doSorting('DATE/ASC','#referencelistForm'); return false;">과거순</button></li>
|
||||||
|
<li <c:if test="${searchVO.sortField eq 'READ_CNT/DESC'}">class="on"</c:if>><button onclick="doSorting('READ_CNT/DESC','#referencelistForm'); return false;">인기순</button></li>
|
||||||
|
</ul>
|
||||||
|
<div class="list-select page-size">
|
||||||
|
<select name="orderCondition" id="orderCondition" title="리스트 개수 선택">
|
||||||
|
<option value="10" <c:if test="${searchVO.viewCount eq 10}">selected</c:if>>10개씩보기</option>
|
||||||
|
<option value="20" <c:if test="${searchVO.viewCount eq 20}">selected</c:if>>20개씩보기</option>
|
||||||
|
<option value="30" <c:if test="${searchVO.viewCount eq 30}">selected</c:if>>30개씩보기</option>
|
||||||
|
<option value="40" <c:if test="${searchVO.viewCount eq 40}">selected</c:if>>40개씩보기</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<c:if test="${searchVO.collection eq 'reference_Coll'}">
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${reference.totalCount == 0}">
|
||||||
|
<div class="empty-result">검색 결과가 없습니다.</div>
|
||||||
|
</c:when>
|
||||||
|
<c:when test="${reference.totalCount > 0}">
|
||||||
|
<jsp:include page="/WEB-INF/jsp/nlib/collection/schResultReferenceList.jsp" flush="false" />
|
||||||
|
|
||||||
|
<%-- <ul class="paging">
|
||||||
|
<ui:pagination paginationInfo="${paginationInfo}" type="image" jsFunction="linkPage_sch" />
|
||||||
|
</ul> --%>
|
||||||
|
</c:when>
|
||||||
|
</c:choose>
|
||||||
|
</c:if>
|
||||||
|
</div>
|
||||||
|
</section><!-- //지방문화원자료 -->
|
||||||
|
|
||||||
|
</div><!-- //article-main -->
|
||||||
|
<div class="article-side">
|
||||||
|
<section class="filter-wrap">
|
||||||
|
<div class="filter-head">
|
||||||
|
<h2>검색결과 필터</h2>
|
||||||
|
<button type="button" class="btn-filter-reset" id="reference_filter_reset">초기화</button>
|
||||||
|
</div>
|
||||||
|
<div class="choice-condition">
|
||||||
|
<ul id="reference_fillter_append">
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="filter-condition">
|
||||||
|
<div class="filter pop-culture-center">
|
||||||
|
<div class="filter-tit">
|
||||||
|
<h3>지역 / 문화원</h3>
|
||||||
|
<button type="button" class="btn-toggle">닫기</button>
|
||||||
|
</div>
|
||||||
|
<div class="pop-choice-condition">
|
||||||
|
<p>선택조건 <button type="button" class="reference_popup_reset">초기화</button></p>
|
||||||
|
<ul id="reference_council_append">
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="filter-list">
|
||||||
|
<ul>
|
||||||
|
<c:forEach items="${couSidoList}" var="couSidoInfo" varStatus="sidoStatus" begin="0" end="5">
|
||||||
|
<li class="line-1">
|
||||||
|
<div class="depth-1 <c:if test="${fn:contains(searchVO.filter_sido, couSidoInfo.code) }"> on</c:if>">
|
||||||
|
<div class="check"><input type="checkbox" id="local-chk${sidoStatus.index+1}" value="${couSidoInfo.code}" name="sido_name" <c:if test="${fn:contains(searchVO.sido_name, couSidoInfo.code) }">checked= "checked" class="cmm-list-chk" </c:if>/><label for="local-chk${sidoStatus.index+1}">${couSidoInfo.codeNm}(<span>0</span>)</label></div>
|
||||||
|
<button type="button" class="btn-toggle">닫기</button>
|
||||||
|
</div>
|
||||||
|
<ul class="depth-2">
|
||||||
|
<c:forEach items="${councilList}" var="council" varStatus="couStatus">
|
||||||
|
<c:if test="${couSidoInfo.code eq council.subCouncilCd}" >
|
||||||
|
<li><div class="check"><input type="checkbox" value="${council.councilCd}" id="local-chk${sidoStatus.index+1}-${couStatus.index+1}" name="sojang_council" <c:if test="${fn:contains(searchVO.sojang_council, council.councilCd) }">checked= "checked" class="cmm-list-chk" </c:if>/><label for="local-chk${sidoStatus.index+1}-${couStatus.index+1}">${council.councilNm}(<span>0</span>)</label></div></li>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</c:forEach>
|
||||||
|
<c:forEach items="${couSidoList}" var="couSidoInfo" varStatus="sidoStatus" begin="6" end="11">
|
||||||
|
<li class="line-2">
|
||||||
|
<div class="depth-1 <c:if test="${fn:contains(searchVO.filter_sido, couSidoInfo.code) }"> on</c:if>">
|
||||||
|
<div class="check"><input type="checkbox" id="local-chk${sidoStatus.index+1}" value="${couSidoInfo.code}" name="sido_name" <c:if test="${fn:contains(searchVO.sido_name, couSidoInfo.code) }">checked= "checked" class="cmm-list-chk" </c:if>/><label for="local-chk${sidoStatus.index+1}">${couSidoInfo.codeNm}(<span>0</span>)</label></div>
|
||||||
|
<button type="button" class="btn-toggle">닫기</button>
|
||||||
|
</div>
|
||||||
|
<ul class="depth-2">
|
||||||
|
<c:forEach items="${councilList}" var="council" varStatus="couStatus">
|
||||||
|
<c:if test="${couSidoInfo.code eq council.subCouncilCd}" >
|
||||||
|
<li><div class="check"><input type="checkbox" value="${council.councilCd}" id="local-chk${sidoStatus.index+1}-${couStatus.index+1}" name="sojang_council" <c:if test="${fn:contains(searchVO.sojang_council, council.councilCd) }">checked= "checked" class="cmm-list-chk" </c:if>/><label for="local-chk${sidoStatus.index+1}-${couStatus.index+1}">${council.councilNm}(<span>0</span>)</label></div></li>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</c:forEach>
|
||||||
|
<c:forEach items="${couSidoList}" var="couSidoInfo" varStatus="sidoStatus" begin="12" end="${fn:length(couSidoList)}">
|
||||||
|
<li class="line-3">
|
||||||
|
<div class="depth-1 <c:if test="${fn:contains(searchVO.filter_sido, couSidoInfo.code) }"> on</c:if>">
|
||||||
|
<div class="check"><input type="checkbox" id="local-chk${sidoStatus.index+1}" value="${couSidoInfo.code}" name="sido_name" <c:if test="${fn:contains(searchVO.sido_name, couSidoInfo.code) }">checked= "checked" class="cmm-list-chk" </c:if>/><label for="local-chk${sidoStatus.index+1}">${couSidoInfo.codeNm}(<span>0</span>)</label></div>
|
||||||
|
<button type="button" class="btn-toggle">닫기</button>
|
||||||
|
</div>
|
||||||
|
<ul class="depth-2">
|
||||||
|
<c:forEach items="${councilList}" var="council" varStatus="couStatus">
|
||||||
|
<c:if test="${couSidoInfo.code eq council.subCouncilCd}" >
|
||||||
|
<li><div class="check"><input type="checkbox" value="${council.councilCd}" id="local-chk${sidoStatus.index+1}-${couStatus.index+1}" name="sojang_council" <c:if test="${fn:contains(searchVO.sojang_council, council.councilCd) }">checked= "checked" class="cmm-list-chk" </c:if>/><label for="local-chk${sidoStatus.index+1}-${couStatus.index+1}">${council.councilNm}(<span>0</span>)</label></div></li>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</c:forEach>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<button type="button" class="btn-all-view" id="btn-search-detail-reference">문화원 전체보기</button>
|
||||||
|
<div class="pop-btn-wrap">
|
||||||
|
<button type="button" class="btn btn-color reference_popup_reset_2" >초기화</button>
|
||||||
|
<!-- <button type="button" class="btn btn-color" onclick="fnFilterSch();">검색</button> -->
|
||||||
|
<button type="button" class="btn btn-gray">닫기</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="filter">
|
||||||
|
<div class="filter-tit">
|
||||||
|
<h3>주제분야</h3>
|
||||||
|
<button type="button" class="btn-toggle">닫기</button>
|
||||||
|
</div>
|
||||||
|
<div class="filter-list">
|
||||||
|
<ul>
|
||||||
|
<c:forEach items="${firstCategoryList}" var="firstCategoryInfo" varStatus="fiStatus">
|
||||||
|
<li>
|
||||||
|
<div class="depth-1" <c:if test="${fn:contains(searchVO.filter_category, firstCategoryInfo.sCodeId) }"> on</c:if>>
|
||||||
|
<div class="check"><input type="checkbox" value="${firstCategoryInfo.sCodeId}" id="theme-chk${fiStatus.index+1}" name="first_category" <c:if test="${fn:contains(searchVO.first_category, firstCategoryInfo.sCodeId) }">checked="checked"</c:if>/><label for="theme-chk${fiStatus.index+1}">${firstCategoryInfo.sCodeNm}(<span>0</span>)</label></div>
|
||||||
|
<button type="button" class="btn-toggle">닫기</button>
|
||||||
|
</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:forEach>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</c:forEach>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<button type="button" class="btn-toggle-more filter-category">더보기</button>
|
||||||
|
</div>
|
||||||
|
<div class="filter">
|
||||||
|
<div class="filter-tit">
|
||||||
|
<h3>자료유형</h3>
|
||||||
|
<button type="button" class="btn-toggle">닫기</button>
|
||||||
|
</div>
|
||||||
|
<div class="filter-list">
|
||||||
|
<ul>
|
||||||
|
<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></div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<c:forEach items="${firstClassList}" var="firstClassInfo" varStatus="fcStatus">
|
||||||
|
<li>
|
||||||
|
<div class="depth-1 <c:if test="${fn:contains(searchVO.filter_class, firstClassInfo.column1) }"> on</c:if>" >
|
||||||
|
<div class="check"><input type="checkbox" value="${firstClassInfo.column1}" name="first_class" id="data-type-chk${fcStatus.index+1}" <c:if test="${fn:contains(searchVO.first_class, firstClassInfo.column1) }">checked="checked"</c:if>/><label for="data-type-chk${fcStatus.index+1}">${firstClassInfo.sCodeNm}(<span>0</span>)</label></div>
|
||||||
|
<button type="button" class="btn-toggle">닫기</button>
|
||||||
|
</div>
|
||||||
|
<ul class="depth-2">
|
||||||
|
<c:forEach items="${secondClassList}" var="secondClassInfo" varStatus="seStatus">
|
||||||
|
<c:if test="${firstClassInfo.column1 eq secondClassInfo.column2}" >
|
||||||
|
<li><div class="check"><input type="checkbox" value="${secondClassInfo.sCodeId}" name="second_class" id="data-type-chk${fcStatus.index+1}-${seStatus.index+1}" <c:if test="${fn:contains(searchVO.second_class, secondClassInfo.sCodeId) }">checked="checked"</c:if>/><label for="data-type-chk${fcStatus.index+1}-${seStatus.index+1}">${secondClassInfo.sCodeNm}(<span>0</span>)</label></div></li>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</c:forEach>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<button type="button" class="btn-toggle-more filter-class" >더보기</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div><!-- //article-side -->
|
||||||
|
</div><!-- //contents-frame -->
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
<form name="detailForm" method="post">
|
||||||
|
<input type="hidden" name="contentId"/>
|
||||||
|
</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>
|
||||||
Loading…
Reference in New Issue
Block a user