메뉴관리 사용여부 컬럼 추가.

외사첩보망 견문관리 추가.
강석 최 2022-10-20 13:53:22 +09:00
parent 5a1a727d6b
commit a6ed621285
12 changed files with 52 additions and 19 deletions

View File

@ -39,7 +39,8 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
mav.addObject("page", "main"); mav.addObject("page", "main");
mav.addObject("searchUrl", "/affair/affairMgt"); mav.addObject("searchUrl", "/affair/affairMgt");
//메뉴권한 확인 //메뉴권한 확인
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/affair/affairMgt").get(0).getAccessAuth(); String accessAuth = authMgtService.selectAccessConfigList
(loginUser.getUserSeq(), "/affair/affairMgt?affairCategory="+affairBoard.getAffairCategory()).get(0).getAccessAuth();
switch (accessAuth){ switch (accessAuth){
case "ACC001": // 조회 case "ACC001": // 조회
case "ACC002": // 작성 case "ACC002": // 작성
@ -51,7 +52,8 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
break; break;
} }
//결재권한 확인 //결재권한 확인
String apprvAuth = authMgtService.selectApprovalConfigList(loginUser.getUserSeq(), "/affair/affairMgt").get(0).getApprovalAuth(); String apprvAuth = authMgtService.selectApprovalConfigList
(loginUser.getUserSeq(), "/affair/affairMgt?affairCategory="+affairBoard.getAffairCategory()).get(0).getApprovalAuth();
affairBoard.setRatingOrgan(loginUser.getOgCd()); affairBoard.setRatingOrgan(loginUser.getOgCd());
mav.addObject("accessAuth", accessAuth); mav.addObject("accessAuth", accessAuth);
@ -70,7 +72,8 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
mav.addObject("page", "stay"); mav.addObject("page", "stay");
mav.addObject("searchUrl", "/affair/stayPage"); mav.addObject("searchUrl", "/affair/stayPage");
//메뉴권한 확인 //메뉴권한 확인
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/affair/affairMgt").get(0).getAccessAuth(); String accessAuth = authMgtService.selectAccessConfigList
(loginUser.getUserSeq(), "/affair/affairMgt?affairCategory="+affairBoard.getAffairCategory()).get(0).getAccessAuth();
switch (accessAuth){ switch (accessAuth){
case "ACC001": // 조회 case "ACC001": // 조회
case "ACC002": // 작성 case "ACC002": // 작성
@ -81,7 +84,8 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
break; break;
} }
//결재권한 확인 //결재권한 확인
String apprvAuth = authMgtService.selectApprovalConfigList(loginUser.getUserSeq(), "/affair/affairMgt").get(0).getApprovalAuth(); String apprvAuth = authMgtService.selectApprovalConfigList
(loginUser.getUserSeq(), "/affair/affairMgt?affairCategory="+affairBoard.getAffairCategory()).get(0).getApprovalAuth();
affairBoard.setRatingOrgan(loginUser.getOgCd()); affairBoard.setRatingOrgan(loginUser.getOgCd());
if(apprvAuth==null) { if(apprvAuth==null) {
if(!accessAuth.equals("ACC003")){ if(!accessAuth.equals("ACC003")){
@ -121,7 +125,8 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
mav.addObject("page", "commit"); mav.addObject("page", "commit");
mav.addObject("searchUrl", "/affair/commitPage"); mav.addObject("searchUrl", "/affair/commitPage");
//메뉴권한 확인 //메뉴권한 확인
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/affair/affairMgt").get(0).getAccessAuth(); String accessAuth = authMgtService.selectAccessConfigList
(loginUser.getUserSeq(), "/affair/affairMgt?affairCategory="+affairBoard.getAffairCategory()).get(0).getAccessAuth();
switch (accessAuth){ switch (accessAuth){
case "ACC001": // 조회 case "ACC001": // 조회
case "ACC002": // 작성 case "ACC002": // 작성
@ -132,7 +137,8 @@ public class AffairController { // 첩보수집활동 > 외사경찰 견문관
break; break;
} }
//결재권한 확인 //결재권한 확인
String apprvAuth = authMgtService.selectApprovalConfigList(loginUser.getUserSeq(), "/affair/affairMgt").get(0).getApprovalAuth(); String apprvAuth = authMgtService.selectApprovalConfigList
(loginUser.getUserSeq(), "/affair/affairMgt?affairCategory="+affairBoard.getAffairCategory()).get(0).getApprovalAuth();
affairBoard.setRatingOrgan(loginUser.getOgCd()); affairBoard.setRatingOrgan(loginUser.getOgCd());
if(apprvAuth==null) { if(apprvAuth==null) {
if(!accessAuth.equals("ACC003")){ if(!accessAuth.equals("ACC003")){

View File

@ -59,6 +59,8 @@ public class AffairBoard extends BaseModel {
private LocalDate autoDelete; private LocalDate autoDelete;
@Column(name = "view_status") @Column(name = "view_status")
private String viewStatus; private String viewStatus;
@Column(name = "affair_category")
private String affairCategory;
@Transient @Transient
private String organUp; private String organUp;

View File

@ -32,6 +32,10 @@ public class MenuMgt extends BaseModel {
private String menuUrl; private String menuUrl;
@Column(name = "approval_chk") @Column(name = "approval_chk")
private String approvalChk; private String approvalChk;
@Column(name = "deadline_chk")
private String deadlineChk;
@Column(name = "use_chk")
private String useChk;
@Transient @Transient
private List<MenuMgt> childList; private List<MenuMgt> childList;

View File

@ -6,6 +6,9 @@
<mapper namespace="com.dbnt.faisp.fpiMgt.affair.mapper.AffairMapper"> <mapper namespace="com.dbnt.faisp.fpiMgt.affair.mapper.AffairMapper">
<sql id="selectAffairBoardWhere"> <sql id="selectAffairBoardWhere">
<where> <where>
<if test='affairCategory != null and affairCategory != ""'>
and a.affair_category = #{affairCategory}
</if>
<if test='wrtUserSeq != null and wrtUserSeq != ""'> <if test='wrtUserSeq != null and wrtUserSeq != ""'>
and a.wrt_user_seq = #{wrtUserSeq} and a.wrt_user_seq = #{wrtUserSeq}
</if> </if>

View File

@ -13,11 +13,10 @@
from menu_mgt a from menu_mgt a
left outer join access_config b left outer join access_config b
on a.menu_key = b.menu_key and b.user_seq = #{userSeq} on a.menu_key = b.menu_key and b.user_seq = #{userSeq}
<where> where a.use_chk = 'T'
<if test='menuUrl != null and menuUrl != ""'> <if test='menuUrl != null and menuUrl != ""'>
and a.menu_url = #{menuUrl} and a.menu_url = #{menuUrl}
</if> </if>
</where>
order by cat1_cd, cat2_cd, cat3_cd order by cat1_cd, cat2_cd, cat3_cd
</select> </select>
@ -31,6 +30,7 @@
left outer join approval_config b left outer join approval_config b
on a.menu_key = b.menu_key and b.user_seq = #{userSeq} on a.menu_key = b.menu_key and b.user_seq = #{userSeq}
where a.approval_chk = 'T' where a.approval_chk = 'T'
and a.use_chk = 'T'
<if test='menuUrl != null and menuUrl != ""'> <if test='menuUrl != null and menuUrl != ""'>
and a.menu_url = #{menuUrl} and a.menu_url = #{menuUrl}
</if> </if>

View File

@ -24,7 +24,9 @@
cat2_cd as cat2Cd, cat2_cd as cat2Cd,
cat3_cd as cat3Cd, cat3_cd as cat3Cd,
menu_url as menuUrl, menu_url as menuUrl,
approval_chk as approvalChk approval_chk as approvalChk,
deadline_chk as deadlineChk,
use_chk as useChk
from menu_mgt from menu_mgt
<where> <where>
<include refid="selectMenuMgtListWhere"></include> <include refid="selectMenuMgtListWhere"></include>
@ -49,6 +51,7 @@
inner join menu_mgt ab on aa.menu_key = ab.menu_key inner join menu_mgt ab on aa.menu_key = ab.menu_key
where aa.user_seq = #{userSeq} where aa.user_seq = #{userSeq}
and aa.access_auth is not null and aa.access_auth is not null
and aa.access_auth &lt;> ''
order by cat1_cd, cat2_cd, cat3_cd order by cat1_cd, cat2_cd, cat3_cd
</select> </select>
@ -62,6 +65,7 @@
inner join menu_mgt ab on aa.menu_key = ab.menu_key inner join menu_mgt ab on aa.menu_key = ab.menu_key
where aa.user_seq = #{userSeq} where aa.user_seq = #{userSeq}
and aa.access_auth is not null and aa.access_auth is not null
and aa.access_auth &lt;> ''
<include refid="selectMenuMgtListWhere"></include> <include refid="selectMenuMgtListWhere"></include>
order by cat1_cd, cat2_cd, cat3_cd order by cat1_cd, cat2_cd, cat3_cd
limit #{rowCnt} offset #{firstIndex} limit #{rowCnt} offset #{firstIndex}
@ -73,8 +77,7 @@
inner join menu_mgt ab on aa.menu_key = ab.menu_key inner join menu_mgt ab on aa.menu_key = ab.menu_key
where aa.user_seq = #{userSeq} where aa.user_seq = #{userSeq}
and aa.access_auth is not null and aa.access_auth is not null
<where> and aa.access_auth &lt;> ''
<include refid="selectMenuMgtListWhere"></include> <include refid="selectMenuMgtListWhere"></include>
</where>
</select> </select>
</mapper> </mapper>

View File

@ -6,13 +6,13 @@ $(function(){
}); });
}) })
$(document).on('click', '#affairTab', function (){ $(document).on('click', '#affairTab', function (){
location.href = "/affair/affairMgt"; location.href = "/affair/affairMgt?affairCategory="+$("#affairCategory").val();
}) })
$(document).on('click', '#stayTab', function (){ $(document).on('click', '#stayTab', function (){
location.href = "/affair/stayPage"; location.href = "/affair/stayPage?affairCategory="+$("#affairCategory").val();
}) })
$(document).on('click', '#commitTab', function (){ $(document).on('click', '#commitTab', function (){
location.href = "/affair/commitPage"; location.href = "/affair/commitPage?affairCategory="+$("#affairCategory").val();
}) })
$(document).on('click', '.affairTr', function (event){ $(document).on('click', '.affairTr', function (event){
const target = event.target; const target = event.target;
@ -146,7 +146,10 @@ function getAffairViewModal(affairKey){
function getAffairEditModal(affairKey){ function getAffairEditModal(affairKey){
$.ajax({ $.ajax({
url: '/affair/affairEditModal', url: '/affair/affairEditModal',
data: {affairKey: affairKey}, data: {
affairKey: affairKey,
affairCategory: $("#affairCategory").val()
},
type: 'GET', type: 'GET',
dataType:"html", dataType:"html",
success: function(html){ success: function(html){

View File

@ -14,7 +14,8 @@ $(document).on('click', '.menuTr', function (event){
cat2Cd: row.find(".cat2Cd").val(), cat2Cd: row.find(".cat2Cd").val(),
cat3Cd: row.find(".cat3Cd").val(), cat3Cd: row.find(".cat3Cd").val(),
menuUrl: row.find(".menuUrl").val(), menuUrl: row.find(".menuUrl").val(),
approvalChk: row.find(".approvalChk").val() approvalChk: row.find(".approvalChk").val(),
useChk: row.find(".useChk").val()
}) })
} }
} }

View File

@ -50,11 +50,17 @@
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<label for="menuUrl" class="col-sm-4 col-form-label col-form-label-sm text-center">결재권한설정</label> <label for="approvalChk" class="col-sm-4 col-form-label col-form-label-sm text-center">결재권한설정</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input type="checkbox" id="approvalChk" name="approvalChk" value="T" th:checked="${menuMgt.approvalChk eq 'T'}"> <input type="checkbox" id="approvalChk" name="approvalChk" value="T" th:checked="${menuMgt.approvalChk eq 'T'}">
</div> </div>
</div> </div>
<div class="row mb-3">
<label for="useChk" class="col-sm-4 col-form-label col-form-label-sm text-center">사용여부</label>
<div class="col-sm-6">
<input type="checkbox" id="useChk" name="useChk" value="T" th:checked="${menuMgt.useChk eq 'T'}">
</div>
</div>
</form> </form>
</div> </div>
<div class="modal-footer justify-content-between"> <div class="modal-footer justify-content-between">

View File

@ -70,6 +70,7 @@
<th>중분류</th> <th>중분류</th>
<th>소분류</th> <th>소분류</th>
<th>url</th> <th>url</th>
<th>사용여부</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -80,6 +81,7 @@
<input type="hidden" class="cat3Cd" th:value="${menuMgt.cat3Cd}"> <input type="hidden" class="cat3Cd" th:value="${menuMgt.cat3Cd}">
<input type="hidden" class="menuUrl" th:value="${menuMgt.menuUrl}"> <input type="hidden" class="menuUrl" th:value="${menuMgt.menuUrl}">
<input type="hidden" class="approvalChk" th:value="${menuMgt.approvalChk}"> <input type="hidden" class="approvalChk" th:value="${menuMgt.approvalChk}">
<input type="hidden" class="useChk" th:value="${menuMgt.useChk}">
<td> <td>
<input type="checkbox" class="menuCheckBox" th:value="${menuMgt.menuKey}"> <input type="checkbox" class="menuCheckBox" th:value="${menuMgt.menuKey}">
</td> </td>
@ -102,6 +104,7 @@
<td></td> <td></td>
</th:block> </th:block>
<td th:text="${menuMgt.menuUrl}"></td> <td th:text="${menuMgt.menuUrl}"></td>
<td th:text="${menuMgt.useChk eq 'T'?'O':''}"></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View File

@ -9,6 +9,7 @@
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/> <input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/> <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
<input type="hidden" name="affairKey" th:value="${affair.affairKey}"> <input type="hidden" name="affairKey" th:value="${affair.affairKey}">
<input type="hidden" name="affairCategory" th:value="${affair.affairCategory}">
<input type="hidden" name="wrtOrgan" th:value="${affair.wrtOrgan}"> <input type="hidden" name="wrtOrgan" th:value="${affair.wrtOrgan}">
<input type="hidden" name="wrtPart" th:value="${affair.wrtPart}"> <input type="hidden" name="wrtPart" th:value="${affair.wrtPart}">
<input type="hidden" name="wrtUserSeq" th:value="${affair.wrtUserSeq}"> <input type="hidden" name="wrtUserSeq" th:value="${affair.wrtUserSeq}">

View File

@ -7,7 +7,7 @@
</th:block> </th:block>
<div layout:fragment="content"> <div layout:fragment="content">
<main class="pt-3"> <main class="pt-3">
<p>첩보수집활동 > 외사경찰 견문관리 > 견문관리</p> <p th:text="${#strings.concat('첩보수집활동 > ', (searchParams.affairCategory eq 'CAT215'?'외사경찰':'외사첩보망'), ' 견문관리 > 견문관리')}"></p>
<h4>견문관리</h4> <h4>견문관리</h4>
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/> <input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/> <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
@ -27,6 +27,7 @@
</ul> </ul>
<div class="tab-content border border-top-0 p-2"> <div class="tab-content border border-top-0 p-2">
<form method="get" th:action="${searchUrl}"> <form method="get" th:action="${searchUrl}">
<input type="hidden" name="affairCategory" id="affairCategory" th:value="${searchParams.affairCategory}">
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}"> <input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
<div class="row pe-3 py-1"> <div class="row pe-3 py-1">
<div class="col-1"> <div class="col-1">