메인화면 푸터 타문화원 소장자료관 링크 추가
This commit is contained in:
parent
d4b78567a4
commit
1dc297a2e8
@ -95,5 +95,12 @@ public interface MainService
|
||||
*/
|
||||
public Map<String, String> getBannerInfo(String bannerId);
|
||||
|
||||
/**
|
||||
* 메인화면 footer 문화원 전체 이름을 가져온다.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, String>> listDeptTree(String mngOrgNm);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -56,4 +56,11 @@ public interface MainDAO {
|
||||
* @return
|
||||
*/
|
||||
public Map<String, String> getBannerInfo(String bannerId);
|
||||
|
||||
/**
|
||||
* 메인화면 footer 문화원 전체 이름을 가져온다.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, String>> listDeptTree(String mngOrgNm);
|
||||
}
|
||||
|
||||
@ -134,4 +134,9 @@ public class MainServiceImpl implements MainService
|
||||
return mainDAO.getBannerInfo(bannerId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, String>> listDeptTree(String mngOrgNm) {
|
||||
return mainDAO.listDeptTree(mngOrgNm);
|
||||
}
|
||||
|
||||
}
|
||||
@ -4,6 +4,7 @@ import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -14,12 +15,17 @@ import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.web.savedrequest.HttpSessionRequestCache;
|
||||
import org.springframework.security.web.savedrequest.RequestCache;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import nlib.bbs.service.ArticleVO;
|
||||
import nlib.bbs.service.BoardService;
|
||||
@ -29,6 +35,7 @@ import nlib.cmm.service.CodeService;
|
||||
import nlib.cmm.service.MainService;
|
||||
import nlib.cmm.service.NlibProperty;
|
||||
import nlib.cmm.service.NotificationService;
|
||||
import nlib.cmm.service.PagingVO;
|
||||
import nlib.col.service.CartService;
|
||||
import nlib.col.service.CollectionVO;
|
||||
import nlib.util.StringUtil;
|
||||
@ -181,6 +188,24 @@ public class MainController extends NlibCommonController {
|
||||
return "nlib/cmm/headerSubPart";
|
||||
}
|
||||
|
||||
/**
|
||||
* 목록 조회한다.
|
||||
*
|
||||
* @param req
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="/cmm/listDeptTree.do", method = { RequestMethod.POST })
|
||||
public String listDeptTree(@RequestParam Map<String, Object> map, ModelMap model) throws Exception {
|
||||
String mngOrgNm = (String)map.get("mngOrgNm");
|
||||
|
||||
// 문화원명 조회
|
||||
List<Map<String, String>> listDeptTree = mainService.listDeptTree(mngOrgNm);
|
||||
model.addAttribute("listDeptTree", listDeptTree);
|
||||
|
||||
return "nlib/cmm/footerSubPart";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/main/bannerImage.do")
|
||||
public void getBannerImage(HttpServletRequest request, HttpServletResponse response, String bannerId) throws IOException {
|
||||
|
||||
|
||||
@ -193,4 +193,49 @@
|
||||
]]>
|
||||
</select>
|
||||
|
||||
<!-- 메인 푸터 타문화원 소장자료관 : 2022.08.31 추가 -->
|
||||
<select id="listDeptTree" parameterType="String" resultType="egovMap">
|
||||
SELECT * FROM(
|
||||
WITH RECURSIVE SM_DEPT_CTE AS (
|
||||
SELECT
|
||||
A.DEPT_SEQ ID -- 아이디
|
||||
, TOP_DEPT_YN TOP_YN -- 최상위여부
|
||||
, A.UP_DEPT_SEQ UP_ID -- 부모아이디
|
||||
, A.SORT_SEQ -- 순번
|
||||
, A.DEPT_ABBR_NM TEXT
|
||||
, A.DEPT_LV
|
||||
, A.CLOSE_FLAG
|
||||
, A.DOMAIN_HOST_NM
|
||||
, A.DOMAIN_USE_YN
|
||||
, 1 AS LEVEL
|
||||
, CAST(lpad(A.SORT_SEQ,3,'0') AS char(50)) TREE_SORT -- 트리sort 문자정렬방식으로 사용
|
||||
FROM SM_DEPT A
|
||||
WHERE A.TOP_DEPT_YN = 'Y'
|
||||
UNION ALL
|
||||
SELECT
|
||||
P.DEPT_SEQ ID
|
||||
, TOP_DEPT_YN TOP_YN
|
||||
, P.UP_DEPT_SEQ UP_ID
|
||||
, P.SORT_SEQ
|
||||
, P.DEPT_ABBR_NM TEXT
|
||||
, P.DEPT_LV
|
||||
, P.CLOSE_FLAG
|
||||
, P.DOMAIN_HOST_NM
|
||||
, P.DOMAIN_USE_YN
|
||||
, CTE.LEVEL + 1 AS LEVEL
|
||||
, CONCAT(CTE.TREE_SORT , lpad(P.SORT_SEQ,3,'0')) TREE_SORT
|
||||
FROM SM_DEPT P
|
||||
INNER JOIN SM_DEPT_CTE CTE ON P.UP_DEPT_SEQ = CTE.ID
|
||||
WHERE CTE.LEVEL <![CDATA[<=]]> 3 AND P.DOMAIN_USE_YN = 'Y' AND (P.DOMAIN_HOST_NM != NULL AND P.DOMAIN_HOST_NM != '')
|
||||
)
|
||||
SELECT
|
||||
C.*
|
||||
FROM SM_DEPT_CTE C
|
||||
) LIST
|
||||
<if test="value != null and value != '' " >
|
||||
WHERE LIST.TEXT LIKE CONCAT('%' , #{mngOrgNm} , '%')
|
||||
</if>
|
||||
ORDER BY LIST.ID, LIST.CLOSE_FLAG, LIST.TREE_SORT, LIST.SORT_SEQ ASC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -97,4 +97,11 @@
|
||||
,'02' /* 2021.10.05 추가 (소장자료관) */
|
||||
)
|
||||
</insert>
|
||||
|
||||
<select id="selectUseRank" resultType="HashMap">
|
||||
SELECT
|
||||
COUNT(DISTINCT TITLE) CNT
|
||||
, MNG_ORG_NM FROM RG_MASTER where MOD_DD > '2022-01-12' AND REG_STATUS IN('REG_ING','REG_OK','REG_REQ','REG_RTN') GROUP BY MNG_ORG_CD
|
||||
ORDER BY CNT DESC LIMIT 5
|
||||
</select>
|
||||
</mapper>
|
||||
12
src/main/webapp/WEB-INF/jsp/nlib/cmm/footerSubPart.jsp
Normal file
12
src/main/webapp/WEB-INF/jsp/nlib/cmm/footerSubPart.jsp
Normal file
@ -0,0 +1,12 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
|
||||
<c:forEach var="mngList" items="${listDeptTree}" varStatus="status">
|
||||
<c:if test="${mngList.domainUseYn eq 'Y' && mngList.domainHostNm ne null }">
|
||||
<div><a href="javascript:void(0)" onclick="gfn_openNewWindow('https://${mngList.domainHostNm }.nculture.org/')" title="새창 열림">${mngList.text }</a></div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<c:if test="${fn:length(listDeptTree) == 0}">
|
||||
<div style="margin-left: 12px;">검색결과가 없습니다.</div>
|
||||
</c:if>
|
||||
@ -4,7 +4,31 @@
|
||||
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
selectListDeptTree();
|
||||
|
||||
|
||||
var inputData;
|
||||
$('#mngOrgNm').keyup(function(){
|
||||
inputData = {"mngOrgNm" : $(this).val()};
|
||||
selectListDeptTree(inputData);
|
||||
});
|
||||
|
||||
function selectListDeptTree(inputData) {
|
||||
var reqUrl = "${pageContext.request.contextPath}/cmm/listDeptTree.do"
|
||||
$.ajax({
|
||||
url: reqUrl,
|
||||
type : "POST",
|
||||
data: inputData,
|
||||
dataType: "html",
|
||||
}).done(function(result){
|
||||
console.log(result);
|
||||
$('#select_mngOrgNm').html(result);
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<button type="button" id="btn-go-top" class="mo-go-top btn-go-top"><span><img src="/images/icon/icon-arr-top.png" alt="상단 화살표"></span><span>TOP</span></button>
|
||||
|
||||
<div class="inner">
|
||||
@ -25,6 +49,15 @@
|
||||
<div><a href="javascript:void(0)" onclick="gfn_openNewWindow('https://inmun360.culture.go.kr/')" title="새창 열림">인문360도</a></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tot_nlib_site">
|
||||
<p class="site_name">타문화원 소장자료관</p>
|
||||
<div class="site_depth">
|
||||
<div class="depth_box">
|
||||
<div id="select_mngOrgNm"></div>
|
||||
</div>
|
||||
<div><input type="text" id="mngOrgNm" name="mngOrgNm" placeholder="문화원 입력" title="문화원 입력" value="" autocomplete="off"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-bottom">
|
||||
<div class="left-side">
|
||||
|
||||
@ -388,6 +388,15 @@ footer .family_site.on .site_name:after{background: url("/images/icon/icon-down-
|
||||
footer .family_site .site_depth{width:180px;position:absolute;left:0px;right:0;bottom:40px;background-color:#1b1b1b;padding:7px 0px;z-index:60;display:none;}
|
||||
footer .family_site .site_depth div a{display:block;line-height:26px;padding:0 0 0 12px;font-size:14px;color:#ddd;}
|
||||
|
||||
footer .tot_nlib_site{position:absolute;right:190px;top:0;width:180px;text-align:left;}
|
||||
footer .tot_nlib_site .site_name{position:relative;margin-top:7px;padding-left:20px;height:40px;line-height:40px;font-size:12px;font-weight:normal;color:#ddd;background:#2b2b2b;cursor:pointer;border-radius: 3px;}
|
||||
footer .tot_nlib_site .site_name:after{position:absolute;right:0;top:0;width:40px;height:40px;content:"";display:block;background: url("/images/icon/icon-up-arr.png") no-repeat right top;}
|
||||
footer .tot_nlib_site.on .site_name:after{background: url("/images/icon/icon-down-arr.png") no-repeat right top;}
|
||||
footer .tot_nlib_site .site_depth{width:180px;position:absolute;left:0px;right:0;bottom:40px;background-color:#1b1b1b;z-index:60;display:none;}
|
||||
footer .tot_nlib_site .site_depth div a{display:block;line-height:26px;padding:0 0 0 12px;font-size:14px;color:#ddd;}
|
||||
footer .tot_nlib_site .site_depth .depth_box {overflow-y:scroll;max-height:176px;padding:7px 0px;}
|
||||
footer .tot_nlib_site .site_depth #mngOrgNm{width:154px;padding: 0px 13px 0px 13px;height: 35px;}
|
||||
|
||||
|
||||
/* button scroll-top */
|
||||
.btn-go-top {width: 50px;height: 50px;border-radius: 100%;background-color: #354f68;position: absolute;right: 25px;top: -65px;z-index: 20;
|
||||
|
||||
@ -65,6 +65,15 @@ $(document).ready(function(){
|
||||
$('.family_site').removeClass("on");
|
||||
$('.family_site').find(".site_depth").hide();
|
||||
});
|
||||
/* 타문화원 소장자료관 */
|
||||
$(".tot_nlib_site .site_name").click(function(){
|
||||
$('.tot_nlib_site').toggleClass("on");
|
||||
$('.tot_nlib_site').find(".site_depth").slideToggle("fast");
|
||||
});
|
||||
$(".tot_nlib_site .site_depth #select_mngOrgNm div:last-child a").focusout(function(){
|
||||
$('.tot_nlib_site').removeClass("on");
|
||||
$('.tot_nlib_site').find(".site_depth").hide();
|
||||
});
|
||||
|
||||
/* 로그인 팝업 */
|
||||
$(".login-btn").click(function(){
|
||||
|
||||
Loading…
Reference in New Issue
Block a user