이준호 메뉴관리 커밋
This commit is contained in:
parent
87b9efe72c
commit
a0bacb029f
@ -116,4 +116,6 @@ public interface EgovAuthorManageService {
|
||||
*/
|
||||
public void deleteLettnrolesHierarchy(AuthorManage authorManage) throws Exception;
|
||||
|
||||
public List<AuthorManageVO> selectAuthorLists() throws Exception;
|
||||
|
||||
}
|
||||
|
||||
@ -158,4 +158,9 @@ public class AuthorManageDAO extends EgovAbstractDAO {
|
||||
public void deleteLettnrolesHierarchy(AuthorManage authorManage) throws Exception {
|
||||
delete("authorManageDAO.deleteLettnrolesHierarchy", authorManage);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<AuthorManageVO> selectAuthorLists() throws Exception {
|
||||
return (List<AuthorManageVO>) list("authorManageDAO.selectAuthorLists");
|
||||
}
|
||||
}
|
||||
|
||||
@ -159,4 +159,8 @@ public class EgovAuthorManageServiceImpl extends EgovAbstractServiceImpl impleme
|
||||
public void deleteLettnrolesHierarchy(AuthorManage authorManage) throws Exception {
|
||||
authorManageDAO.deleteLettnrolesHierarchy(authorManage);
|
||||
}
|
||||
|
||||
public List<AuthorManageVO> selectAuthorLists() throws Exception {
|
||||
return authorManageDAO.selectAuthorLists();
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,6 +32,8 @@ import kcc.com.cmm.LoginVO;
|
||||
import kcc.com.cmm.service.EgovCmmUseService;
|
||||
import kcc.let.cop.bbs.service.BoardMasterVO;
|
||||
import kcc.let.cop.bbs.service.EgovBBSAttributeManageService;
|
||||
import kcc.let.sec.ram.service.AuthorManageVO;
|
||||
import kcc.let.sec.ram.service.EgovAuthorManageService;
|
||||
import kcc.let.sym.ccm.cde.service.CmmnDetailCodeVO;
|
||||
import kcc.let.sym.mnu.mcm.service.EgovMenuCreateManageService;
|
||||
import kcc.let.sym.mnu.mcm.service.MenuCreatVO;
|
||||
@ -106,6 +108,9 @@ public class EgovMenuCreateManageController {
|
||||
@Resource(name = "egovCntManageService")
|
||||
private EgovCntManageService egovCntManageService;
|
||||
|
||||
@Resource(name = "egovAuthorManageService")
|
||||
private EgovAuthorManageService egovAuthorManageService;
|
||||
|
||||
/**
|
||||
* *메뉴생성목록을 조회한다.
|
||||
*
|
||||
@ -245,7 +250,10 @@ public class EgovMenuCreateManageController {
|
||||
if(null == menuManageVO.getAuthorCode()) {
|
||||
menuManageVO.setAuthorCode("ROLE_ANONYMOUS");
|
||||
}
|
||||
List<AuthorManageVO> authorList = egovAuthorManageService.selectAuthorLists();
|
||||
|
||||
model.addAttribute("menuCreatVO", menuCreatVO);
|
||||
model.addAttribute("authorList", authorList);
|
||||
return "sym/mnu/mpm/EgovMenuCreatSelectJtree";
|
||||
}
|
||||
|
||||
@ -635,12 +643,12 @@ public class EgovMenuCreateManageController {
|
||||
}
|
||||
|
||||
//프로그램 파일명에 등록된 menuNO 게시판,컨텐츠 삭제
|
||||
{
|
||||
CntManageVO tempCntManageVO = new CntManageVO();
|
||||
tempCntManageVO.setMenuNo(menuManageVO.getMenuNo()+"");
|
||||
egovCntManageService.deleteMenuNo(tempCntManageVO) ;
|
||||
|
||||
}
|
||||
// {
|
||||
// CntManageVO tempCntManageVO = new CntManageVO();
|
||||
// tempCntManageVO.setMenuNo(menuManageVO.getMenuNo()+"");
|
||||
// egovCntManageService.deleteMenuNo(tempCntManageVO) ;
|
||||
//
|
||||
// }
|
||||
|
||||
if("B".equals(menuManageVO.getMenuType())){ //단일 게시판 선택시에 마스터 테이블에 메뉴번호를 넣어준다. solr 검색을 위해.
|
||||
BoardMasterVO boardMasterVO = new BoardMasterVO();
|
||||
@ -654,6 +662,7 @@ public class EgovMenuCreateManageController {
|
||||
CntManageVO tempCntManageVO = new CntManageVO();
|
||||
tempCntManageVO.setMenuNo(menuManageVO.getMenuNo()+"");
|
||||
tempCntManageVO.setCntId(progrmManageVO.getProgrmHtmlFileId());
|
||||
egovCntManageService.deleteMenuNo(tempCntManageVO) ;
|
||||
egovCntManageService.updateMenuContent(tempCntManageVO);
|
||||
}
|
||||
modelAndView.addObject("status", "success");
|
||||
|
||||
@ -66,7 +66,7 @@ public class EgovSessionMapping extends EgovUsersByUsernameMapping {
|
||||
/*String strMberSeq = rs.getString("mber_seq");
|
||||
String ofcpsNm = rs.getString("ofcps_nm");*/
|
||||
|
||||
String offmTelno = rs.getString("offm_telno").toString();
|
||||
// String offmTelno = rs.getString("offm_telno").toString();
|
||||
|
||||
|
||||
// 세션 항목 설정
|
||||
@ -86,7 +86,7 @@ public class EgovSessionMapping extends EgovUsersByUsernameMapping {
|
||||
/*20221012 대시보드를 위해 직급 코드 추가*/
|
||||
/*loginVO.setOfcpsNm(ofcpsNm);*/
|
||||
|
||||
loginVO.setPhone(offmTelno);
|
||||
// loginVO.setPhone(offmTelno);
|
||||
|
||||
return new EgovUserDetails(strUserId, strPassWord, strEnabled, loginVO);
|
||||
}
|
||||
|
||||
@ -176,4 +176,16 @@
|
||||
]]>
|
||||
</delete>
|
||||
|
||||
<select id="authorManageDAO.selectAuthorLists" resultMap="author">
|
||||
/* authorManageDAO.selectAuthorLists */
|
||||
SELECT
|
||||
AUTHOR_CODE,
|
||||
AUTHOR_NM,
|
||||
AUTHOR_DC,
|
||||
AUTHOR_CREAT_DE,
|
||||
SORT_NUM
|
||||
FROM LETTNAUTHORINFO
|
||||
ORDER BY AUTHOR_CODE ASC
|
||||
</select>
|
||||
|
||||
</sqlMap>
|
||||
|
||||
@ -207,7 +207,7 @@
|
||||
|
||||
|
||||
<select id="menuManageDAO.selectMenuListJtree" parameterClass="menuManageJTreeVO" resultClass="menuManageJTreeVO">
|
||||
/* 임시.*NOT_SQL_LOG.* menuManageDAO.selectMenuListJtree */
|
||||
/* 임시.*NOT_SQL_LOG.* */
|
||||
<![CDATA[
|
||||
SELECT
|
||||
MENU_NM menuNm ,
|
||||
@ -224,51 +224,12 @@
|
||||
LETTNMENUINFO A INNER JOIN LETTNMENUCREATDTLS B on A.MENU_NO = B.MENU_NO
|
||||
WHERE
|
||||
A.MENU_NO > 0
|
||||
AND B.AUTHOR_CODE = #authorCode#
|
||||
]]>
|
||||
<isEqual property="authorCode" compareValue="ROLE_ANONYMOUS">
|
||||
AND B.AUTHOR_CODE IN ('ROLE_ANONYMOUS', 'ROLE_USER_MEMBER', 'ROLE_USER_MANAGER')
|
||||
/*
|
||||
GROUP BY A.MENU_NO
|
||||
*/
|
||||
|
||||
GROUP BY
|
||||
MENU_NM ,
|
||||
PROGRM_FILE_NM ,
|
||||
A.MENU_NO ,
|
||||
UPPER_MENU_NO ,
|
||||
MENU_ORDR ,
|
||||
MENU_DC ,
|
||||
RELATE_IMAGE_PATH ,
|
||||
RELATE_IMAGE_NM ,
|
||||
MENU_USER_TYPE ,
|
||||
B.USE_YN
|
||||
|
||||
|
||||
</isEqual>
|
||||
<isNotEqual property="authorCode" compareValue="ROLE_ANONYMOUS">
|
||||
AND B.AUTHOR_CODE IN ('ROLE_ADMIN', 'ROLE_ADR_ADMIN', 'ROLE_VISIT')
|
||||
/*
|
||||
GROUP BY A.MENU_NO
|
||||
*/
|
||||
|
||||
GROUP BY
|
||||
MENU_NM ,
|
||||
PROGRM_FILE_NM ,
|
||||
A.MENU_NO ,
|
||||
UPPER_MENU_NO ,
|
||||
MENU_ORDR ,
|
||||
MENU_DC ,
|
||||
RELATE_IMAGE_PATH ,
|
||||
RELATE_IMAGE_NM ,
|
||||
MENU_USER_TYPE ,
|
||||
B.USE_YN
|
||||
|
||||
</isNotEqual>
|
||||
ORDER BY
|
||||
A.UPPER_MENU_NO,
|
||||
A.MENU_ORDR,
|
||||
A.MENU_NO
|
||||
|
||||
</select>
|
||||
|
||||
<delete id="menuManageDAO.deleteMenuCreatByNo">
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
|
||||
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
|
||||
|
||||
<sqlMap namespace="MenuManage">
|
||||
<typeAlias alias="egovMap" type="egovframework.rte.psl.dataaccess.util.EgovMap"/>
|
||||
@ -65,7 +65,7 @@
|
||||
</select>
|
||||
|
||||
<select id="menuManageDAO.selectMenuManage_D" parameterClass="menuManageVO" resultClass="menuManageVO">
|
||||
/* 임시.*NOT_SQL_LOG.* menuManageDAO.selectMenuManage_D */
|
||||
/* 임시.*NOT_SQL_LOG.* */
|
||||
SELECT
|
||||
A.MENU_NO AS menuNo
|
||||
, MENU_ORDR AS menuOrdr
|
||||
@ -77,17 +77,18 @@
|
||||
, PROGRM_FILE_NM AS progrmFileNm
|
||||
, MENU_USER_TYPE AS menuUserType
|
||||
, MENU_TYPE AS menuType
|
||||
, '' AS menuCours
|
||||
/*, getMenuCours(A.MENU_NO) AS menuCours*/
|
||||
/*, '' AS menuCours*/
|
||||
, getMenuCours(A.MENU_NO) AS menuCours
|
||||
, B.AUTHOR_CODE AS authorCode
|
||||
, B.USE_YN AS useYn
|
||||
, B.SATIS_YN AS satisYn,
|
||||
A.EMPLYR_ID AS emplyrId ,
|
||||
C.USER_NM AS emplyrIdTxt ,
|
||||
(SELECT LOC_NM FROM ITSM_LOC WHERE LOC_NO = C.PART_IDX) AS locNmTxt
|
||||
C.USER_NM AS emplyrIdTxt
|
||||
<!-- ,D.LOC_NM AS locNmTxt -->
|
||||
FROM LETTNMENUINFO A
|
||||
LEFT JOIN LETTNMENUCREATDTLS B ON A.MENU_NO= B.MENU_NO
|
||||
LEFT JOIN LETTNEMPLYRINFO C ON A.EMPLYR_ID = C.EMPLYR_ID
|
||||
<!-- LEFT JOIN ITSM_LOC D ON D.LOC_NO = C.PART_IDX -->
|
||||
WHERE 1=1
|
||||
<isEmpty property="searchCondition"> /* 이전 원래 쿼리 */
|
||||
AND A.MENU_NO = #searchKeyword#
|
||||
@ -97,15 +98,9 @@
|
||||
</isNotEmpty>
|
||||
|
||||
<isNotEmpty property="authorCode" > /* 매뉴사용여부 조회 */
|
||||
|
||||
<isEqual property="authorCode" compareValue="ROLE_ANONYMOUS">
|
||||
AND B.AUTHOR_CODE IN ('ROLE_ANONYMOUS', 'ROLE_USER_MEMBER', 'ROLE_USER_MANAGER')
|
||||
</isEqual>
|
||||
<isNotEqual property="authorCode" compareValue="ROLE_ANONYMOUS">
|
||||
AND B.AUTHOR_CODE IN ('ROLE_ADMIN', 'ROLE_ADR_ADMIN', 'ROLE_VISIT')
|
||||
</isNotEqual>
|
||||
AND B.AUTHOR_CODE = #authorCode#
|
||||
</isNotEmpty>
|
||||
LIMIT 1
|
||||
<!-- LIMIT 1 -->
|
||||
</select>
|
||||
|
||||
<!-- 만족도 관리를 위한 조회 -->
|
||||
@ -290,18 +285,27 @@
|
||||
</update>
|
||||
|
||||
<update id="menuManageDAO.resortMenuManage" parameterClass="menuManageVO" >
|
||||
UPDATE LETTNMENUINFO A ,
|
||||
( SELECT ROW_NUMBER() OVER(ORDER BY MENU_ORDR, LAST_UPDT_PNTTM
|
||||
<isEqual property="sortOver" compareValue="D">
|
||||
DESC
|
||||
</isEqual>
|
||||
) AS SORT1 , A.MENU_NO FROM LETTNMENUINFO A LEFT JOIN LETTNMENUCREATDTLS B
|
||||
ON A.MENU_NO= B.MENU_NO
|
||||
WHERE A.UPPER_MENU_NO = #upperMenuId#
|
||||
AND B.AUTHOR_CODE = #authorCode#
|
||||
ORDER BY MENU_ORDR ASC ) B
|
||||
SET A.MENU_ORDR = B.SORT1
|
||||
WHERE A.MENU_NO = B.MENU_NO
|
||||
UPDATE LETTNMENUINFO A
|
||||
SET A.MENU_ORDR =
|
||||
(SELECT SORT1
|
||||
FROM
|
||||
(SELECT ROW_NUMBER() OVER (ORDER BY AA1.MENU_ORDR, AA1.LAST_UPDT_PNTTM
|
||||
<isEqual property="sortOver" compareValue="D">
|
||||
DESC
|
||||
</isEqual>
|
||||
) AS SORT1
|
||||
, AA1.MENU_NO
|
||||
FROM LETTNMENUINFO AA1
|
||||
LEFT JOIN LETTNMENUCREATDTLS B ON AA1.MENU_NO = B.MENU_NO
|
||||
WHERE AA1.UPPER_MENU_NO = #upperMenuId#
|
||||
AND B.AUTHOR_CODE = #authorCode#) Subquery
|
||||
WHERE Subquery.MENU_NO = A.MENU_NO)
|
||||
WHERE EXISTS ( SELECT 1
|
||||
FROM LETTNMENUINFO AA1
|
||||
LEFT JOIN LETTNMENUCREATDTLS B ON AA1.MENU_NO = B.MENU_NO
|
||||
WHERE AA1.UPPER_MENU_NO = #upperMenuId#
|
||||
AND B.AUTHOR_CODE = #authorCode#
|
||||
AND AA1.MENU_NO = A.MENU_NO)
|
||||
</update>
|
||||
|
||||
<update id="menuManageDAO.updateMenuManageJtreeLevelNo" parameterClass="menuManageVO" >
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
*/
|
||||
var newNodeId = "";
|
||||
function jstreeInit() {
|
||||
$('#kopost_organization').jstree({
|
||||
$('#itn_organization').jstree({
|
||||
"core" : {
|
||||
"animation" : 0,
|
||||
"multiple" : false,
|
||||
@ -77,7 +77,7 @@ function jstreeInit() {
|
||||
]
|
||||
})
|
||||
.bind('loaded.jstree', function(e, data) {
|
||||
$('#kopost_organization').jstree('open_node' , $('#0') )
|
||||
$('#itn_organization').jstree('open_node' , $('#0') )
|
||||
})
|
||||
.on('select_node.jstree', function (e, data) {
|
||||
if(!$('.organ_rightbox').is(":visible")){
|
||||
@ -377,7 +377,7 @@ function fn_delete_menuInfo(menuNo , progrmFileNm ) {
|
||||
return ;
|
||||
}
|
||||
|
||||
var instance = $('#kopost_organization').jstree(true);
|
||||
var instance = $('#itn_organization').jstree(true);
|
||||
if(instance.get_node(menuNo).children.length != 0){
|
||||
alert("하위 메뉴를 먼저 삭제 후 메뉴를 삭제해 주세요.");
|
||||
return;
|
||||
@ -393,10 +393,10 @@ function fn_delete_menuInfo(menuNo , progrmFileNm ) {
|
||||
success : function(returnData, status) {
|
||||
if (returnData.status == "success") {
|
||||
// 직원 목록 갱신
|
||||
var instance = $('#kopost_organization').jstree(true);
|
||||
var instance = $('#itn_organization').jstree(true);
|
||||
//$("#" + instance.get_node(partIdx).a_attr.id).trigger("click");
|
||||
alert("메뉴 정보가 삭제 되었습니다.");
|
||||
$("#kopost_organization").jstree("refresh");
|
||||
$("#itn_organization").jstree("refresh");
|
||||
fn_init_menuInfo();
|
||||
} else if(returnData.status == "duplPk"){
|
||||
alert("삭제하려는 메뉴를 참조하고 있는 메뉴가 있습니다.\n 참조하는 메뉴를 삭제후 다시 시도해 주세요\n"+ "("+returnData.menuManageResultVO.menuCours+")");
|
||||
@ -484,7 +484,7 @@ function fn_save_menuInfo(menuNo) {
|
||||
success : function(returnData, status) {
|
||||
if (returnData.status == "success") {
|
||||
alert("메뉴 정보가 저장 되었습니다.");
|
||||
var instance = $('#kopost_organization').jstree(true);
|
||||
var instance = $('#itn_organization').jstree(true);
|
||||
$('#'+instance.get_node($('#tmp_Id').val()).a_attr.id).trigger("click");//이전 메뉴id선택되게
|
||||
$('#tmp_Id').val($('#menuNo').val());
|
||||
} else if(returnData.status == "upperDupl"){
|
||||
@ -504,7 +504,7 @@ function fn_save_menuInfo(menuNo) {
|
||||
alert("메뉴 정보 저장이 실패되었습니다.");
|
||||
},
|
||||
complete : function () {
|
||||
$("#kopost_organization").jstree("refresh");
|
||||
$("#itn_organization").jstree("refresh");
|
||||
deleteLodingBar();
|
||||
}
|
||||
});
|
||||
@ -542,9 +542,9 @@ function initShowUrl(init){
|
||||
$("#url").attr("readonly", false);
|
||||
}
|
||||
if(init=='N'){
|
||||
var instance = $('#kopost_organization').jstree(true);
|
||||
if($('#kopost_organization').jstree('get_selected')[0] != null){
|
||||
if(instance.get_node($('#kopost_organization').jstree('get_selected')[0]).children.length != 0){
|
||||
var instance = $('#itn_organization').jstree(true);
|
||||
if($('#itn_organization').jstree('get_selected')[0] != null){
|
||||
if(instance.get_node($('#itn_organization').jstree('get_selected')[0]).children.length != 0){
|
||||
alert("하위 메뉴가 있을경우는 다른타입으로 변경할수 없습니다.");
|
||||
return;
|
||||
}
|
||||
@ -827,18 +827,21 @@ function set_bbs(){
|
||||
|
||||
<div class="menu_select">
|
||||
<select name="authorCode" id="authorCode" class="select" onchange="jstreeRefresh(); return false;" title="검색조건선택">
|
||||
<option value='ROLE_ANONYMOUS' <c:if test="${menuCreatVO.authorCode == 'ROLE_ANONYMOUS' || empty menuCreatVO.authorCode }">selected</c:if>>사용자</option>
|
||||
<option value='ROLE_ADMIN' <c:if test="${menuCreatVO.authorCode == 'ROLE_ADMIN' }">selected</c:if>>관리자</option>
|
||||
<%-- <option value='ROLE_ANONYMOUS' <c:if test="${menuCreatVO.authorCode == 'ROLE_ANONYMOUS' || empty menuCreatVO.authorCode }">selected</c:if>>사용자</option>
|
||||
<option value='ROLE_ADMIN' <c:if test="${menuCreatVO.authorCode == 'ROLE_ADMIN' }">selected</c:if>>관리자</option> --%>
|
||||
<c:forEach var="authorList" items="${authorList}" varStatus="status">
|
||||
<option value='${authorList.authorCode}' <c:if test="${menuCreatVO.authorCode == authorList.authorCode}">selected</c:if>>${authorList.authorCode}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="menu_wrap">
|
||||
<div class="menu_area">
|
||||
<div class="btn_wrap">
|
||||
<button type="button" class="btnType02 all_open" onclick="$('#kopost_organization').jstree('open_all' );">모두열기</button>
|
||||
<button type="button" class="btnType03 all_close" onclick="$('#kopost_organization').jstree('close_node' , $('#0') );">모두닫기</button>
|
||||
<button type="button" class="btnType02 all_open" onclick="$('#itn_organization').jstree('open_all' );">모두열기</button>
|
||||
<button type="button" class="btnType03 all_close" onclick="$('#itn_organization').jstree('close_node' , $('#0') );">모두닫기</button>
|
||||
</div>
|
||||
<div class="menu_list" id="kopost_organization" class="jstree_orgChart"></div>
|
||||
<div class="menu_list" id="itn_organization" class="jstree_orgChart"></div>
|
||||
</div>
|
||||
<div class="menu_detail">
|
||||
<p class="menu_detail_tit">메뉴 추가등록 상세</p>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user