From e5b37c9e25b86b2ecdaaaf0366d8e10cbbf6f560 Mon Sep 17 00:00:00 2001 From: tolag3 Date: Mon, 10 Feb 2025 17:07:24 +0900 Subject: [PATCH] Merge branch 'tolag3' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 통합검색 마무리 --- .../java/kcc/com/srch/service/SearchVO.java | 36 +++- .../srch/service/impl/SearchServiceImpl.java | 7 + .../kcc/com/srch/web/SearchController.java | 25 +++ src/main/java/seed/utils/FairnetUtils.java | 24 ++- .../WEB-INF/jsp/com/srch/searchBoard.jsp | 9 +- .../WEB-INF/jsp/com/srch/searchCompleted.jsp | 9 +- .../WEB-INF/jsp/com/srch/searchConference.jsp | 9 +- .../WEB-INF/jsp/com/srch/searchCounsel.jsp | 9 +- .../WEB-INF/jsp/com/srch/searchFile.jsp | 182 ++++++++++++++++++ .../WEB-INF/jsp/com/srch/searchList.jsp | 34 +++- .../WEB-INF/jsp/com/srch/searchProcess.jsp | 9 +- .../_extra/gtm/unifiedSearch/searchList.jsp | 2 +- .../gtm/unifiedSearch/searchList_new.jsp | 2 +- 13 files changed, 343 insertions(+), 14 deletions(-) create mode 100644 src/main/webapp/WEB-INF/jsp/com/srch/searchFile.jsp diff --git a/src/main/java/kcc/com/srch/service/SearchVO.java b/src/main/java/kcc/com/srch/service/SearchVO.java index 19dc8bf5..09928825 100644 --- a/src/main/java/kcc/com/srch/service/SearchVO.java +++ b/src/main/java/kcc/com/srch/service/SearchVO.java @@ -167,9 +167,13 @@ public class SearchVO extends ComDefaultVO implements Serializable { @JsonProperty("CONFERENCE_GUBUN_NM") private String conferenceGubunNm; // 회의 구분 + + /* + * conference 끝 + */ /* - * counsel 끝 + * counsel 시작 */ @JsonProperty("COUNSEL_SEQ") @@ -203,7 +207,7 @@ public class SearchVO extends ComDefaultVO implements Serializable { private String noticeType; // 공지 유형 /* - * counsel 시작 + * counsel 끝 */ @@ -230,6 +234,32 @@ public class SearchVO extends ComDefaultVO implements Serializable { private String timhderAssign; // 팀장 팀 배정 /* - * process 시작 + * process 끝 + */ + + /* + * file 시작 + */ + + @JsonProperty("FILE_NO") + private String fileNo; // 파일 번호 + + @JsonProperty("FILE_PATH") + private String filePath; // 파일 경로 + + @JsonProperty("FILE_CONTENT") + private String fileContent; // 파일 경로 + + @JsonProperty("CASE_TYPE") + private String caseType; // 케이스 유형 + + @JsonProperty("LINK_URL") + private String linkUrl; // 링크 URL + + @JsonProperty("LINK_TEXT") + private String linkText; // 링크 제목 + + /* + * file 끝 */ } \ No newline at end of file diff --git a/src/main/java/kcc/com/srch/service/impl/SearchServiceImpl.java b/src/main/java/kcc/com/srch/service/impl/SearchServiceImpl.java index 937704c8..2fcfbbca 100644 --- a/src/main/java/kcc/com/srch/service/impl/SearchServiceImpl.java +++ b/src/main/java/kcc/com/srch/service/impl/SearchServiceImpl.java @@ -29,6 +29,7 @@ public class SearchServiceImpl extends EgovAbstractServiceImpl implements Search Map conference = FairnetUtils.searchApplication("conference", searchVO.getSearchKeyword(), searchVO.getPagingSize(), searchVO.getPageIndex()); Map counsel = FairnetUtils.searchApplication("counsel", searchVO.getSearchKeyword(), searchVO.getPagingSize(), searchVO.getPageIndex()); Map process = FairnetUtils.searchApplication("process", searchVO.getSearchKeyword(), searchVO.getPagingSize(),searchVO.getPageIndex()); + Map file = FairnetUtils.searchApplication("file", searchVO.getSearchKeyword(), searchVO.getPagingSize(),searchVO.getPageIndex()); BigDecimal totCnt = new BigDecimal(0); @@ -37,6 +38,7 @@ public class SearchServiceImpl extends EgovAbstractServiceImpl implements Search totCnt = totCnt.add(getTotCnt(conference)); totCnt = totCnt.add(getTotCnt(counsel)); totCnt = totCnt.add(getTotCnt(process)); + totCnt = totCnt.add(getTotCnt(file)); model.addAttribute("totCnt", totCnt); model.addAttribute("board", board); @@ -44,6 +46,7 @@ public class SearchServiceImpl extends EgovAbstractServiceImpl implements Search model.addAttribute("conference", conference); model.addAttribute("counsel", counsel); model.addAttribute("process", process); + model.addAttribute("file", file); PaginationInfo paginationInfo = new PaginationInfo(); @@ -76,6 +79,10 @@ public class SearchServiceImpl extends EgovAbstractServiceImpl implements Search if(counsel != null) { totalREcordCount = Integer.valueOf((String)counsel.get("totcnt")); } + }else if("file".equals(searchVO.getSearchType())) { + if(file != null) { + totalREcordCount = Integer.valueOf((String)file.get("totcnt")); + } }else { paginationInfo.setTotalRecordCount(totCnt.intValue()); } diff --git a/src/main/java/kcc/com/srch/web/SearchController.java b/src/main/java/kcc/com/srch/web/SearchController.java index edce1c85..6e5fa4d0 100644 --- a/src/main/java/kcc/com/srch/web/SearchController.java +++ b/src/main/java/kcc/com/srch/web/SearchController.java @@ -12,6 +12,17 @@ import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; import kcc.com.srch.service.SearchService; import kcc.com.srch.service.SearchVO; +/** +* @packageName : kcc.com.srch.web +* @fileName : SearchController.java +* @author : JunHo Lee +* @date : 2025.02.05 +* @description : +* =========================================================== +* DATE AUTHOR NOTE +* ----------------------------------------------------------- +* 2025.02.05 JunHo Lee 최초 생성 +*/ @Controller public class SearchController { @@ -105,4 +116,18 @@ public class SearchController { return "com/srch/searchCounsel"; } + + @RequestMapping(value = "/com/srch/SearchFile.do") + public String SearchFile( + ModelMap model + , @ModelAttribute("searchVO") SearchVO searchVO + ) throws Exception { + + searchVO.setPagingSize("10"); + searchVO.setSearchType("file"); + + searchService.searchListSet(searchVO, model); + + return "com/srch/searchFile"; + } } \ No newline at end of file diff --git a/src/main/java/seed/utils/FairnetUtils.java b/src/main/java/seed/utils/FairnetUtils.java index 7cd2e6af..b7e336b6 100644 --- a/src/main/java/seed/utils/FairnetUtils.java +++ b/src/main/java/seed/utils/FairnetUtils.java @@ -359,6 +359,7 @@ public class FairnetUtils { * , conference - 협의회관리 * , counsel - 상담관리 * , process - 사건처리관리 + * , file - 파일검색 * @param searchKeyword : 검색어 * @param pagingSize : 페이징 크기 (무한: -1) * @param page : 페이지 @@ -371,17 +372,26 @@ public class FairnetUtils { , int page ) { + if("file".equals(searchType)) { + searchType = "file_test_250122"; + } + String url = new SearchGlobalSet().getHost() + "/srch_resultjson?" + "w=" + searchType - + "&q=" + "*" + searchKeyword + "*" + + "&q=" + searchKeyword + "&outmax=" + pagingSize + "§ion=" + "&pg=" + page; try { String response = new RestTemplate().getForObject(url, String.class); - response = response.replaceAll("\n", "\\n"); - response = response.replaceAll("\r", "\\r"); + + //검색결과 json 형식에 맞지않는 string replace + response = response.replaceAll("\n", "") + .replaceAll("\r", "") +// .replaceAll("\"\"(?!,)", "\"") + .replaceAll("\"att_list\": [\"]", "\"att_list\": []") + ; JsonNode root = new ObjectMapper().readTree(response); JsonNode listNode = root.path("section_list") @@ -398,6 +408,14 @@ public class FairnetUtils { Map result = new HashMap(); result.put("totcnt", ((TextNode) listNode.get("totcnt")).asText()); + + searchList.stream().forEach(t -> + { + if(t.getLinkText() != null) { + t.setLinkText(t.getLinkText().replaceAll(":", "")); + } + } + ); result.put("list", searchList); return result; } diff --git a/src/main/webapp/WEB-INF/jsp/com/srch/searchBoard.jsp b/src/main/webapp/WEB-INF/jsp/com/srch/searchBoard.jsp index 9df3cc73..9ef2eb64 100644 --- a/src/main/webapp/WEB-INF/jsp/com/srch/searchBoard.jsp +++ b/src/main/webapp/WEB-INF/jsp/com/srch/searchBoard.jsp @@ -38,6 +38,8 @@ url = '/com/srch/SearchBoard.do'; }else if(type === 'counsel'){ url = '/com/srch/SearchCounsel.do'; + }else if(type === 'file'){ + url = '/com/srch/SearchFile.do'; } document.search.searchType.value = type; document.search.action = url; @@ -67,7 +69,7 @@ .cs-search-lnb li a.on:after{content:'';display:block;position:absolute;left:0;bottom:0;width:100%;height:3px;background:#5f6cd4} .cs-content-search{padding:16px 0 0 163px;} .cs-result-stats{font-size:13px;color:#808080;margin-bottom:38px;} - .result-box{max-width:618px;padding:16px 0;border-top:1px solid #e8e8e8} + .result-box{max-width:918px;padding:16px 0;border-top:1px solid #e8e8e8} .result-box h2{margin-bottom: 10px;font-size:15px;} .result-link{font-size:18px;color:#1a0dab;} .result-link.more{font-size:16px;} @@ -125,6 +127,11 @@ 상담 관리 [${empty counsel.totcnt ? "0":counsel.totcnt}] +
  • + + 사건파일 [${empty file.totcnt ? "0":file.totcnt}] + +
  • diff --git a/src/main/webapp/WEB-INF/jsp/com/srch/searchCompleted.jsp b/src/main/webapp/WEB-INF/jsp/com/srch/searchCompleted.jsp index f5e91934..55a4e912 100644 --- a/src/main/webapp/WEB-INF/jsp/com/srch/searchCompleted.jsp +++ b/src/main/webapp/WEB-INF/jsp/com/srch/searchCompleted.jsp @@ -38,6 +38,8 @@ url = '/com/srch/SearchBoard.do'; }else if(type === 'counsel'){ url = '/com/srch/SearchCounsel.do'; + }else if(type === 'file'){ + url = '/com/srch/SearchFile.do'; } document.search.searchType.value = type; document.search.action = url; @@ -66,7 +68,7 @@ .cs-search-lnb li a.on:after{content:'';display:block;position:absolute;left:0;bottom:0;width:100%;height:3px;background:#5f6cd4} .cs-content-search{padding:16px 0 0 163px;} .cs-result-stats{font-size:13px;color:#808080;margin-bottom:38px;} - .result-box{max-width:618px;padding:16px 0;border-top:1px solid #e8e8e8} + .result-box{max-width:918px;padding:16px 0;border-top:1px solid #e8e8e8} .result-box h2{margin-bottom: 10px;font-size:15px;} .result-link{font-size:18px;color:#1a0dab;} .result-link.more{font-size:16px;} @@ -124,6 +126,11 @@ 상담 관리 [${empty counsel.totcnt ? "0":counsel.totcnt}] +
  • + + 사건파일 [${empty file.totcnt ? "0":file.totcnt}] + +
  • diff --git a/src/main/webapp/WEB-INF/jsp/com/srch/searchConference.jsp b/src/main/webapp/WEB-INF/jsp/com/srch/searchConference.jsp index 4d7ac320..666c642c 100644 --- a/src/main/webapp/WEB-INF/jsp/com/srch/searchConference.jsp +++ b/src/main/webapp/WEB-INF/jsp/com/srch/searchConference.jsp @@ -38,6 +38,8 @@ url = '/com/srch/SearchBoard.do'; }else if(type === 'counsel'){ url = '/com/srch/SearchCounsel.do'; + }else if(type === 'file'){ + url = '/com/srch/SearchFile.do'; } document.search.searchType.value = type; document.search.action = url; @@ -66,7 +68,7 @@ .cs-search-lnb li a.on:after{content:'';display:block;position:absolute;left:0;bottom:0;width:100%;height:3px;background:#5f6cd4} .cs-content-search{padding:16px 0 0 163px;} .cs-result-stats{font-size:13px;color:#808080;margin-bottom:38px;} - .result-box{max-width:618px;padding:16px 0;border-top:1px solid #e8e8e8} + .result-box{max-width:918px;padding:16px 0;border-top:1px solid #e8e8e8} .result-box h2{margin-bottom: 10px;font-size:15px;} .result-link{font-size:18px;color:#1a0dab;} .result-link.more{font-size:16px;} @@ -124,6 +126,11 @@ 상담 관리 [${empty counsel.totcnt ? "0":counsel.totcnt}] +
  • + + 사건파일 [${empty file.totcnt ? "0":file.totcnt}] + +
  • diff --git a/src/main/webapp/WEB-INF/jsp/com/srch/searchCounsel.jsp b/src/main/webapp/WEB-INF/jsp/com/srch/searchCounsel.jsp index 40397419..80bc58dc 100644 --- a/src/main/webapp/WEB-INF/jsp/com/srch/searchCounsel.jsp +++ b/src/main/webapp/WEB-INF/jsp/com/srch/searchCounsel.jsp @@ -38,6 +38,8 @@ url = '/com/srch/SearchBoard.do'; }else if(type === 'counsel'){ url = '/com/srch/SearchCounsel.do'; + }else if(type === 'file'){ + url = '/com/srch/SearchFile.do'; } document.search.searchType.value = type; document.search.action = url; @@ -66,7 +68,7 @@ .cs-search-lnb li a.on:after{content:'';display:block;position:absolute;left:0;bottom:0;width:100%;height:3px;background:#5f6cd4} .cs-content-search{padding:16px 0 0 163px;} .cs-result-stats{font-size:13px;color:#808080;margin-bottom:38px;} - .result-box{max-width:618px;padding:16px 0;border-top:1px solid #e8e8e8} + .result-box{max-width:918px;padding:16px 0;border-top:1px solid #e8e8e8} .result-box h2{margin-bottom: 10px;font-size:15px;} .result-link{font-size:18px;color:#1a0dab;} .result-link.more{font-size:16px;} @@ -124,6 +126,11 @@ 상담 관리 [${empty counsel.totcnt ? "0":counsel.totcnt}] +
  • + + 사건파일 [${empty file.totcnt ? "0":file.totcnt}] + +
  • diff --git a/src/main/webapp/WEB-INF/jsp/com/srch/searchFile.jsp b/src/main/webapp/WEB-INF/jsp/com/srch/searchFile.jsp new file mode 100644 index 00000000..25a64b7d --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/com/srch/searchFile.jsp @@ -0,0 +1,182 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    +
    + + + + + + + + +
    +

    ''에 대한 검색결과가 없습니다.

    +
      +
    • 단어의 철자가 정확한지 확인해 보세요.
    • +
    • 한글을 영어로 혹은 영어를 한글로 입력했는지 확인해 보세요.
    • +
    • 검색어의 단어 수를 줄이거나, 보다 일반적인 검색어로 다시 검색해 보세요.
    • +
    • 두 단어 이상의 검색어인 경우, 띄어쓰기를 확인해 보세요.
    • +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/com/srch/searchList.jsp b/src/main/webapp/WEB-INF/jsp/com/srch/searchList.jsp index 60fe664c..2f956009 100644 --- a/src/main/webapp/WEB-INF/jsp/com/srch/searchList.jsp +++ b/src/main/webapp/WEB-INF/jsp/com/srch/searchList.jsp @@ -32,6 +32,8 @@ url = '/com/srch/SearchBoard.do'; }else if(type === 'counsel'){ url = '/com/srch/SearchCounsel.do'; + }else if(type === 'file'){ + url = '/com/srch/SearchFile.do'; } document.search.searchType.value = type; document.search.action = url; @@ -61,7 +63,7 @@ .cs-search-lnb li a.on:after{content:'';display:block;position:absolute;left:0;bottom:0;width:100%;height:3px;background:#5f6cd4} .cs-content-search{padding:16px 0 0 163px;} .cs-result-stats{font-size:13px;color:#808080;margin-bottom:38px;} - .result-box{max-width:618px;padding:16px 0;border-top:1px solid #e8e8e8} + .result-box{max-width:918px;padding:16px 0;border-top:1px solid #e8e8e8} .result-box h2{margin-bottom: 10px;font-size:15px;} .result-link{font-size:18px;color:#1a0dab;} .result-link.more{font-size:16px;} @@ -119,6 +121,11 @@ 상담 관리 [${empty counsel.totcnt ? "0":counsel.totcnt}] +
  • + + 사건파일 [${empty file.totcnt ? "0":file.totcnt}] + +
  • @@ -224,6 +231,31 @@ 더보기 + + +
    +

    사건파일

    + +
    + + + ${list.linkText} + + + ${list.linkText} + + + ${list.linkText} + + +
    관련메뉴: ${list.caseType}
    +
    첨부파일명: ${list.fileName}
    +
    첨부파일 내용 : ${list.fileContent}
    +
    +
    + 더보기 +
    +
    diff --git a/src/main/webapp/WEB-INF/jsp/com/srch/searchProcess.jsp b/src/main/webapp/WEB-INF/jsp/com/srch/searchProcess.jsp index f61a4cbb..ac9ad673 100644 --- a/src/main/webapp/WEB-INF/jsp/com/srch/searchProcess.jsp +++ b/src/main/webapp/WEB-INF/jsp/com/srch/searchProcess.jsp @@ -38,6 +38,8 @@ url = '/com/srch/SearchBoard.do'; }else if(type === 'counsel'){ url = '/com/srch/SearchCounsel.do'; + }else if(type === 'file'){ + url = '/com/srch/SearchFile.do'; } document.search.searchType.value = type; document.search.action = url; @@ -66,7 +68,7 @@ .cs-search-lnb li a.on:after{content:'';display:block;position:absolute;left:0;bottom:0;width:100%;height:3px;background:#5f6cd4} .cs-content-search{padding:16px 0 0 163px;} .cs-result-stats{font-size:13px;color:#808080;margin-bottom:38px;} - .result-box{max-width:618px;padding:16px 0;border-top:1px solid #e8e8e8} + .result-box{max-width:918px;padding:16px 0;border-top:1px solid #e8e8e8} .result-box h2{margin-bottom: 10px;font-size:15px;} .result-link{font-size:18px;color:#1a0dab;} .result-link.more{font-size:16px;} @@ -124,6 +126,11 @@ 상담 관리 [${empty counsel.totcnt ? "0":counsel.totcnt}] +
  • + + 사건파일 [${empty file.totcnt ? "0":file.totcnt}] + +
  • diff --git a/src/main/webapp/WEB-INF/views/_extra/gtm/unifiedSearch/searchList.jsp b/src/main/webapp/WEB-INF/views/_extra/gtm/unifiedSearch/searchList.jsp index 0b33b3dd..35f779a4 100644 --- a/src/main/webapp/WEB-INF/views/_extra/gtm/unifiedSearch/searchList.jsp +++ b/src/main/webapp/WEB-INF/views/_extra/gtm/unifiedSearch/searchList.jsp @@ -238,7 +238,7 @@ .cs-search-lnb li a.on:after{content:'';display:block;position:absolute;left:0;bottom:0;width:100%;height:3px;background:#5f6cd4} .cs-content-search{padding:16px 0 0 163px;} .cs-result-stats{font-size:13px;color:#808080;margin-bottom:38px;} - .result-box{max-width:618px;padding:16px 0;border-top:1px solid #e8e8e8} + .result-box{max-width:918px;padding:16px 0;border-top:1px solid #e8e8e8} .result-box h2{margin-bottom: 10px;font-size:15px;} .result-link{font-size:18px;color:#1a0dab;} .result-link.more{font-size:16px;} diff --git a/src/main/webapp/WEB-INF/views/_extra/gtm/unifiedSearch/searchList_new.jsp b/src/main/webapp/WEB-INF/views/_extra/gtm/unifiedSearch/searchList_new.jsp index 39000186..8990e917 100644 --- a/src/main/webapp/WEB-INF/views/_extra/gtm/unifiedSearch/searchList_new.jsp +++ b/src/main/webapp/WEB-INF/views/_extra/gtm/unifiedSearch/searchList_new.jsp @@ -39,7 +39,7 @@ .cs-search-lnb li a.on:after{content:'';display:block;position:absolute;left:0;bottom:0;width:100%;height:3px;background:#5f6cd4} .cs-content-search{padding:16px 0 0 163px;} .cs-result-stats{font-size:13px;color:#808080;margin-bottom:38px;} - .result-box{max-width:618px;padding:16px 0;border-top:1px solid #e8e8e8} + .result-box{max-width:918px;padding:16px 0;border-top:1px solid #e8e8e8} .result-box h2{margin-bottom: 10px;font-size:15px;} .result-link{font-size:18px;color:#1a0dab;} .result-link.more{font-size:16px;}