From 168894bd30f561d339a34077f001828719ab0873 Mon Sep 17 00:00:00 2001 From: KNKIM Date: Wed, 17 Nov 2021 09:50:11 +0900 Subject: [PATCH 01/11] =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../col/service/impl/ReadServiceImpl.java | 2 +- .../java/nlib/col/service/impl/RentDAO.java | 8 - .../nlib/user/web/UserInfoController.java | 2 +- .../mapper/nlib/col/RentDAO_SQL.xml | 10 - .../WEB-INF/jsp/nlib/cmm/headerSubPart.jsp | 4 +- .../WEB-INF/jsp/nlib/userInfo/getMyHome.jsp | 1 + src/main/webapp/WEB-INF/tiles/inc/menu.jsp | 10 - src/main/webapp/js/default.js | 4 +- src/main/webapp/test/callback.html | 22 -- src/main/webapp/test/naverLogin.html | 22 -- src/main/webapp/test/test.html | 230 --------------- src/main/webapp/test/testRest.html | 262 ------------------ 12 files changed, 7 insertions(+), 570 deletions(-) delete mode 100644 src/main/webapp/test/callback.html delete mode 100644 src/main/webapp/test/naverLogin.html delete mode 100644 src/main/webapp/test/test.html delete mode 100644 src/main/webapp/test/testRest.html diff --git a/src/main/java/nlib/col/service/impl/ReadServiceImpl.java b/src/main/java/nlib/col/service/impl/ReadServiceImpl.java index 49c7823a..98e78779 100644 --- a/src/main/java/nlib/col/service/impl/ReadServiceImpl.java +++ b/src/main/java/nlib/col/service/impl/ReadServiceImpl.java @@ -206,7 +206,7 @@ public class ReadServiceImpl implements ReadService { reqVO.setMbInfoId(searchVO.getMbInfoId()); // 통신 시, 암호화되어 송수신됨 reqVO.setPageSize(searchVO.getPageSize()); reqVO.setPageIndex(searchVO.getPageIndex()); - reqVO.putInfoItem("mngOrgCd", StringUtil.getString(searchVO.getMngOrgCd(), "KCCF")); // DDDDDDDDDDDDDDDDDDDd api 변경시까지 유지 + reqVO.putInfoItem("mngOrgCd", searchVO.getMngOrgCd()); reqVO.putInfoItem("reqStatusDivCd", searchVO.getReqStatusDivCd()); return dataApi.request(reqVO); } diff --git a/src/main/java/nlib/col/service/impl/RentDAO.java b/src/main/java/nlib/col/service/impl/RentDAO.java index ac5cca19..bfda4904 100644 --- a/src/main/java/nlib/col/service/impl/RentDAO.java +++ b/src/main/java/nlib/col/service/impl/RentDAO.java @@ -12,12 +12,4 @@ public interface RentDAO { public List> listRentMngOrg(String mbInfoId); - - /** - * 사용자의 대출현황을 조회한다. - * - * @param mbInfoId - * @return - */ - public Map getRentStats(String mbInfoId); } diff --git a/src/main/java/nlib/user/web/UserInfoController.java b/src/main/java/nlib/user/web/UserInfoController.java index 4ed39cbb..e2cc30ef 100644 --- a/src/main/java/nlib/user/web/UserInfoController.java +++ b/src/main/java/nlib/user/web/UserInfoController.java @@ -347,7 +347,7 @@ public class UserInfoController extends NlibCommonController { model.addAttribute("rentTotalCount", resRentVO.getRecordTotCount()); // 방문열람내역 (최근 5개) - searchCollectionVO.setReqStatusDivCd("A"); // API 변경될떄까지 임시 값 보냄 DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD + searchCollectionVO.setReqStatusDivCd(null); DataApiResVO resReadVO = readService.listReadItems(searchCollectionVO); List readList = collectionService.setDetailInfoForHashList(resReadVO.getRecordList(), searchCollectionVO.getMbInfoId(), NlibProperty.getString("thumbnail.image.url.small")); model.addAttribute("readList", readList); diff --git a/src/main/resources/egovframework/mapper/nlib/col/RentDAO_SQL.xml b/src/main/resources/egovframework/mapper/nlib/col/RentDAO_SQL.xml index 8682bbfb..e552d611 100644 --- a/src/main/resources/egovframework/mapper/nlib/col/RentDAO_SQL.xml +++ b/src/main/resources/egovframework/mapper/nlib/col/RentDAO_SQL.xml @@ -20,14 +20,4 @@ ORDER BY C.DEPT_NM - \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/nlib/cmm/headerSubPart.jsp b/src/main/webapp/WEB-INF/jsp/nlib/cmm/headerSubPart.jsp index f96ec1db..ec5f48ad 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/cmm/headerSubPart.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/cmm/headerSubPart.jsp @@ -62,14 +62,14 @@ function fn_getMemberCard() {
    -
  • +
  • -
  • +
  • diff --git a/src/main/webapp/WEB-INF/jsp/nlib/userInfo/getMyHome.jsp b/src/main/webapp/WEB-INF/jsp/nlib/userInfo/getMyHome.jsp index 1b25df5a..ad1f430c 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/userInfo/getMyHome.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/userInfo/getMyHome.jsp @@ -229,6 +229,7 @@
    ${item.reqStatusDivNm} ${item.reqStatusDivNm} + ${item.reqStatusDivNm} ${item.reqStatusDivNm} ${item.reqStatusDivNm} ${item.reqStatusDivNm} diff --git a/src/main/webapp/WEB-INF/tiles/inc/menu.jsp b/src/main/webapp/WEB-INF/tiles/inc/menu.jsp index fe3bf79a..c19038b8 100644 --- a/src/main/webapp/WEB-INF/tiles/inc/menu.jsp +++ b/src/main/webapp/WEB-INF/tiles/inc/menu.jsp @@ -56,16 +56,6 @@ $(document).ready(function() {
  • 관심자료
  • 대출관리
  • 방문열람관리
  • - - -
  • --- 이하 임시 추가 메뉴 ---
  • -
  • ID/PW찾기
  • -
  • 암호화
  • -
  • 환경설정갱신
  • -
  • 코드조회
  • -
  • API샘플
  • - -
diff --git a/src/main/webapp/js/default.js b/src/main/webapp/js/default.js index d30e3766..3c0a9780 100644 --- a/src/main/webapp/js/default.js +++ b/src/main/webapp/js/default.js @@ -123,9 +123,9 @@ $(document).ready(function(){ jQuery(function($) { // 상세검색 팝업 열기 $('.btn-search-detail').on('click', function () { - // 클릭 시, 컨텐츠 로딩되도록 처리 (2021.10.20 DDDDDDDDDD 추가) : 시작 + // 클릭 시, 컨텐츠 로딩되도록 처리 (2021.10.20 NLIB 추가) : 시작 fn_layerPopWithClass("/search/getDetailedSearchFormPopup.do", "popup pop-advanced-search"); - // 클릭 시, 컨텐츠 로딩되도록 처리 (2021.10.20 DDDDDDDDDD 추가) : 종료 + // 클릭 시, 컨텐츠 로딩되도록 처리 (2021.10.20 NLIB 추가) : 종료 }); }); diff --git a/src/main/webapp/test/callback.html b/src/main/webapp/test/callback.html deleted file mode 100644 index fe4b3854..00000000 --- a/src/main/webapp/test/callback.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/main/webapp/test/naverLogin.html b/src/main/webapp/test/naverLogin.html deleted file mode 100644 index 400ba602..00000000 --- a/src/main/webapp/test/naverLogin.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - 네이버 로그인 - - - - - - - - - \ No newline at end of file diff --git a/src/main/webapp/test/test.html b/src/main/webapp/test/test.html deleted file mode 100644 index cd2b8f46..00000000 --- a/src/main/webapp/test/test.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -소장자료관 - - - - - - -
- - - - - - - - - - - - -Insert title here - - -가입되셨습니다. 환영합니다 - - - - - - -
- - - - - - - \ No newline at end of file diff --git a/src/main/webapp/test/testRest.html b/src/main/webapp/test/testRest.html deleted file mode 100644 index 62994b79..00000000 --- a/src/main/webapp/test/testRest.html +++ /dev/null @@ -1,262 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -소장자료관 - - - - - - -
- - - - - - - - - - - - - - - - - - -
-

안내 섹션영역

-
-
-
자물쇠 아이콘
-

로그인 및 회원가입 안내

-
-
-
-
-
-

먼저 회원가입하신 후, 이용하여 주시기 바랍니다.

-
-
-

위의 안내 메시지를 확인하신 후, 다시 로그인하시거나 회원가입을 진행해 주시기 바랍니다.

-
-
- 홈으로 -   -   - -   -   - - - 회원가입 - -
-
-
-
-
-
- - - - -
- - -
-
- - - \ No newline at end of file From b59d335428009fddfeee8ede071929ce04330296 Mon Sep 17 00:00:00 2001 From: KNKIM Date: Wed, 17 Nov 2021 09:55:44 +0900 Subject: [PATCH 02/11] =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/temp/grid_dropzone.html | 34 ------------- src/main/webapp/temp/grid_jqgrid.html | 41 ---------------- src/main/webapp/temp/grid_jsgrid.html | 57 ---------------------- src/main/webapp/temp/grid_w2ui.html | 40 --------------- src/main/webapp/temp/layerPopup.html | 51 ------------------- src/main/webapp/temp/layerPopup2.html | 45 ----------------- src/main/webapp/temp/layerPopup_data1.html | 10 ---- 7 files changed, 278 deletions(-) delete mode 100644 src/main/webapp/temp/grid_dropzone.html delete mode 100644 src/main/webapp/temp/grid_jqgrid.html delete mode 100644 src/main/webapp/temp/grid_jsgrid.html delete mode 100644 src/main/webapp/temp/grid_w2ui.html delete mode 100644 src/main/webapp/temp/layerPopup.html delete mode 100644 src/main/webapp/temp/layerPopup2.html delete mode 100644 src/main/webapp/temp/layerPopup_data1.html diff --git a/src/main/webapp/temp/grid_dropzone.html b/src/main/webapp/temp/grid_dropzone.html deleted file mode 100644 index dccd17d8..00000000 --- a/src/main/webapp/temp/grid_dropzone.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - -
-
-
-
- 이곳에 파일을 끌어다 놓거나, 클릭하여 올릴 파일을 선택하세요. -
-
-
- - - - - diff --git a/src/main/webapp/temp/grid_jqgrid.html b/src/main/webapp/temp/grid_jqgrid.html deleted file mode 100644 index 9d08ae24..00000000 --- a/src/main/webapp/temp/grid_jqgrid.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - -Grid - - - - - - -
- - - - - \ No newline at end of file diff --git a/src/main/webapp/temp/grid_jsgrid.html b/src/main/webapp/temp/grid_jsgrid.html deleted file mode 100644 index ca517566..00000000 --- a/src/main/webapp/temp/grid_jsgrid.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - -Grid - - - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/src/main/webapp/temp/grid_w2ui.html b/src/main/webapp/temp/grid_w2ui.html deleted file mode 100644 index 08a2a881..00000000 --- a/src/main/webapp/temp/grid_w2ui.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - -Grid - - - - - -
- - - - - \ No newline at end of file diff --git a/src/main/webapp/temp/layerPopup.html b/src/main/webapp/temp/layerPopup.html deleted file mode 100644 index 5688a228..00000000 --- a/src/main/webapp/temp/layerPopup.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - -Insert title here - - - - | - | - - - - - - - - - \ No newline at end of file diff --git a/src/main/webapp/temp/layerPopup2.html b/src/main/webapp/temp/layerPopup2.html deleted file mode 100644 index ac793f9b..00000000 --- a/src/main/webapp/temp/layerPopup2.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - -Insert title here - - - - - - - - - - - - - -

-
POP
- - \ No newline at end of file diff --git a/src/main/webapp/temp/layerPopup_data1.html b/src/main/webapp/temp/layerPopup_data1.html deleted file mode 100644 index 42c83801..00000000 --- a/src/main/webapp/temp/layerPopup_data1.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - -감사 - - -감사합니다. - - \ No newline at end of file From fbac987dd1b2cf6f507677593e5c59154d20e7f3 Mon Sep 17 00:00:00 2001 From: KNKIM Date: Wed, 17 Nov 2021 10:51:48 +0900 Subject: [PATCH 03/11] =?UTF-8?q?DB=20Pool=20=EC=97=B0=EA=B2=B0=20?= =?UTF-8?q?=EC=9C=A0=EC=A7=80=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../spring/context-datasource.xml | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/main/resources/egovframework/spring/context-datasource.xml b/src/main/resources/egovframework/spring/context-datasource.xml index 8304b063..c65d8681 100644 --- a/src/main/resources/egovframework/spring/context-datasource.xml +++ b/src/main/resources/egovframework/spring/context-datasource.xml @@ -24,7 +24,17 @@ + + + + + + + + + + @@ -33,17 +43,6 @@ - + - - - - - - From fc027dd05fb760028b83ef1eeff0b195c6cf4969 Mon Sep 17 00:00:00 2001 From: KNKIM Date: Wed, 17 Nov 2021 11:13:51 +0900 Subject: [PATCH 04/11] =?UTF-8?q?=EA=B6=8C=ED=95=9C=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/nlib/bbs/web/QnaController.java | 5 +++++ src/main/java/nlib/cmm/web/NotificationController.java | 2 ++ src/main/java/nlib/col/web/CartController.java | 2 ++ src/main/java/nlib/user/web/UserInfoController.java | 2 ++ src/main/webapp/WEB-INF/jsp/nlib/cmm/listNotifications.jsp | 1 - 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/nlib/bbs/web/QnaController.java b/src/main/java/nlib/bbs/web/QnaController.java index 94cab854..371a2658 100644 --- a/src/main/java/nlib/bbs/web/QnaController.java +++ b/src/main/java/nlib/bbs/web/QnaController.java @@ -15,6 +15,7 @@ import org.apache.commons.lang.StringEscapeUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.ResponseEntity; +import org.springframework.security.access.annotation.Secured; import org.springframework.security.core.Authentication; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; @@ -168,6 +169,7 @@ public class QnaController extends NlibCommonController { * @param req * @return */ + @Secured("ROLE_USER") @RequestMapping({"/bbs/insertQnaForm.do", "/bbs/updateQnaForm.do"}) public String insertQnaForm( HttpServletRequest request @@ -213,6 +215,7 @@ public class QnaController extends NlibCommonController { * @param model * @return */ + @Secured("ROLE_USER") @RequestMapping("/bbs/insertQnaArticle.do") public String insertQna(HttpServletRequest request , Authentication authentication @@ -332,6 +335,7 @@ public class QnaController extends NlibCommonController { * @param req * @return */ + @Secured("ROLE_USER") @RequestMapping("/bbs/updateQnaArticle.do") public String updateQnaArticle( HttpServletRequest request @@ -504,6 +508,7 @@ public class QnaController extends NlibCommonController { * @param req * @return */ + @Secured("ROLE_USER") @RequestMapping("/bbs/deleteQnaArticle.do") public String deleteQnaArticle( HttpServletRequest request diff --git a/src/main/java/nlib/cmm/web/NotificationController.java b/src/main/java/nlib/cmm/web/NotificationController.java index c3d691b7..60177dd7 100644 --- a/src/main/java/nlib/cmm/web/NotificationController.java +++ b/src/main/java/nlib/cmm/web/NotificationController.java @@ -69,6 +69,7 @@ public class NotificationController extends NlibCommonController { * @param req * @return */ + @Secured("ROLE_USER") @RequestMapping("/cmm/listNotifications.do") public String listNotifications( HttpServletRequest req, @@ -158,6 +159,7 @@ public class NotificationController extends NlibCommonController { * @param req * @return */ + @Secured("ROLE_USER") @RequestMapping("/cmm/selectNotificationAjax.do") public ResponseEntity selectNotificationAjax(HttpServletRequest req, Authentication authentication, @RequestBody Map paramMap) throws Exception { diff --git a/src/main/java/nlib/col/web/CartController.java b/src/main/java/nlib/col/web/CartController.java index 8a376d19..859fb843 100644 --- a/src/main/java/nlib/col/web/CartController.java +++ b/src/main/java/nlib/col/web/CartController.java @@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.ResponseEntity; +import org.springframework.security.access.annotation.Secured; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestBody; @@ -281,6 +282,7 @@ public class CartController extends NlibCommonController * @return * @throws Exception */ + @Secured("ROLE_USER") @RequestMapping("/cart/mergeCartItemsAjax.do") public ResponseEntity mergeCartItemsAjax(HttpServletRequest request, HttpServletResponse response, ModelMap model) throws Exception { diff --git a/src/main/java/nlib/user/web/UserInfoController.java b/src/main/java/nlib/user/web/UserInfoController.java index e2cc30ef..c6599dd1 100644 --- a/src/main/java/nlib/user/web/UserInfoController.java +++ b/src/main/java/nlib/user/web/UserInfoController.java @@ -240,6 +240,7 @@ public class UserInfoController extends NlibCommonController { * @param model * @return */ + @Secured("ROLE_USER") @RequestMapping(value="/userInfo/getMemberQrcodeFormPopup.do") public String getMemberQrcodeFormPopup(HttpServletRequest request, ModelMap model) { @@ -262,6 +263,7 @@ public class UserInfoController extends NlibCommonController { * @return * @throws Exception */ + @Secured("ROLE_USER") @RequestMapping(value="/userInfo/getMemberQrcode.do", produces=MediaType.IMAGE_JPEG_VALUE) public ResponseEntity getMemberQrcode(HttpServletRequest request, HttpServletResponse response) throws Exception { diff --git a/src/main/webapp/WEB-INF/jsp/nlib/cmm/listNotifications.jsp b/src/main/webapp/WEB-INF/jsp/nlib/cmm/listNotifications.jsp index bb8d782f..7de2541a 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/cmm/listNotifications.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/cmm/listNotifications.jsp @@ -196,7 +196,6 @@ $( document ).ready(function() { 0

- 최근 한달동안 발송된 알림 내역만 보관됩니다.

-
From 38e8f018fc392954ed81ab0e94ffa35971d92dc8 Mon Sep 17 00:00:00 2001 From: KNKIM Date: Wed, 17 Nov 2021 11:14:00 +0900 Subject: [PATCH 05/11] =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/nlib/col/service/ReserveService.java | 10 ---- .../nlib/col/service/impl/ReserveDAO.java | 16 ------- .../col/service/impl/ReserveServiceImpl.java | 20 -------- .../java/nlib/col/web/ReserveController.java | 48 ------------------- 4 files changed, 94 deletions(-) delete mode 100644 src/main/java/nlib/col/service/ReserveService.java delete mode 100644 src/main/java/nlib/col/service/impl/ReserveDAO.java delete mode 100644 src/main/java/nlib/col/service/impl/ReserveServiceImpl.java delete mode 100644 src/main/java/nlib/col/web/ReserveController.java diff --git a/src/main/java/nlib/col/service/ReserveService.java b/src/main/java/nlib/col/service/ReserveService.java deleted file mode 100644 index 456e343f..00000000 --- a/src/main/java/nlib/col/service/ReserveService.java +++ /dev/null @@ -1,10 +0,0 @@ -package nlib.col.service; - -import nlib.restful.service.DataApiReqVO; -import nlib.restful.service.DataApiResVO; - -public interface ReserveService -{ - - -} \ No newline at end of file diff --git a/src/main/java/nlib/col/service/impl/ReserveDAO.java b/src/main/java/nlib/col/service/impl/ReserveDAO.java deleted file mode 100644 index 83563578..00000000 --- a/src/main/java/nlib/col/service/impl/ReserveDAO.java +++ /dev/null @@ -1,16 +0,0 @@ -package nlib.col.service.impl; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Repository; - -import nlib.restful.DataApi; -import nlib.restful.service.DataApiReqVO; -import nlib.restful.service.DataApiResVO; - -@Repository("reserveDAO") -public class ReserveDAO extends DataApi -{ - private static final Logger log = LoggerFactory.getLogger(ReserveDAO.class); - -} \ No newline at end of file diff --git a/src/main/java/nlib/col/service/impl/ReserveServiceImpl.java b/src/main/java/nlib/col/service/impl/ReserveServiceImpl.java deleted file mode 100644 index 5fc995a9..00000000 --- a/src/main/java/nlib/col/service/impl/ReserveServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package nlib.col.service.impl; - -import javax.annotation.Resource; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Service; - -import nlib.col.service.ReserveService; -import nlib.restful.service.DataApiReqVO; -import nlib.restful.service.DataApiResVO; - -@Service("reserveService") -public class ReserveServiceImpl implements ReserveService -{ - private static final Logger log = LoggerFactory.getLogger(ReserveServiceImpl.class); - - @Resource(name="reserveDAO") - private ReserveDAO reserveDAO; -} \ No newline at end of file diff --git a/src/main/java/nlib/col/web/ReserveController.java b/src/main/java/nlib/col/web/ReserveController.java deleted file mode 100644 index 010d8dee..00000000 --- a/src/main/java/nlib/col/web/ReserveController.java +++ /dev/null @@ -1,48 +0,0 @@ -package nlib.col.web; - -import javax.annotation.Resource; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Controller; - -import nlib.cmm.NlibCommonController; -import nlib.cmm.service.CodeService; -import nlib.cmm.service.NlibProperty; -import nlib.col.service.RentService; - -/** - *
- * @Class Name : ReserveController.java
- * 
- * @Description : 자료열람 컨트롤러
- * 
- * 
- * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
- *
- * 
- * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 10. 01. JSYOO 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP JSYOO - * @since 2021. 10. 01. - * @version 1.0 - * - */ -@Controller -public class ReserveController extends NlibCommonController -{ - private static final Logger log = LoggerFactory.getLogger(ReserveController.class); - static final String DEFUALT_PAGE_SIZE = NlibProperty.getProperty("list.paging.page.size"); - - @Resource(name = "rentService") - private RentService rentService; - - @Resource(name = "codeService") - private CodeService codeService; - -} \ No newline at end of file From d894ce5b21052cf2fdecf2e4540c88a40904a0e2 Mon Sep 17 00:00:00 2001 From: KNKIM Date: Wed, 17 Nov 2021 11:27:35 +0900 Subject: [PATCH 06/11] =?UTF-8?q?=EB=AC=B8=ED=99=94=EC=9B=90=EB=AA=85=20?= =?UTF-8?q?=EC=B6=9C=EB=A0=A5=20=EB=B3=B4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/nlib/cmm/web/MainController.java | 1 + src/main/webapp/WEB-INF/jsp/nlib/cmm/home.jsp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/nlib/cmm/web/MainController.java b/src/main/java/nlib/cmm/web/MainController.java index c101896b..da39374f 100644 --- a/src/main/java/nlib/cmm/web/MainController.java +++ b/src/main/java/nlib/cmm/web/MainController.java @@ -96,6 +96,7 @@ public class MainController extends NlibCommonController { model.addAttribute("listKeywords", listKeywords); // 문화원 PICK + model.addAttribute("mngOrgNm", getCurCouncilNm(request)); model.addAttribute("listOrgPicks", mainService.listOrgPicks(mngOrgCd)); // 유형별 인기자료 diff --git a/src/main/webapp/WEB-INF/jsp/nlib/cmm/home.jsp b/src/main/webapp/WEB-INF/jsp/nlib/cmm/home.jsp index e5fb3909..82c9ebbe 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/cmm/home.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/cmm/home.jsp @@ -143,7 +143,7 @@ function fn_listPops(typeDivCd) {

문화원's Pick

-

경주문화원이 추천하는 자료를 만나보세요!

+

${mngOrgNm } 추천하는 자료를 만나보세요!

From 982db041efee46dbe8815e4f2ee04fe3fd273b58 Mon Sep 17 00:00:00 2001 From: JSYOO Date: Wed, 17 Nov 2021 12:18:19 +0900 Subject: [PATCH 07/11] =?UTF-8?q?=EB=82=B4=EC=A0=95=EB=B3=B4=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20=EC=BF=BC=EB=A6=AC=20=EC=88=98=EC=A0=95,=20?= =?UTF-8?q?=EC=86=8C=EC=9E=A5=EC=9E=90=EB=A3=8C=20=EA=B2=80=EC=83=89?= =?UTF-8?q?=EA=B2=B0=EA=B3=BC=EC=97=86=EC=9D=84=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/NlibSearchServiceImpl.java | 175 +++++++++--------- .../java/nlib/user/web/MemberController.java | 3 +- .../nlib/user/web/UserInfoController.java | 19 +- .../mapper/nlib/user/LoginDAO_SQL.xml | 4 +- .../WEB-INF/jsp/nlib/cmm/headerSubPart.jsp | 4 +- .../jsp/nlib/collection/listInterests.jsp | 68 ++++--- .../jsp/nlib/collection/searchList.jsp | 57 +++++- .../search/getDetailedSearchFormPopup.jsp | 4 +- src/main/webapp/js/search/reference.js | 4 +- 9 files changed, 217 insertions(+), 121 deletions(-) diff --git a/src/main/java/nlib/sch/service/impl/NlibSearchServiceImpl.java b/src/main/java/nlib/sch/service/impl/NlibSearchServiceImpl.java index 28e19566..08c37548 100644 --- a/src/main/java/nlib/sch/service/impl/NlibSearchServiceImpl.java +++ b/src/main/java/nlib/sch/service/impl/NlibSearchServiceImpl.java @@ -194,98 +194,103 @@ public class NlibSearchServiceImpl implements NlibSearchService{ { //주제분야 , 자료유형 ,생산기관 별 카운트 tmpList = (JsonArray) tmp.get("CategoryGroup"); - - for( k=0; k < tmpList.size(); k++){ - filterObject = (JsonObject) tmpList.get(k); - - if(filterObject.get("SUBJECT_CATE") != null) - { - subjectList = (JsonArray) filterObject.get("SUBJECT_CATE"); - } - if(filterObject.get("DIV_CATE") != null) - { - typeList = (JsonArray) filterObject.get("DIV_CATE"); - } - if(filterObject.get("ORG_NM") != null) - { - orgList = (JsonArray) filterObject.get("ORG_NM"); - } - } - if(subjectList.size()>0) + if(tmpList != null) { - filterObject =(JsonObject) subjectList.get(0); - filterObject = (JsonObject) filterObject.get("Categories"); - subjectList = (JsonArray) filterObject.get("Category"); - }; - if(typeList.size()>0) - { - filterObject =(JsonObject) typeList.get(0); - filterObject = (JsonObject) filterObject.get("Categories"); - typeList = (JsonArray) filterObject.get("Category"); - }; - if(orgList.size()>0) - { - filterObject =(JsonObject) orgList.get(0); - filterObject = (JsonObject) filterObject.get("Categories"); - orgList = (JsonArray) filterObject.get("Category"); - }; - for(k = 0; k < subjectList.size(); k++){ - HashMap temp = new HashMap(); - filterObject = (JsonObject)subjectList.get(k); - nameTemp = filterObject.get("Name").getAsString(); - //상위코드값 - code_up = nameTemp.substring(nameTemp.indexOf("@")+1,nameTemp.indexOf("^")); - temp.put("category_nm_up",code_up); - - //코드값 - code = nameTemp.substring(nameTemp.lastIndexOf("@")+1); - temp.put("category_nm",code); - temp.put("category_cnt",filterObject.get("Count").getAsString()); - subjectMap.add(temp); - } - for(k = 0; k < typeList.size(); k++){ - HashMap temp = new HashMap(); - filterObject = (JsonObject)typeList.get(k); - nameTemp = filterObject.get("Name").getAsString(); - //상위코드값 - code_up = nameTemp.substring(nameTemp.indexOf("@")+1,nameTemp.indexOf("^")); - temp.put("class_nm_up",code_up); - - //코드값 - code = nameTemp.substring(nameTemp.lastIndexOf("@")+1); - temp.put("class_nm",code); - temp.put("class_cnt",filterObject.get("Count").getAsString()); - typeMap.add(temp); - } - for(k = 0; k < orgList.size(); k++){ - HashMap temp = new HashMap(); - filterObject = (JsonObject)orgList.get(k); - nameTemp = filterObject.get("Name").getAsString(); - if(!"null".equals(nameTemp)) { - temp.put("org_nm",nameTemp); - temp.put("org_cnt",filterObject.get("Count").getAsString()); - orgMap.add(temp); - } + for( k=0; k < tmpList.size(); k++){ + filterObject = (JsonObject) tmpList.get(k); + + if(filterObject.get("SUBJECT_CATE") != null) + { + subjectList = (JsonArray) filterObject.get("SUBJECT_CATE"); + } + if(filterObject.get("DIV_CATE") != null) + { + typeList = (JsonArray) filterObject.get("DIV_CATE"); + } + if(filterObject.get("ORG_NM") != null) + { + orgList = (JsonArray) filterObject.get("ORG_NM"); + } + } + if(subjectList.size()>0) + { + filterObject =(JsonObject) subjectList.get(0); + filterObject = (JsonObject) filterObject.get("Categories"); + subjectList = (JsonArray) filterObject.get("Category"); + }; + if(typeList.size()>0) + { + filterObject =(JsonObject) typeList.get(0); + filterObject = (JsonObject) filterObject.get("Categories"); + typeList = (JsonArray) filterObject.get("Category"); + }; + if(orgList.size()>0) + { + filterObject =(JsonObject) orgList.get(0); + filterObject = (JsonObject) filterObject.get("Categories"); + orgList = (JsonArray) filterObject.get("Category"); + }; + for(k = 0; k < subjectList.size(); k++){ + HashMap temp = new HashMap(); + filterObject = (JsonObject)subjectList.get(k); + nameTemp = filterObject.get("Name").getAsString(); + //상위코드값 + code_up = nameTemp.substring(nameTemp.indexOf("@")+1,nameTemp.indexOf("^")); + temp.put("category_nm_up",code_up); + + //코드값 + code = nameTemp.substring(nameTemp.lastIndexOf("@")+1); + temp.put("category_nm",code); + temp.put("category_cnt",filterObject.get("Count").getAsString()); + subjectMap.add(temp); + } + for(k = 0; k < typeList.size(); k++){ + HashMap temp = new HashMap(); + filterObject = (JsonObject)typeList.get(k); + nameTemp = filterObject.get("Name").getAsString(); + //상위코드값 + code_up = nameTemp.substring(nameTemp.indexOf("@")+1,nameTemp.indexOf("^")); + temp.put("class_nm_up",code_up); + + //코드값 + code = nameTemp.substring(nameTemp.lastIndexOf("@")+1); + temp.put("class_nm",code); + temp.put("class_cnt",filterObject.get("Count").getAsString()); + typeMap.add(temp); + } + for(k = 0; k < orgList.size(); k++){ + HashMap temp = new HashMap(); + filterObject = (JsonObject)orgList.get(k); + nameTemp = filterObject.get("Name").getAsString(); + if(!"null".equals(nameTemp)) { + temp.put("org_nm",nameTemp); + temp.put("org_cnt",filterObject.get("Count").getAsString()); + orgMap.add(temp); + } + } } tmp = (JsonObject) tmp.get("DocumentSet"); searchVO.setTotalCount(tmp.get("TotalCount").getAsString()); colArray = (JsonArray) tmp.get("Document"); - //vo list로 json list 파싱 - for(j=0;j snsList = new ArrayList(); @@ -158,6 +173,7 @@ public class UserInfoController extends NlibCommonController { * @return * @exception Exception */ + @Secured("ROLE_USER") @RequestMapping(value="/userInfo/updateMyInfo.do" , method=RequestMethod.POST) public String updateMyInfo(NlibLoginVO vo,Authentication authentication,HttpServletResponse response,HttpServletRequest request,ModelMap model) throws Exception{ @@ -209,6 +225,7 @@ public class UserInfoController extends NlibCommonController { * 내 정보 수정 전 password 인증 * @exception Exception */ + @Secured("ROLE_USER") @RequestMapping(value="/userInfo/pwCertMyInfo.do") public String pwCertMyInfo(HttpServletResponse response,HttpServletRequest request,ModelMap model) throws Exception{ NlibLoginVO nlibLoginVO = getNlibLoginVO(request); diff --git a/src/main/resources/egovframework/mapper/nlib/user/LoginDAO_SQL.xml b/src/main/resources/egovframework/mapper/nlib/user/LoginDAO_SQL.xml index 5a496088..e67fa76a 100644 --- a/src/main/resources/egovframework/mapper/nlib/user/LoginDAO_SQL.xml +++ b/src/main/resources/egovframework/mapper/nlib/user/LoginDAO_SQL.xml @@ -37,9 +37,9 @@ FROM UAC_CLTR_DB.MB_INFO A /* 사용자정보 */ JOIN UAC_CLTR_DB.MB_SNS B /* 사용자 SNS 정보 */ ON A.MB_INFO_ID = B.MB_INFO_ID - WHERE B.SNS_ID = #{snsId} - AND UPPER(SNS_TYPE) = UPPER(#{snsType}) + WHERE A.MB_INFO_ID = #{mbInfoId} AND B.UNLINK_DD IS NULL /* 연동해제건 제외 */ + ORDER BY B.REG_DD LIMIT 1 ]]> diff --git a/src/main/webapp/WEB-INF/jsp/nlib/cmm/headerSubPart.jsp b/src/main/webapp/WEB-INF/jsp/nlib/cmm/headerSubPart.jsp index ec5f48ad..a8a43ab3 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/cmm/headerSubPart.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/cmm/headerSubPart.jsp @@ -17,10 +17,10 @@ $(document).ready(function() { }); function goSearch(){ - if($("#top_query").val() != "") + /* if($("#top_query").val() != "") { $('#searchHeaderForm input[name=filter_mylist]').val("search_query,"); - } + } */ document.searchHeaderForm.submit(); } diff --git a/src/main/webapp/WEB-INF/jsp/nlib/collection/listInterests.jsp b/src/main/webapp/WEB-INF/jsp/nlib/collection/listInterests.jsp index a5beac5d..0052300e 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/collection/listInterests.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/collection/listInterests.jsp @@ -154,7 +154,6 @@ // 출력 $.each(jsonObj.data,function(key,obj) { var t_data = ""; - var count = 0; t_data += ""; t_data += "
" @@ -184,32 +183,55 @@ t_data += "
" t_data += "
" - if(!fn_isEmpty(obj.typeCodeNm)) - { - count += 1; - t_data += "자료유형 : " + obj.typeCodeNm + " > " + obj.dtlsTypeDivNm + "" + + t_data += "자료유형 : " + if(!fn_isEmpty(obj.typeCodeNm)){ + t_data += obj.typeCodeNm } - if(!fn_isEmpty(obj.subjectNmUp)) - { - if(count > 0) - t_data += " | "; - count += 1; - t_data += "주제분야 : " + obj.subjectNmUp + " > " + obj.subjectNm + "" + if(!fn_isEmpty(obj.typeCodeNm) && !fn_isEmpty(obj.dtlsTypeDivNm)){ + t_data += " > " } - if(!fn_isEmpty(obj.orgNm)) - { - if(count > 0) - t_data += " | "; - count += 1; - t_data += "생산기관 : " + obj.orgNm + "" + if(fn_isEmpty(obj.typeCodeNm) && fn_isEmpty(obj.dtlsTypeDivNm)){ + t_data += "-" } - if(!fn_isEmpty(obj.creatYyyy)) - { - if(count > 0) - t_data += " | "; - count += 1; - t_data += "생산년도 : " + obj.creatYyyy + "" + if(!fn_isEmpty(obj.dtlsTypeDivNm)){ + t_data += obj.dtlsTypeDivNm } + t_data += "" + + t_data += "  |  " + t_data += "주제분야 : " + if(!fn_isEmpty(obj.subjectNmUp)){ + t_data += obj.subjectNmUp + } + if(!fn_isEmpty(obj.subjectNmUp) && !fn_isEmpty(obj.subjectNm)){ + t_data += " > " + } + if(fn_isEmpty(obj.subjectNmUp) && fn_isEmpty(obj.subjectNm)){ + t_data += "-" + } + if(!fn_isEmpty(obj.subjectNm)){ + t_data += obj.subjectNm + } + t_data += "" + + t_data += "  |  " + t_data += "생산기관 : " + if(!fn_isEmpty(obj.orgNm)){ + t_data += obj.orgNm + }else{ + t_data += "-" + } + t_data += "" + + t_data += "  |  " + t_data += "생산년도 : " + if(!fn_isEmpty(obj.creatYyyy)){ + t_data += obj.creatYyyy + }else{ + t_data += "-" + } + t_data += "" t_data += "
" var t_btn = ""; diff --git a/src/main/webapp/WEB-INF/jsp/nlib/collection/searchList.jsp b/src/main/webapp/WEB-INF/jsp/nlib/collection/searchList.jsp index 52d69b2d..f4197a66 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/collection/searchList.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/collection/searchList.jsp @@ -131,6 +131,52 @@ function fnSetInitialValue() $("#m-year-1").prop('checked',true); } } + + +function goSearchNculture() { + + var form = document.createElement("form"); + form.style.display = "none"; + $(form).attr("action", "https://www.nculture.org/sch/totalSearchList.do"); + $(form).attr("method", "post"); + $(form).attr("target", "_blank"); + + var collection = document.createElement("input"); + $(collection).attr("name", "collection"); + $(collection).attr("value","reference_Coll"); + form.appendChild(collection); + + if(!fn_isEmpty($("#query").val())) + { + var query = document.createElement("input"); + $(query).attr("name", "query"); + $(query).attr("value", $("#query").val()); + form.appendChild(query); + } + if(!fn_isEmpty($("#reQuery").val())) + { + var reQuery = document.createElement("input"); + $(reQuery).attr("name", "reQuery"); + $(reQuery).attr("value", $("#reQuery").val()); + form.appendChild(reQuery); + } + if(!fn_isEmpty($("#filter_mylist").val())) + { + var filter_mylist = document.createElement("input"); + $(filter_mylist).attr("name", "filter_mylist"); + $(filter_mylist).attr("value", "category_A01,"); + form.appendChild(filter_mylist); + } + + document.body.appendChild(form); + form.submit(); + + document.body.removeChild(form); + + return; +} + + //탭 이동 function fnTabMoveSch(collection){ $("#collection").val(collection); @@ -443,9 +489,14 @@ function fn_search_article(pageIndex) {
-
  • - 검색결과가 없습니다. -
  • +
    +
    +

    느낌표 아이콘

    +

    검색된 결과가 없습니다

    +

    지역N문화에서 더 많은 자료를 확인하세요!

    +

    +
    +
    diff --git a/src/main/webapp/WEB-INF/jsp/nlib/search/getDetailedSearchFormPopup.jsp b/src/main/webapp/WEB-INF/jsp/nlib/search/getDetailedSearchFormPopup.jsp index 480edc23..797ee68d 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/search/getDetailedSearchFormPopup.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/search/getDetailedSearchFormPopup.jsp @@ -223,11 +223,11 @@ function d_search(){ }else{ $("#d_filter_creatYyyy").val("all"); } - if($("#d_query").val() != "") +/* if($("#d_query").val() != "") { filter_myList+= "search_query,"; } - if($("#d_bookIndex").val() != "") + */ if($("#d_bookIndex").val() != "") { filter_myList+= "search_bookIndex,"; } diff --git a/src/main/webapp/js/search/reference.js b/src/main/webapp/js/search/reference.js index 2eca2fe7..b4ac3a39 100644 --- a/src/main/webapp/js/search/reference.js +++ b/src/main/webapp/js/search/reference.js @@ -310,9 +310,9 @@ function fnLabel_reference(){ }else if(mylist_arr[j].indexOf("agency") >= 0){ var second_cate_nm = mylist_arr[j].substring(mylist_arr[j].indexOf("_")+1); $("#reference_fillter_append").append("
  • 생산기관 > "+ second_cate_nm + "
  • ").text(); - }else if(mylist_arr[j].indexOf("search_query") >= 0){ + }/*else if(mylist_arr[j].indexOf("search_query") >= 0){ $("#reference_fillter_append").append("
  • 검색어 > "+ $("#realQuery").val() + "
  • ").text(); - }else if(mylist_arr[j].indexOf("search_bookIndex") >= 0){ + }*/else if(mylist_arr[j].indexOf("search_bookIndex") >= 0){ $("#reference_fillter_append").append("
  • 목차 > "+ $("#bookIndex").val() + "
  • ").text(); }else if(mylist_arr[j].indexOf("search_mngtNo") >= 0){ $("#reference_fillter_append").append("
  • 관리번호 > "+ $("#mngtNo").val() + "
  • ").text(); From 835593d324e1e93ccb3c6e92765e8687422ea502 Mon Sep 17 00:00:00 2001 From: JSYOO Date: Wed, 17 Nov 2021 12:18:40 +0900 Subject: [PATCH 08/11] =?UTF-8?q?=EC=BB=A4=EB=B0=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/WEB-INF/jsp/nlib/collection/searchList.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/WEB-INF/jsp/nlib/collection/searchList.jsp b/src/main/webapp/WEB-INF/jsp/nlib/collection/searchList.jsp index f4197a66..38ee9178 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/collection/searchList.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/collection/searchList.jsp @@ -145,7 +145,7 @@ function goSearchNculture() { $(collection).attr("name", "collection"); $(collection).attr("value","reference_Coll"); form.appendChild(collection); - + if(!fn_isEmpty($("#query").val())) { var query = document.createElement("input"); From 0f84dc08fd67e9c9b07ed31028592aa214eb6315 Mon Sep 17 00:00:00 2001 From: KNKIM Date: Wed, 17 Nov 2021 12:26:22 +0900 Subject: [PATCH 09/11] =?UTF-8?q?=EC=86=8C=EC=8A=A4=20=EC=9D=B4=EC=83=81?= =?UTF-8?q?=20=EC=B6=A9=EB=8F=8C=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/WEB-INF/jsp/nlib/cmm/headerSubPart.jsp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/nlib/cmm/headerSubPart.jsp b/src/main/webapp/WEB-INF/jsp/nlib/cmm/headerSubPart.jsp index ec5f48ad..a8a43ab3 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/cmm/headerSubPart.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/cmm/headerSubPart.jsp @@ -17,10 +17,10 @@ $(document).ready(function() { }); function goSearch(){ - if($("#top_query").val() != "") + /* if($("#top_query").val() != "") { $('#searchHeaderForm input[name=filter_mylist]').val("search_query,"); - } + } */ document.searchHeaderForm.submit(); } From 4b44dc0acf3c55d32cb02a69aec21ff081844c2d Mon Sep 17 00:00:00 2001 From: KNKIM Date: Wed, 17 Nov 2021 12:27:07 +0900 Subject: [PATCH 10/11] =?UTF-8?q?=EC=86=8C=EC=8A=A4=20=EC=9D=B4=EC=83=81?= =?UTF-8?q?=20=EC=B6=A9=EB=8F=8C=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/NlibSearchServiceImpl.java | 609 +++++++++--------- 1 file changed, 307 insertions(+), 302 deletions(-) diff --git a/src/main/java/nlib/sch/service/impl/NlibSearchServiceImpl.java b/src/main/java/nlib/sch/service/impl/NlibSearchServiceImpl.java index 28e19566..8280b129 100644 --- a/src/main/java/nlib/sch/service/impl/NlibSearchServiceImpl.java +++ b/src/main/java/nlib/sch/service/impl/NlibSearchServiceImpl.java @@ -1,302 +1,307 @@ -package nlib.sch.service.impl; - - - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Reader; -import java.lang.reflect.Type; -import java.net.URL; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; - -import javax.annotation.Resource; - -import org.apache.commons.beanutils.BeanUtils; -import org.json.JSONException; -import org.json.JSONObject; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpMethod; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.http.converter.StringHttpMessageConverter; -import org.springframework.stereotype.Service; -import org.springframework.util.MultiValueMap; -import org.springframework.web.client.RestTemplate; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonObject; -import com.google.gson.JsonParser; -import com.google.gson.reflect.TypeToken; - -import nlib.sch.service.NlibSearchVO; -import nlib.col.service.CollectionVO; -import nlib.restful.DataApi; -import nlib.restful.service.DataApiInterface; -import nlib.restful.service.DataApiReqVO; -import nlib.restful.service.DataApiResVO; -import nlib.restful.service.impl.DataApiRESTful; -import nlib.sch.service.NlibSearchCollectionVO; -import nlib.sch.service.NlibSearchInterface; -import nlib.sch.service.NlibSearchService; -import nlib.util.StringUtil; - - -@Service("nlibSearchService") -public class NlibSearchServiceImpl implements NlibSearchService{ - - private static final Logger log = LoggerFactory.getLogger(NlibSearchServiceImpl.class); - - /* DataApi 접속 서버 정보 */ - @Value("#{properties['search.searchIp']}") - private String SEARCH_IP; - - @Value("#{properties['search.searchPort']}") - private String SEARCH_PORT; - - @Value("#{properties['search.protocol']}") - private String SEARCH_PROTOCOL; - - /** RESTFul API 송수신 모듈 */ - @Resource(name = "dataApi") - private DataApi dataApi; - - public NlibSearchVO getSearch(NlibSearchVO searchVO) throws Exception { - try { - //검색엔진 페이지 셋팅 - searchVO.setListCount(Integer.toString(searchVO.getPageSize())); - searchVO.setStartCount(Integer.toString(searchVO.getPageIndex())); - - - String collectionTemp=""; - String nameTemp=""; - //----------------------------------- - // 입력값 검증작업 - //----------------------------------- - /*resVO = DataApiInterface.checkReqCommonParams(reqVO); - if(resVO != null) return resVO; - HttpMethod method = reqVO.getReqMethod();*/ - - //----------------------------------- - // 폼 파라메터 생성 작업 및 요청 처리 - //----------------------------------- - String url = SEARCH_PROTOCOL + "://" + SEARCH_IP + ("80".equals(SEARCH_PORT) ? "" : ":" + SEARCH_PORT) + "/searchApi/searchApi.jsp"; - log.debug("REQ URL : " + url); - - HttpHeaders headers = new HttpHeaders(); - headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); - - ResponseEntity responseEntity = null; - ResponseEntity allResponseEntity = null; - RestTemplate restTemplate = new RestTemplate(); - restTemplate.getMessageConverters() - .add(0, new StringHttpMessageConverter(StandardCharsets.UTF_8)); - - //단일 탭 검색 - MultiValueMap parameters= searchVO.getSearchMap(); - - //전체 검색 (각 탭별 count가 목적) - collectionTemp = searchVO.getCollection(); - if("".equals(StringUtil.getString(searchVO.getCollectionList(), "")) || "ALL".equals(StringUtil.getString(searchVO.getCollectionList(), ""))) - { - searchVO.setCollection("ALL"); - }else - { - //상세검색시 콜렉션리스트만 카운트하기위해 추가. - searchVO.setCollection(searchVO.getCollectionList()); - } - - MultiValueMap allParameters= searchVO.getSearchMap(); - searchVO.setCollection(collectionTemp); - //post방식 - parameters.forEach((k, v) -> log.debug("params > " + k + " : " + v)); - allParameters.forEach((k, v) -> log.debug("allParams > " + k + " : " + v)); - HttpEntity> requestEntity = new HttpEntity(parameters, headers); - HttpEntity> allRequestEntity = new HttpEntity(allParameters, headers); - responseEntity = restTemplate.postForEntity(url, requestEntity , String.class); - allResponseEntity = restTemplate.postForEntity(url, allRequestEntity , String.class); - - //----------------------------------- - // 응답 처리 - //----------------------------------- - HttpStatus statusCode = responseEntity.getStatusCode(); - log.debug("RES StatusCode : " + statusCode); - String resultXML = responseEntity.getBody(); - log.debug("RES resultXML : " + resultXML); - - HttpStatus allStatusCode = allResponseEntity.getStatusCode(); - log.debug("RES allStatusCode : " + allStatusCode); - String allResultXML = allResponseEntity.getBody(); - log.debug("RES allResultXML : " + allResultXML); - - //검색엔진 결과 json 파싱 - JsonParser jsonParser = new JsonParser(); - - - JsonObject jsonObject = null; - JsonObject tmp = null; - String collection = ""; - String totalCount = ""; - JsonArray jsonArray = null; - - //전체검색 결과 탭별 count - jsonObject = (JsonObject) jsonParser.parse(allResultXML); - jsonObject = (JsonObject) jsonObject.get("SearchQueryResult"); - jsonArray = (JsonArray) jsonObject.get("Collection"); - - for(int i=0;i list = new ArrayList<>(); - List> subjectMap = new ArrayList>(); - List> typeMap = new ArrayList>(); - List> orgMap = new ArrayList>(); - String code=""; - String code_up=""; - int j; - int k; - - for(int i=0;i0) - { - filterObject =(JsonObject) subjectList.get(0); - filterObject = (JsonObject) filterObject.get("Categories"); - subjectList = (JsonArray) filterObject.get("Category"); - }; - if(typeList.size()>0) - { - filterObject =(JsonObject) typeList.get(0); - filterObject = (JsonObject) filterObject.get("Categories"); - typeList = (JsonArray) filterObject.get("Category"); - }; - if(orgList.size()>0) - { - filterObject =(JsonObject) orgList.get(0); - filterObject = (JsonObject) filterObject.get("Categories"); - orgList = (JsonArray) filterObject.get("Category"); - }; - for(k = 0; k < subjectList.size(); k++){ - HashMap temp = new HashMap(); - filterObject = (JsonObject)subjectList.get(k); - nameTemp = filterObject.get("Name").getAsString(); - //상위코드값 - code_up = nameTemp.substring(nameTemp.indexOf("@")+1,nameTemp.indexOf("^")); - temp.put("category_nm_up",code_up); - - //코드값 - code = nameTemp.substring(nameTemp.lastIndexOf("@")+1); - temp.put("category_nm",code); - temp.put("category_cnt",filterObject.get("Count").getAsString()); - subjectMap.add(temp); - } - for(k = 0; k < typeList.size(); k++){ - HashMap temp = new HashMap(); - filterObject = (JsonObject)typeList.get(k); - nameTemp = filterObject.get("Name").getAsString(); - //상위코드값 - code_up = nameTemp.substring(nameTemp.indexOf("@")+1,nameTemp.indexOf("^")); - temp.put("class_nm_up",code_up); - - //코드값 - code = nameTemp.substring(nameTemp.lastIndexOf("@")+1); - temp.put("class_nm",code); - temp.put("class_cnt",filterObject.get("Count").getAsString()); - typeMap.add(temp); - } - for(k = 0; k < orgList.size(); k++){ - HashMap temp = new HashMap(); - filterObject = (JsonObject)orgList.get(k); - nameTemp = filterObject.get("Name").getAsString(); - if(!"null".equals(nameTemp)) { - temp.put("org_nm",nameTemp); - temp.put("org_cnt",filterObject.get("Count").getAsString()); - orgMap.add(temp); - } - } - - tmp = (JsonObject) tmp.get("DocumentSet"); - searchVO.setTotalCount(tmp.get("TotalCount").getAsString()); - colArray = (JsonArray) tmp.get("Document"); - - //vo list로 json list 파싱 - for(j=0;j Exception 발생 : " + e.toString()); - } - return searchVO; - } -}; +package nlib.sch.service.impl; + + + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.Reader; +import java.lang.reflect.Type; +import java.net.URL; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; + +import javax.annotation.Resource; + +import org.apache.commons.beanutils.BeanUtils; +import org.json.JSONException; +import org.json.JSONObject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.http.converter.StringHttpMessageConverter; +import org.springframework.stereotype.Service; +import org.springframework.util.MultiValueMap; +import org.springframework.web.client.RestTemplate; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.google.gson.reflect.TypeToken; + +import nlib.sch.service.NlibSearchVO; +import nlib.col.service.CollectionVO; +import nlib.restful.DataApi; +import nlib.restful.service.DataApiInterface; +import nlib.restful.service.DataApiReqVO; +import nlib.restful.service.DataApiResVO; +import nlib.restful.service.impl.DataApiRESTful; +import nlib.sch.service.NlibSearchCollectionVO; +import nlib.sch.service.NlibSearchInterface; +import nlib.sch.service.NlibSearchService; +import nlib.util.StringUtil; + + +@Service("nlibSearchService") +public class NlibSearchServiceImpl implements NlibSearchService{ + + private static final Logger log = LoggerFactory.getLogger(NlibSearchServiceImpl.class); + + /* DataApi 접속 서버 정보 */ + @Value("#{properties['search.searchIp']}") + private String SEARCH_IP; + + @Value("#{properties['search.searchPort']}") + private String SEARCH_PORT; + + @Value("#{properties['search.protocol']}") + private String SEARCH_PROTOCOL; + + /** RESTFul API 송수신 모듈 */ + @Resource(name = "dataApi") + private DataApi dataApi; + + public NlibSearchVO getSearch(NlibSearchVO searchVO) throws Exception { + try { + //검색엔진 페이지 셋팅 + searchVO.setListCount(Integer.toString(searchVO.getPageSize())); + searchVO.setStartCount(Integer.toString(searchVO.getPageIndex())); + + + String collectionTemp=""; + String nameTemp=""; + //----------------------------------- + // 입력값 검증작업 + //----------------------------------- + /*resVO = DataApiInterface.checkReqCommonParams(reqVO); + if(resVO != null) return resVO; + HttpMethod method = reqVO.getReqMethod();*/ + + //----------------------------------- + // 폼 파라메터 생성 작업 및 요청 처리 + //----------------------------------- + String url = SEARCH_PROTOCOL + "://" + SEARCH_IP + ("80".equals(SEARCH_PORT) ? "" : ":" + SEARCH_PORT) + "/searchApi/searchApi.jsp"; + log.debug("REQ URL : " + url); + + HttpHeaders headers = new HttpHeaders(); + headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); + + ResponseEntity responseEntity = null; + ResponseEntity allResponseEntity = null; + RestTemplate restTemplate = new RestTemplate(); + restTemplate.getMessageConverters() + .add(0, new StringHttpMessageConverter(StandardCharsets.UTF_8)); + + //단일 탭 검색 + MultiValueMap parameters= searchVO.getSearchMap(); + + //전체 검색 (각 탭별 count가 목적) + collectionTemp = searchVO.getCollection(); + if("".equals(StringUtil.getString(searchVO.getCollectionList(), "")) || "ALL".equals(StringUtil.getString(searchVO.getCollectionList(), ""))) + { + searchVO.setCollection("ALL"); + }else + { + //상세검색시 콜렉션리스트만 카운트하기위해 추가. + searchVO.setCollection(searchVO.getCollectionList()); + } + + MultiValueMap allParameters= searchVO.getSearchMap(); + searchVO.setCollection(collectionTemp); + //post방식 + parameters.forEach((k, v) -> log.debug("params > " + k + " : " + v)); + allParameters.forEach((k, v) -> log.debug("allParams > " + k + " : " + v)); + HttpEntity> requestEntity = new HttpEntity(parameters, headers); + HttpEntity> allRequestEntity = new HttpEntity(allParameters, headers); + responseEntity = restTemplate.postForEntity(url, requestEntity , String.class); + allResponseEntity = restTemplate.postForEntity(url, allRequestEntity , String.class); + + //----------------------------------- + // 응답 처리 + //----------------------------------- + HttpStatus statusCode = responseEntity.getStatusCode(); + log.debug("RES StatusCode : " + statusCode); + String resultXML = responseEntity.getBody(); + log.debug("RES resultXML : " + resultXML); + + HttpStatus allStatusCode = allResponseEntity.getStatusCode(); + log.debug("RES allStatusCode : " + allStatusCode); + String allResultXML = allResponseEntity.getBody(); + log.debug("RES allResultXML : " + allResultXML); + + //검색엔진 결과 json 파싱 + JsonParser jsonParser = new JsonParser(); + + + JsonObject jsonObject = null; + JsonObject tmp = null; + String collection = ""; + String totalCount = ""; + JsonArray jsonArray = null; + + //전체검색 결과 탭별 count + jsonObject = (JsonObject) jsonParser.parse(allResultXML); + jsonObject = (JsonObject) jsonObject.get("SearchQueryResult"); + jsonArray = (JsonArray) jsonObject.get("Collection"); + + for(int i=0;i list = new ArrayList<>(); + List> subjectMap = new ArrayList>(); + List> typeMap = new ArrayList>(); + List> orgMap = new ArrayList>(); + String code=""; + String code_up=""; + int j; + int k; + + for(int i=0;i0) + { + filterObject =(JsonObject) subjectList.get(0); + filterObject = (JsonObject) filterObject.get("Categories"); + subjectList = (JsonArray) filterObject.get("Category"); + }; + if(typeList.size()>0) + { + filterObject =(JsonObject) typeList.get(0); + filterObject = (JsonObject) filterObject.get("Categories"); + typeList = (JsonArray) filterObject.get("Category"); + }; + if(orgList.size()>0) + { + filterObject =(JsonObject) orgList.get(0); + filterObject = (JsonObject) filterObject.get("Categories"); + orgList = (JsonArray) filterObject.get("Category"); + }; + for(k = 0; k < subjectList.size(); k++){ + HashMap temp = new HashMap(); + filterObject = (JsonObject)subjectList.get(k); + nameTemp = filterObject.get("Name").getAsString(); + //상위코드값 + code_up = nameTemp.substring(nameTemp.indexOf("@")+1,nameTemp.indexOf("^")); + temp.put("category_nm_up",code_up); + + //코드값 + code = nameTemp.substring(nameTemp.lastIndexOf("@")+1); + temp.put("category_nm",code); + temp.put("category_cnt",filterObject.get("Count").getAsString()); + subjectMap.add(temp); + } + for(k = 0; k < typeList.size(); k++){ + HashMap temp = new HashMap(); + filterObject = (JsonObject)typeList.get(k); + nameTemp = filterObject.get("Name").getAsString(); + //상위코드값 + code_up = nameTemp.substring(nameTemp.indexOf("@")+1,nameTemp.indexOf("^")); + temp.put("class_nm_up",code_up); + + //코드값 + code = nameTemp.substring(nameTemp.lastIndexOf("@")+1); + temp.put("class_nm",code); + temp.put("class_cnt",filterObject.get("Count").getAsString()); + typeMap.add(temp); + } + for(k = 0; k < orgList.size(); k++){ + HashMap temp = new HashMap(); + filterObject = (JsonObject)orgList.get(k); + nameTemp = filterObject.get("Name").getAsString(); + if(!"null".equals(nameTemp)) { + temp.put("org_nm",nameTemp); + temp.put("org_cnt",filterObject.get("Count").getAsString()); + orgMap.add(temp); + } + } + } + + tmp = (JsonObject) tmp.get("DocumentSet"); + searchVO.setTotalCount(tmp.get("TotalCount").getAsString()); + colArray = (JsonArray) tmp.get("Document"); + + if(colArray != null) + { + //vo list로 json list 파싱 + for(j=0;j Exception 발생 : " + e.toString()); + } + return searchVO; + } +}; From bcc9980c8918b45574f278587709f846415c8849 Mon Sep 17 00:00:00 2001 From: KNKIM Date: Wed, 17 Nov 2021 12:27:23 +0900 Subject: [PATCH 11/11] =?UTF-8?q?=EC=98=A8=EB=9D=BC=EC=9D=B8=20=EC=9E=90?= =?UTF-8?q?=EB=A3=8C=EA=B4=80=20=EB=8D=94=EB=B3=B4=EA=B8=B0=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/WEB-INF/jsp/nlib/cmm/home.jsp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/WEB-INF/jsp/nlib/cmm/home.jsp b/src/main/webapp/WEB-INF/jsp/nlib/cmm/home.jsp index 82c9ebbe..f801db67 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/cmm/home.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/cmm/home.jsp @@ -143,7 +143,7 @@ function fn_listPops(typeDivCd) {