diff --git a/src/main/java/nlib/sch/Constant.java b/src/main/java/nlib/sch/Constant.java new file mode 100644 index 00000000..f133138d --- /dev/null +++ b/src/main/java/nlib/sch/Constant.java @@ -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"}; +} diff --git a/src/main/java/nlib/sch/util/DataMap.java b/src/main/java/nlib/sch/util/DataMap.java new file mode 100644 index 00000000..b9e8179d --- /dev/null +++ b/src/main/java/nlib/sch/util/DataMap.java @@ -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 implements Map{ + 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 maps = request.getParameterMap(); + Set keySet = maps.keySet(); + Iterator 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); + } +} diff --git a/src/main/java/nlib/sch/util/NlibCmmUtil.java b/src/main/java/nlib/sch/util/NlibCmmUtil.java new file mode 100644 index 00000000..1fa7e7af --- /dev/null +++ b/src/main/java/nlib/sch/util/NlibCmmUtil.java @@ -0,0 +1,1068 @@ +package nlib.sch.util; + +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.lang.reflect.InvocationTargetException; +import java.math.BigDecimal; +import java.net.URLEncoder; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Random; +import java.util.StringTokenizer; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.annotation.PostConstruct; +import javax.annotation.Resource; +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.codec.binary.Base64; +import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.math.NumberUtils; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.json.JSONArray; +import org.json.JSONObject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; +import org.springframework.ui.ModelMap; + +import cmm.Constant; +import cmm.service.CmmAmsDocTableOfContentsVO; +import cmm.service.CmmService; + +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; + +import egovframework.rte.fdl.cmmn.exception.EgovBizException; +import egovframework.rte.fdl.property.EgovPropertyService; +import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper; +import egovframework.rte.psl.dataaccess.util.EgovMap; + + +/** + * + * Util 클래스 + * + */ +@Component +public class NlibCmmUtil { + + private static final Logger LOGGER = LoggerFactory.getLogger(NlibCmmUtil.class); + public static String DEFAULT_DELIMITER = "-"; + protected static EgovPropertyService propertyService; + protected static CmmService cmmService; + + @Resource(name = "propertiesService") + private EgovPropertyService propertyServiceInstance; + + @Resource(name = "cmmService") + private CmmService cmmServiceInstance; + + @PostConstruct + private void init() { + propertyService = propertyServiceInstance; + cmmService = cmmServiceInstance; + } + public static String reflectionToString(Object obj) { + return ToStringBuilder.reflectionToString(obj); + } + public static boolean isRoleKdm() { + List listRole = (List) EgovUserDetailsHelper.getAuthorities(); + for (String role : listRole) { + if (Constant.AUTH_ROLE_KDM.equals(role)) { + return true; + } + } + return false; + } + public static boolean isRoleSysKdm() { + List listRole = (List) EgovUserDetailsHelper.getAuthorities(); + for (String role : listRole) { + if (Constant.AUTH_ROLE_SYM.equals(role)) { + return true; + } + } + return false; + } + + public static String clearXSS(String value) { + if (value == null || value.trim().equals("")) { + return ""; + } + String returnValue = value; + returnValue = returnValue.replaceAll("&", "&"); + returnValue = returnValue.replaceAll("<", "<"); + returnValue = returnValue.replaceAll(">", ">"); + returnValue = returnValue.replaceAll("'", "'"); + returnValue = returnValue.replaceAll("eval\\((.*)\\)", ""); + returnValue = returnValue.replaceAll("[\\\"\\\'][\\s]*javascript:(.*)[\\\"\\\']", "\"\""); + returnValue = returnValue.replaceAll("\"", """); + returnValue = returnValue.replaceAll("\\(", "(").replaceAll("\\)", ")"); + returnValue = returnValue.replaceAll("script", ""); + returnValue = returnValue.replaceAll("alert", ""); + return returnValue; + } + + public static String escapeNewlineToBr(String text) { + String str = text; + if (StringUtils.isEmpty(str)) return str; + + if (str.indexOf("\\r") >= 0) str = str.replaceAll("\\\\r", "\r"); + if (str.indexOf("\\n") >= 0) str = str.replaceAll("\\\\n", "\n"); + if (str.indexOf("\r\n") >= 0 || str.indexOf("\n") >= 0 || str.indexOf("\r") >= 0) { + str = str.replaceAll("\\r\\n", "
"); + str = str.replaceAll("\\r", "
"); + str = str.replaceAll("\\n", "
"); + } + return str; + } + public static String escapeNewlineToSpace(String text) { + String str = text; + if (StringUtils.isEmpty(str)) return str; + if (str.indexOf("\\r") >= 0) str = str.replaceAll("\\\\r", "\r"); + if (str.indexOf("\\n") >= 0) str = str.replaceAll("\\\\n", "\n"); + if (str.indexOf("\r\n") >= 0 || str.indexOf("\n") >= 0 || str.indexOf("\r") >= 0) { + str = str.replaceAll("\\r\\n", ""); + str = str.replaceAll("\\r", ""); + str = str.replaceAll("\\n", ""); + } + str = str.replaceAll("\"", ""); + str = str.replaceAll("'", ""); + return str; + } + public static String cut(String text, int size) { + return cut(text, size, ""); + } + public static String cut(String text, int size, String suffix) { + if (text == null) { + return ""; + } + if (text.length() < size) { + return text; + } + size = size - suffix.length(); + return StringUtils.substring(text, 0, size) + suffix; + } + public static boolean isConsecutive(String str, int n) { + int sumOfDifferences = 0; + int lastTemp = 0; + Boolean consecutive = false; + for (int i = 0; i < str.length() - 1; i++) { + int temp = str.charAt(i) - str.charAt(i + 1); + if (temp != lastTemp) { + sumOfDifferences = 0; + } + if (temp == 1 || temp == -1) { + sumOfDifferences += temp; + } else { + sumOfDifferences = 0; + } + if (sumOfDifferences == n - 1 || sumOfDifferences == ((n - 1) * -1)) { + consecutive = true; + break; + } + lastTemp = temp; + } + return consecutive; + } + public static boolean regexFind(String str, String regex) { + Pattern pattern = Pattern.compile(regex); + Matcher matcher = pattern.matcher(str); + return matcher.find(); + } + public static String generateRandomString(String allowed, int length) { + Random random = new Random(); + StringBuilder sb = new StringBuilder(length); + for (int i = 0; i < length; i++) { + sb.append(allowed.charAt(random.nextInt(allowed.length()))); + } + return sb.toString(); + } + public static String getIpAddress(HttpServletRequest req) { + String ipAddress = ""; + if (req.getHeader("X-Forwarded-For") == null) { + ipAddress = req.getRemoteAddr(); + } else { + ipAddress = req.getHeader("X-Forwarded-For"); + int idx = ipAddress.indexOf(','); + if (idx > -1) { + ipAddress = ipAddress.substring(0, idx); + } + } + return ipAddress; + } + public static String returnUrl(HttpServletRequest req, String parameterName) { + String url = req.getRequestURI(); + if (url.startsWith("/logout") || url.startsWith("/error") || "/".equals(url)) { + return ""; + } + String queryString = req.getQueryString(); + if (queryString != null) { + url += "?" + queryString; + try { + url = URLEncoder.encode(url, Constant.ENCODING_UTF8); + } catch (UnsupportedEncodingException e) { + url = ""; + } + } + return "?" + parameterName + "=" + url; + } + + public static String getUrl(HttpServletRequest req, String domain) { + final String uri = req.getRequestURI(); + final String queryString = req.getQueryString(); + String url = ""; + url = domain + uri; + if (StringUtils.isNotBlank(queryString)) { + url += "?" + queryString; + } + return url; + } + public static int getTridentVersion(String userAgent) { + String lowerUserAgent = userAgent.toLowerCase(); + int start = lowerUserAgent.indexOf("trident/"); + if (start == -1) { + return 0; + } + String trident = lowerUserAgent.substring(start + 8, start + 9); + return NumberUtils.toInt(trident); + } + public static String getPropertyStr(String key) { + String str = ""; + if (org.apache.commons.lang3.StringUtils.isNotBlank(key)) str = propertyService.getString(key); + return str; + } + public static String deleteChar(String str) { + if (StringUtils.isEmpty(str)) return str; + + String regExpNumber = "[^0-9]"; + return str.replaceAll(regExpNumber, ""); + } + @SuppressWarnings("rawtypes") + public static boolean isEmpty(Map map, String key) { + boolean isEmpty = true; + if (map == null) return isEmpty; + + Object obj = map.get(key); + if ( obj != null + && !StringUtils.isEmpty(obj.toString()) + && !(obj+"").equals("null")) { + + isEmpty = false; + } + return isEmpty; + } + public static boolean checkMaxbyte(String chkString, int maxbyte) { + boolean checkResult = true; + if (StringUtils.isBlank(chkString)) return checkResult; + int bytes = 0; + try { + bytes = chkString.getBytes(Constant.ENCODING_UTF8).length; + if (bytes > maxbyte) checkResult = false; + } catch (UnsupportedEncodingException e) { + LOGGER.error("fail in checkMaxbyte() maxbyte="+maxbyte+", bytes="+bytes+", chkString="+chkString, e); + checkResult = false; + } catch (Exception e) { + LOGGER.error("fail in checkMaxbyte() maxbyte="+maxbyte+", bytes="+bytes+", chkString="+chkString, e); + checkResult = false; + } + return checkResult; + } + public static String[] getValueArr(List list, String key) { + String[] exidArr = null; + if (list == null || list.size() == 0) return exidArr; + exidArr = new String[list.size()]; + for (int i=0; i max) + return false; + } + else + return false; + } + return true; + } + public static String getRandomNum(int size) { + String strRandom = ""; + Random rand = new Random(); + for (int i = 0; i < size; i++) { + strRandom += String.valueOf(rand.nextInt(10)); + } + return strRandom; + } + public static boolean isMobile(final HttpServletRequest req) { + String ua = StringUtils.defaultString(req.getHeader("User-Agent"), "").toLowerCase(); + if (ua.indexOf(Constant.ANDROID) > -1 || ua.indexOf(Constant.IOS) > -1 || ua.indexOf("mobile") > -1) { + return true; + } + return false; + } + public static String getContextPath(final HttpServletRequest req, final String path) { + //if (isApp(req)) { + return Constant.PREFIX_M + (path.startsWith("/") ? path : "/" + path); + //} + // return path; + } + public static String unscript(String data) { + if (data == null || data.trim().equals("")) { + return ""; + } + + String ret = data; + + ret = ret.replaceAll("<(S|s)(C|c)(R|r)(I|i)(P|p)(T|t)", "<script"); + ret = ret.replaceAll(" getListMapFromJsonArray( JSONArray jsonArray ) { + List list = new ArrayList(); + if( jsonArray != null ){ + int jsonSize = jsonArray.length(); + for( int i = 0; i < jsonSize; i++ ){ + DataMap map = NlibCmmUtil.getMapFromJsonObject( ( JSONObject ) jsonArray.get(i) ); + list.add( map ); + } + } + return list; + } + public static String getAisSidoName(String sido) { + String rtnStr = ""; + for(int i=0;i 0){ + for(Cookie cookie : cookies){ + if(Name.equals(cookie.getName())){ + cookieValue = cookie.getValue(); + break; + } + } + } + return cookieValue; + } + public static String getDecoderCookie(final HttpServletRequest req, String Name){ + String cookieValue = ""; + Cookie[] cookies = req.getCookies(); + if(cookies != null && cookies.length > 0){ + for(Cookie cookie : cookies){ + if(Name.equals(cookie.getName())){ + try { + cookieValue = java.net.URLDecoder.decode(cookie.getValue(),Constant.ENCODING_UTF8); + } catch (UnsupportedEncodingException e) { + LOGGER.error("fail in getDecoderCookie()" , e); + } catch (Exception e) { + LOGGER.error("fail in getDecoderCookie()", e); + } + break; + } + } + } + return cookieValue; + } + public static String getCookieIdKey(){ + return propertyService.getString("kccf.cookie.id.key"); + } + + public static String getCookieId(final HttpServletRequest req){ + String cookieId = ""; + String key = getCookieIdKey(); + Cookie[] cookies = req.getCookies(); + if(cookies != null && cookies.length > 0){ + for(Cookie cookie : cookies){ + if(key.equals(cookie.getName())){ + try { + cookieId = java.net.URLDecoder.decode( cookie.getValue(),Constant.ENCODING_UTF8); + } catch (UnsupportedEncodingException e) { + LOGGER.error("fail in getCookieId()" , e); + } catch (Exception e) { + LOGGER.error("fail in getCookieId()", e); + } + break; + } + } + } + return cookieId; + } + public static String getNewCookieId(final HttpServletRequest req){ + String key = getCookieIdKey(); + String value = ""; + try { + value = java.net.URLEncoder.encode( encryptPassword(getPassStr(50), key) , Constant.ENCODING_UTF8 ); + } catch (UnsupportedEncodingException e) { + LOGGER.error("Error in getNewCookieId()", e); + } catch (Exception e) { + LOGGER.error("Error in getNewCookieId()", e); + } + return value; + } + public static void setCookieId(final HttpServletRequest req, final HttpServletResponse res){ + String key = getCookieIdKey(); + String value = ""; + + try { + value = java.net.URLEncoder.encode( encryptPassword(getPassStr(50), key) , Constant.ENCODING_UTF8 ); + } catch (UnsupportedEncodingException e) { + LOGGER.error("Error in setCookieId()", e); + } catch (Exception e) { + LOGGER.error("Error in setCookieId()", e); + } + + /* 2019.02.26 웹취약점 수정사항 => 1시간마다 쿠키 만료되고 있음 + String maxAge = String.valueOf((60*60*24*365)*10); + if (maxAge.matches("[0-9]+")) { + Cookie cookie = new Cookie(key,value); + // 수정 : 외부입력값 검증 후 쿠키 유효시한 설정에 사용 + int t = Integer.parseInt(maxAge); + if ( t > 3600 ) { + t = 3600; + } + cookie.setMaxAge(t); + cookie.setPath("/"); + res.addCookie(cookie); + } + */ + + // 쿠키 유효기간 1년으로 변경 (2019.08.08) + int maxAge = 60*60*24*365; // 1년 + Cookie cookie = new Cookie(key,value); + cookie.setMaxAge(maxAge); + cookie.setPath("/"); + res.addCookie(cookie); + } + + public static void setCookie(final HttpServletResponse res, String key, String value){ + /* 2019.02.26 웹취약점 수정사항 => 1시간마다 쿠키 만료되고 있음 + String maxAge = String.valueOf((60*60*24*365)*10); + if (maxAge.matches("[0-9]+")) { + Cookie cookie = new Cookie(key,value); + // 수정 : 외부입력값 검증 후 쿠키 유효시한 설정에 사용 + int t = Integer.parseInt(maxAge); + if ( t > 3600 ) { + t = 3600; + } + cookie.setMaxAge(t); + cookie.setPath("/"); + res.addCookie(cookie); + } + */ + + // 쿠키 유효기간 1년으로 변경 (2019.08.08) + int maxAge = 60*60*24*365; // 1년 + Cookie cookie = new Cookie(key,value); + cookie.setMaxAge(maxAge); + cookie.setPath("/"); + res.addCookie(cookie); + } + + public static void setEncoderCookie(final HttpServletResponse res, String key, String value){ + + try { + value = java.net.URLEncoder.encode(value,Constant.ENCODING_UTF8); + } catch (UnsupportedEncodingException e) { + LOGGER.error("Error in setEncoderCookie()", e); + } catch (Exception e) { + LOGGER.error("Error in setEncoderCookie()", e); + } + + /* 2019.02.26 웹취약점 수정사항 => 1시간마다 쿠키 만료되고 있음 + String maxAge = String.valueOf((60*60*24*365)*10); + if (maxAge.matches("[0-9]+")) { + Cookie cookie = new Cookie(key,value); + // 수정 : 외부입력값 검증 후 쿠키 유효시한 설정에 사용 + int t = Integer.parseInt(maxAge); + if ( t > 3600 ) { + t = 3600; + } + cookie.setMaxAge(t); + cookie.setPath("/"); + res.addCookie(cookie); + } + */ + + // 쿠키 유효기간 1년으로 변경 (2019.08.08) + int maxAge = 60*60*24*365; // 1년 + Cookie cookie = new Cookie(key,value); + cookie.setMaxAge(maxAge); + cookie.setPath("/"); + res.addCookie(cookie); + } + + public static void removeCookie(final HttpServletRequest req, final HttpServletResponse res, String key){ + Cookie[] cookies = req.getCookies(); + if(cookies != null && cookies.length > 0){ + for(Cookie cookie : cookies){ + if(key.equals(cookie.getName())){ + cookie.setMaxAge(0); + cookie.setPath("/"); + cookie.setSecure(true); //중요정보 평문전송 (HTTP): 취약점 수정 + String val = cookie.getValue(); + String filtered_val = val.replaceAll("\r","").replaceAll("\n",""); + Cookie cookie2 = new Cookie(key, filtered_val); + res.addCookie(cookie2); + break; + } + } + } + } + private static String encryptPassword(String key, String val) throws NoSuchAlgorithmException { + if (key == null) { + return ""; + } + byte[] hashValue = null; // 해쉬값 + MessageDigest md = MessageDigest.getInstance("SHA-512"); + md.reset(); + md.update(val.getBytes()); + hashValue = md.digest(key.getBytes()); + + return new String(Base64.encodeBase64(hashValue)).replaceAll("\\+", "").replaceAll("=", ""); + } + public static boolean isSido(String str){ + boolean isSido = false; + for(int i=0; i -1 ){ + isSido = true; + break; + } + if(str.indexOf( Constant.AIS_SIDO_PARAM_NAME_ARRAY[i] ) > -1 ){ + isSido = true; + break; + } + } + return isSido; + } + public static String changeSido(String str){ + if(str == null || "".equals(str)) return ""; + String rtnSido = ""; + for(int i=0; i -1 ){ + rtnSido = Constant.AIS_SIDO_PARAM_NAME_ARRAY[i]; + break; + } + if(str.indexOf( Constant.AIS_SIDO_PARAM_NAME_ARRAY[i] ) > -1 ){ + rtnSido = Constant.AIS_SIDO_PARAM_NAME_ARRAY[i]; + break; + } + } + return rtnSido; + } + public static void setAmsPathModelMap(HttpServletRequest req, ModelMap modelMap){ + // ams 경로 + String amsAssetsPath = getPropertyStr(Constant.AMS_SERVER_KEY) + getPropertyStr(Constant.AMS_ASSETS_PATH_KEY); + String amsThumbnailPath = getPropertyStr(Constant.AMS_THUMBNAIL_PATH_KEY); + String amsImagePath = getPropertyStr(Constant.AMS_FILE_PATH_KEY); + modelMap.addAttribute("amsAssetsPath", amsAssetsPath); + modelMap.addAttribute("amsThumbnailPath", amsThumbnailPath); + modelMap.addAttribute("amsImagePath", amsImagePath); + } + + public static void setNfsPathModelMap(HttpServletRequest req, ModelMap modelMap){ + // ams 경로 + String nfsNasPath = getPropertyStr(Constant.NFS_NAS_KEY); + String nfsDocPath = getPropertyStr(Constant.NFS_DOC_KEY); + modelMap.addAttribute("nfsNasPath", nfsNasPath); + modelMap.addAttribute("nfsDocPath", nfsDocPath); + } + + public static String getAssetImageUrl(String imagePath) { + String imageUrl = ""; + if (StringUtils.isEmpty(imagePath)) return imageUrl; + + String amsAssetsPath = getPropertyStr(Constant.AMS_SERVER_KEY) + getPropertyStr(Constant.AMS_ASSETS_PATH_KEY); + String amsThumbnailPath = getPropertyStr(Constant.AMS_THUMBNAIL_PATH_KEY); + if (imagePath.startsWith("http")) { // http 포함한 전체 경로일 경우 ex) object storage 이미지 + imageUrl = imagePath; + + } else if (imagePath.indexOf("/") >= 0) { // ex) 2/2/7292_thumbnail.jpg + imageUrl = amsAssetsPath + "/" + imagePath; + + } else { + imageUrl = amsAssetsPath + "/" + amsThumbnailPath + "/" + imagePath; // ex) ac6be22ee9db4414aeb4dab6078d27feb723f1c0.jpg + } + + imageUrl = imageUrl.replaceAll("//", "/"); + imageUrl = imageUrl.replaceAll(":/", "://"); // ex) https:/ => https:// + + return imageUrl; + } + + + public static String getContentsImageUrl(String imagePath) { + String imageUrl = ""; + if (StringUtils.isEmpty(imagePath)) return imageUrl; + + String amsAssetsPath = getPropertyStr(Constant.KCCF_HOME_KEY); + if (imagePath.startsWith("http")) { // http 포함한 전체 경로일 경우 ex) object storage 이미지 + imageUrl = imagePath; + + } else if (imagePath.indexOf("/") >= 0) { // ex) 2/2/7292_thumbnail.jpg + imageUrl = amsAssetsPath + "/" + imagePath; + + } else { + imageUrl = amsAssetsPath + "/" + imagePath; // ex) ac6be22ee9db4414aeb4dab6078d27feb723f1c0.jpg + } + + imageUrl = imageUrl.replaceAll("//", "/"); + imageUrl = imageUrl.replaceAll(":/", "://"); // ex) https:/ => https:// + + return imageUrl; + } + + + public static void setUploadPathModelMap(HttpServletRequest req, ModelMap modelMap){ + // 서버경로 (upload폴더 상위경로) : 로컬 개발시 upload 파일이 로컬에 존재하지 않을 경우 사용 + String uploadHomePath = getPropertyStr(Constant.UPLOAD_HOME_KEY); + modelMap.addAttribute("uploadHomePath", uploadHomePath); + } + + /** + * 자산미디어 - 문서 목차 문자열 파싱 + * +테스트 목차 -----1 +제1장 6.25전쟁 전투수기 -----100 + +발간사 ---2 ***1 +축간사(창녕군수) ---4 +축간사(창녕군의회의장)---5 +제1장 6.25전쟁 전투수기 ***2 + 끊어진 한강 철교 빈 보트로 건너다.(성경상) ---12 + 포탄이 날아들어 전우 3명이 즉사하다.(김윤규) ---16 + * + * @param str + * @return + * @throws Exception + */ + public static List parseTableOfContents(String str) { + List list = new ArrayList(); + if (StringUtils.isEmpty(str)) return list; + + + String[] lineArr = str.split("\n"); + int listIdx = 1; + for (int i=0; i errorList = new ArrayList(); + + if (idx1 >= 0 && idx2 >= 0) { // ex) 발간사 ---2 ***1 + String[] arr = line.split(pattern1); + title = arr[0]; + String[] arr2 = arr[1].split(pattern2); + + try { + if (arr2.length == 2) { + pageNum = parseTableOfContentsPageNum(arr2[0]); + ocrFileNum = new Integer(StringUtils.trim(arr2[1]).replaceAll(" ", "")); + + } else if (arr2.length == 1) { // ex) 1. 옹기의 지역적인 특성 ---7 *** + pageNum = parseTableOfContentsPageNum(arr2[0]); + ocrFileNum = new Integer(""); // 강제로 에러발생시킴 + } + } catch (Exception e) { + errorList.add(listIdx+"\t"+e.getMessage()); + } + } else if (idx1 >= 0 && idx2 < 0) { // ex) 축간사(창녕군수) ---4 + String[] arr = line.split(pattern1); + title = arr[0]; + try { + pageNum = parseTableOfContentsPageNum(arr[1]); + } catch (Exception e) { + errorList.add(listIdx+"\t"+e.getMessage()); + } + + } else if (idx1 < 0 && idx2 >= 0) { // ex) 제1장 6.25전쟁 전투수기 ***2 + String[] arr = line.split(pattern2); + title = arr[0]; + try { + if (arr.length == 2) { + ocrFileNum = new Integer(StringUtils.trim(arr[1]).replaceAll(" ", "")); + + } else if (arr.length == 1) { // ex) -참고문헌 *** + ocrFileNum = new Integer(""); // 강제로 에러발생시킴 + } + } catch (Exception e) { + errorList.add(listIdx+"\t"+e.getMessage()); + } + + } else { + title = line; + } + + list.add(new CmmAmsDocTableOfContentsVO(title, pageNum, ocrFileNum, errorList)); + listIdx++; + } + + return list; + } + + /** + * PDF 목차 페이지번호 파싱 + * @param pageNumStr + * @return + * @throws Exception + */ + public static String parseTableOfContentsPageNum(String pageNumStr) throws Exception { + if (StringUtils.isEmpty(pageNumStr)) { + pageNumStr = new Integer(pageNumStr).toString(); // 강제로 Exception 발생시킴 + } + + pageNumStr = StringUtils.trim(pageNumStr).replaceAll(" ", ""); + + boolean isPageNum = true; + for (int i=0; i list, String delimiter) throws Exception { + StringBuffer sb = new StringBuffer();; + + String title = ""; + int titleDepth = 1; + int prevTitleDepth = 100; + String pageNum = null; + Integer ocrFileNum = null; + boolean hasOcrFileNum = false; + + for (int i=0; list!=null && i= 0) { + title = title.replaceAll("\"", " "); // 따옴표 치환 + } + pageNum = vo.getPageNum(); + + ocrFileNum = vo.getOcrFileNum(); + + if (ocrFileNum != null) { + hasOcrFileNum = true; + } else { + hasOcrFileNum = false; + } + + if (title.startsWith(" ") || title.startsWith("\t")) { + if (title.startsWith(" ")) { // 공백6칸 + titleDepth = 4; + } else if (title.startsWith(" ")) { // 공백5칸 + titleDepth = 4; + } else if (title.startsWith(" ")) { // 공백4칸 + titleDepth = 3; + } else if (title.startsWith(" ")) { // 공백3칸 + titleDepth = 3; + } else if (title.startsWith(" ")) { // 공백2칸 + titleDepth = 2; + } else if (title.startsWith(" ")) { // 공백1칸 + titleDepth = 2; + } else if (title.startsWith(" •")) { // 공백1칸 +원문자 ex) K163832.pdf + titleDepth = 2; + } + } else { + titleDepth = 1; + } + + String cssDepth = ""; + if (titleDepth == 1) cssDepth = "d1"; + else if (titleDepth == 2) cssDepth = "d2"; + else if (titleDepth == 3) cssDepth = "d3"; + else if (titleDepth == 4) cssDepth = "d4"; + + if (hasOcrFileNum) { + if (i > 0 && ocrFileNum != null) sb.append(delimiter); + title = title.replaceAll("(\r\n|\r|\n|\n\r)", ""); + sb.append("

"+title); + if (pageNum != null) sb.append(" - "+pageNum); + sb.append("

"); + + } else { + title = title.replaceAll("(\r\n|\r|\n|\n\r)", ""); + sb.append("

"+title); + if (pageNum != null) sb.append(" - "+pageNum); + sb.append("

"); + } + + // ocrFileNum 위치 검증 + if (titleDepth == 1 && prevTitleDepth > 1 && !hasOcrFileNum) { + List errorList = vo.getErrorList(); + errorList.add((i+1)+"\t"+"missing divided file number? : "+title+(pageNum!=null ? " - "+pageNum : "")); +// System.out.println("makeTableOfContentsMarkup() \t"+(i+1)+"\tmissing divided file number? : "+title+(pageNum!=null ? " - "+pageNum : "")); + } + + + prevTitleDepth = titleDepth; + } + + return sb.toString(); + } + + /** + * URL scheme HTTPS로 변경 + * @param url + * @return + */ + public static String changeSchemeToHttps(String url) { + String result = ""; + if (StringUtils.isEmpty(url)) return result; + + Pattern p = Pattern.compile("^(http:\\/\\/|https:\\/\\/)?(www\\.)?(.*)$"); // URL 앞부분 패턴 + Matcher m = p.matcher(url); + if (m.find()) { + LOGGER.info("changeSchemeToHttps() m.groupCount()={}, m.group(1)={}, m.group(2)={}, m.group(3)={}, m.group(0)={}", m.groupCount(), m.group(1), m.group(2), m.group(3), m.group(0)); + result = "https://"; + if (m.group(2) != null) result += m.group(2); + result += m.group(3); + } + + return result; + } + + public static String getLinkUrl(String aId, String mId )throws EgovBizException { + + DataMap param = new DataMap(); + param.put("aId", aId); + param.put("mId", mId); + DataMap media = new DataMap();/*cmmService.selectCmmAmsAssetsMediaDetail2(param);*/// asset id로 조회 + String mediaId = media.getString("mediaId"); + String mediaInterfaceId = media.getString("mediaInterfaceId"); + + String rtnStr = ""; + if (StringUtils.isNotEmpty(mediaInterfaceId)) { // mediaInterfaceId가 존재할 경우만 URL 정보 생성 + if(media.get("assetType") != null){ + if(media.get("assetType").toString().equals("문서") ){ + rtnStr = NlibCmmUtil.getPropertyStr(Constant.KCCF_HOME_KEY)+"/npdfView.do?"; + rtnStr += "npdf="+Constant.UA_TYPE_R+mediaInterfaceId; // MEDIA 의 INTERFACE_ID 사용 + + }else if(media.get("assetType").toString().equals("링크")){ + rtnStr = media.get("linkData").toString(); + }else{ + rtnStr = NlibCmmUtil.getPropertyStr(Constant.KCCF_HOME_KEY)+"/lib/libraryDetail.do?contentId="+mediaId; + rtnStr += "&rfType="+Constant.UA_TYPE_R; // 히스토리 등록 시 사용 + } + } + } + return rtnStr; + } +} + diff --git a/src/main/java/nlib/sch/web/SearchController.java b/src/main/java/nlib/sch/web/SearchController.java new file mode 100644 index 00000000..72f97162 --- /dev/null +++ b/src/main/java/nlib/sch/web/SearchController.java @@ -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 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 vo = new ArrayList(); + List list = new ArrayList(); + + // 페이징 사이즈 코드 목록 조회 (DB방식으로 변경 2021.08.06 KNKIM) + List> pageSizeCodes = codeService.listCodes("PAGE_SIZE_OPTION"); + + // 자료유형 코드 목록 조회 + List> masterType = codeService.listCodes("MASTER_TYPE_DIV_CD"); + List> dtlsType = codeService.listCodes("DTLS_TYPE_DIV_CD"); + + //주제분야 목록 조회 + List> 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 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 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 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 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 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 retMap = new HashMap(); + /*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 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"; + }*/ +} diff --git a/src/main/resources/egovframework/mapper/nlib/col/CollectionDAO_SQL.xml b/src/main/resources/egovframework/mapper/nlib/col/CollectionDAO_SQL.xml new file mode 100644 index 00000000..7562f961 --- /dev/null +++ b/src/main/resources/egovframework/mapper/nlib/col/CollectionDAO_SQL.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/nlib/collection/listItems20211012.jsp b/src/main/webapp/WEB-INF/jsp/nlib/collection/listItems20211012.jsp new file mode 100644 index 00000000..104479d5 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/nlib/collection/listItems20211012.jsp @@ -0,0 +1,266 @@ +<% +/** + *
+ * @Class Name : listItems.jsp
+ * 
+ * @Description : 소장 자료를 조회한다.
+ * 
+ * 
+ * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
+ *
+ * 
+ * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 7. 28. JSYOO 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP JSYOO + * @since 2021. 7. 28. + * @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" %> + +소장 자료 + + + + + + +${pageTitle} + + + + + + + + + + +

${pageTitle }

+ +
+ + + + + + + + +
+ + + + + +
+ + +
+
+
+ + +

    생산년도

    +
    + 전체
    + ~
    + (미상포함) + 적용 +
    +
+

    생산기관

    +
+
+ +
+ + diff --git a/src/main/webapp/WEB-INF/jsp/nlib/collection/schResultReferenceList.jsp b/src/main/webapp/WEB-INF/jsp/nlib/collection/schResultReferenceList.jsp new file mode 100644 index 00000000..4a63ba4e --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/nlib/collection/schResultReferenceList.jsp @@ -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); +%> +
    + +
  • + +
    + <%-- ${result.TITLE} --%> + ${result.TITLE} +

    출처:${result.COPYRIGHT}

    +
    +
    + +
    +
    + +
    +
      +
    • <%--주제분야 : --%>${result.FIRST_CATEGORY_NM} > ${result.SECOND_CATEGORY_NM}
    • +
    • <%--자료유형 : --%>${result.FIRST_CLASS_NM} > ${result.SECOND_CLASS_NM}
    • +
    • ${result.PUBLISHER}
    • +
    • ${result.GENYEAR}년도
    • +
    +
      +
    • 소장처 : ${result.COUNCIL_NM_TOT}
    • +
    +

    ${result.SUMMARY}

    +
    + + + + + + + 사진보기 + 영상보기 + 음향듣기 + + <%-- 원본 연결 + 원문보기 + --%> + <%-- 분할파일 연결 (테스트query:임진란 임원선출) --%> + 원문보기 + + <%-- 원문보기 --%> + 원문보기 + + + + + + + + RIS + + + +
    +
    +
  • +
    +
+ diff --git a/src/main/webapp/WEB-INF/jsp/nlib/collection/searchList.jsp b/src/main/webapp/WEB-INF/jsp/nlib/collection/searchList.jsp new file mode 100644 index 00000000..f67b87a3 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/nlib/collection/searchList.jsp @@ -0,0 +1,442 @@ + +<% + /** + *
+     * @Class Name : searchList.jsp
+     * 
+     * @Description : 소장 자료를 조회한다.
+     * 
+     * 
+     * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
+     *
+     * 
+ * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 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"%> + +소장 자료 + + + + + + +${pageTitle} + + + + + + + + + + +

${pageTitle }

+ +
+ + + +
+
+
검색결과 안내
+
+ '${searchVO.realQuery}'에 대한 검색결과는 총 건 입니다. +
+
+
+
+ +
+
+
+
    +

    자료유형

    +
  • +
    + <%--
    --%> +
    + +
    +
    +
  • + +
  • class="showMoreType" style="display:none;" > +
    on"> +
    + checked="checked" /> +
    +
    + +
  • +
    +
  • 더 보기
  • +
+ +
    +

    생산년도

    +
    + 전체
    + ~
    (미상포함) + 적용 +
    +
+
    +

    생산기관

    +
+
+
+ + + " + " + + + + + + + +
자료정보이용
+ + ${result.TITLE} +

출처:${result.COPYRIGHT}

+
+ [${result.FIRST_CLASS_NM}]
+ <%--자료유형 : --%>자료유형 : ${result.FIRST_CLASS_NM} > ${result.SECOND_CLASS_NM} + <%--주제분야 : --%>주제분야 : ${result.FIRST_CATEGORY_NM} > ${result.SECOND_CATEGORY_NM} + | 생산기관 : ${result.PUBLISHER} + | 생산년도 : ${result.GENYEAR} +
+ <%--
  • 소장처 : ${result.COUNCIL_NM_TOT}
  • --%> +
    ttttt
    +
    +
    +
    + + +
    + + + diff --git a/src/main/webapp/WEB-INF/jsp/nlib/collection/searchReferenceListAjax.jsp b/src/main/webapp/WEB-INF/jsp/nlib/collection/searchReferenceListAjax.jsp new file mode 100644 index 00000000..a564e3f8 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/nlib/collection/searchReferenceListAjax.jsp @@ -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" %> + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    + + +