대시보드 결재대기함 구현

master
강석 최 2023-04-19 12:01:10 +09:00
parent 5c0f3d069b
commit adcdb6c7e4
13 changed files with 312 additions and 46 deletions

View File

@ -135,6 +135,18 @@ public class BaseController {
setSession(loginUser, request.getSession()); setSession(loginUser, request.getSession());
return new ModelAndView("redirect:/dashboard"); return new ModelAndView("redirect:/dashboard");
} }
@GetMapping("/apprvStayDocRedirect")
public ModelAndView apprvStayDocRedirect (DashboardAffair doc){
ModelAndView mav = new ModelAndView();
String url = menuMgtService.selectMenuUrl(doc.getBoard());
if(url.contains("?")){
url+="&refDocKey="+doc.getKey();
}else{
url+="?refDocKey="+doc.getKey();
}
mav.setViewName("redirect:"+url);
return mav;
}
public void setSession(@AuthenticationPrincipal UserInfo loginUser, HttpSession session){ public void setSession(@AuthenticationPrincipal UserInfo loginUser, HttpSession session){
loginUser.setDownOrganCdList(organConfigService.selectDownOrganList(loginUser.getOgCd())); loginUser.setDownOrganCdList(organConfigService.selectDownOrganList(loginUser.getOgCd()));

View File

@ -124,9 +124,11 @@ public class SecurityConfig{
).permitAll() // 권한 없이 접근 허용 ).permitAll() // 권한 없이 접근 허용
.antMatchers( .antMatchers(
"/dashboard", "/dashboard",
"/resetSession",
"/selectBoxOptions",
"/apprvStayDoc",
"/myInfo/**", "/myInfo/**",
"/modal/**", "/modal/**",
"/selectBoxOptions",
"/publicBoard/**", "/publicBoard/**",
"/faRpt/**", "/faRpt/**",
"/ivsgt/**", "/ivsgt/**",
@ -143,8 +145,7 @@ public class SecurityConfig{
"/counterIntelligence/**", "/counterIntelligence/**",
"/monitoring/**", "/monitoring/**",
"/intelligenceNetwork/**", "/intelligenceNetwork/**",
"/deadline/**", "/deadline/**"
"/resetSession"
).hasRole(Role.USER.name()) // USER 접근 허용 ).hasRole(Role.USER.name()) // USER 접근 허용
.antMatchers( .antMatchers(
"/authMgt/**", "/authMgt/**",

View File

@ -96,11 +96,11 @@ public class ActivityCaseController {
} }
@GetMapping("/activityCaseViewModal") @GetMapping("/activityCaseViewModal")
public ModelAndView activityCaseViewModal(@AuthenticationPrincipal UserInfo loginUser, ActivityCase activityCase, ActivityCaseInfo activityCaseInfo){ public ModelAndView activityCaseViewModal(@AuthenticationPrincipal UserInfo loginUser, ActivityCaseInfo activityCaseInfo){
ModelAndView mav = new ModelAndView("counterIntelligence/activityCase/activityCaseViewModal"); ModelAndView mav = new ModelAndView("counterIntelligence/activityCase/activityCaseViewModal");
mav.addObject("modalType", activityCase.getModalType()); mav.addObject("modalType", activityCaseInfo.getModalType());
activityCase = activityCaseService.selectActivityCase(activityCase.getReceiptKey());
activityCaseInfo = activityCaseService.selectActivityCaseInfo(activityCaseInfo.getCaseKey()); activityCaseInfo = activityCaseService.selectActivityCaseInfo(activityCaseInfo.getCaseKey());
ActivityCase activityCase = activityCaseService.selectActivityCase(activityCaseInfo.getReceiptKey());
mav.addObject("viewUserSeq", loginUser.getUserSeq()); mav.addObject("viewUserSeq", loginUser.getUserSeq());
String accessAuth = authMgtService.selectAccessConfigList String accessAuth = authMgtService.selectAccessConfigList
(loginUser.getUserSeq(), "/counterIntelligence/activityCaseList").get(0).getAccessAuth(); (loginUser.getUserSeq(), "/counterIntelligence/activityCaseList").get(0).getAccessAuth();

View File

@ -10,9 +10,9 @@ import java.time.LocalDateTime;
@Setter @Setter
@NoArgsConstructor @NoArgsConstructor
public class DashboardAffair{ public class DashboardAffair{
private String board; private Integer board;
private Integer key; private Integer key;
private String title; private String title="";
private String wrtUserNm; private String wrtUserNm;
private String wrtUserGrd; private String wrtUserGrd;
private LocalDateTime wrtDt; private LocalDateTime wrtDt;

View File

@ -289,6 +289,224 @@
limit 8 limit 8
</select> </select>
<select id="selectApprvStayList" parameterType="DashboardAffair" resultType="DashboardAffair"> <select id="selectApprvStayList" parameterType="DashboardAffair" resultType="DashboardAffair">
select 29 as board,
a.plan_key as key,
a.content_title as title,
a.wrt_dt
from plan_board a
where (
a.wrt_user_seq = #{userSeq}
or (
a.plan_state = 'DST002' and
( select ab.approval_auth ~ 'APC003' or ab.approval_auth ~ 'APC004'
from menu_mgt aa
left outer join approval_config ab on aa.menu_key = ab.menu_key and ab.user_seq = #{userSeq}
where aa.menu_key = 29)
)
or (
a.plan_state = 'DST004' and
( select ab.approval_auth ~ 'APC001' or ab.approval_auth ~ 'APC002'
from menu_mgt aa
left outer join approval_config ab on aa.menu_key = ab.menu_key and ab.user_seq = #{userSeq}
where aa.menu_key = 29)
)
)
union all
select 30 as board,
a.affair_key as key,
a.title,
a.wrt_dt
from affair_board a
inner join affair_rating b on a.affair_key = b.affair_key and b.rating_organ = #{ogCd}
where a.affair_category = 'CAT215'
and (
a.wrt_user_seq = #{userSeq} or
(
b.affair_status = 'DST002' and
( select ab.approval_auth ~ 'APC003' or ab.approval_auth ~ 'APC004'
from menu_mgt aa
left outer join approval_config ab on aa.menu_key = ab.menu_key and ab.user_seq = #{userSeq}
where aa.menu_key = 30)
) or (
b.affair_status = 'DST004' and
( select ab.approval_auth ~ 'APC001' or ab.approval_auth ~ 'APC002'
from menu_mgt aa
left outer join approval_config ab on aa.menu_key = ab.menu_key and ab.user_seq = #{userSeq}
where aa.menu_key = 30)
)
)
union all
select 31 as board,
a.result_key as key,
a.clear_title as title,
a.wrt_dt
from result_board a
where (
a.wrt_user_seq = #{userSeq} or (
a.result_state = 'DST002' and
( select ab.approval_auth ~ 'APC003' or ab.approval_auth ~ 'APC004'
from menu_mgt aa
left outer join approval_config ab on aa.menu_key = ab.menu_key and ab.user_seq = #{userSeq}
where aa.menu_key = 31)
) or (
a.result_state = 'DST004' and
( select ab.approval_auth ~ 'APC001' or ab.approval_auth ~ 'APC002'
from menu_mgt aa
left outer join approval_config ab on aa.menu_key = ab.menu_key and ab.user_seq = #{userSeq}
where aa.menu_key = 31)
)
)
union all
select 32 as board,
a.op_key as key,
a.op_sdate||' '||a.op_name||' 운영 계획' as title,
a.wrt_dt
from operation_plan a
where (
a.wrt_user_seq = #{userSeq}
or (
a.op_state = 'DST002' and
( select ab.approval_auth ~ 'APC003' or ab.approval_auth ~ 'APC004'
from menu_mgt aa
left outer join approval_config ab on aa.menu_key = ab.menu_key and ab.user_seq = #{userSeq}
where aa.menu_key = 32 )
) or (
a.op_state = 'DST004' and
( select ab.approval_auth ~ 'APC001' or ab.approval_auth ~ 'APC002'
from menu_mgt aa
left outer join approval_config ab on aa.menu_key = ab.menu_key and ab.user_seq = #{userSeq}
where aa.menu_key = 32
)
)
)
union all
select 33 as board,
a.affair_key as key,
a.title,
a.wrt_dt
from affair_board a
inner join affair_rating b on a.affair_key = b.affair_key and b.rating_organ = #{ogCd}
where a.affair_category = 'CAT216'
and (
a.wrt_user_seq = #{userSeq} or (
b.affair_status = 'DST002' and
( select ab.approval_auth ~ 'APC003' or ab.approval_auth ~ 'APC004'
from menu_mgt aa
left outer join approval_config ab on aa.menu_key = ab.menu_key and ab.user_seq = #{userSeq}
where aa.menu_key = 33 )
) or (
b.affair_status = 'DST004' and
( select ab.approval_auth ~ 'APC001' or ab.approval_auth ~ 'APC002'
from menu_mgt aa
left outer join approval_config ab on aa.menu_key = ab.menu_key and ab.user_seq = #{userSeq}
where aa.menu_key = 33 )
)
)
union all
select 34 as board,
a.ia_key as key,
a.ia_sdate||'~'||a.ia_edate||' 운영 실적 분석' as title,
a.wrt_dt
from intelligence_analyze a
where (
a.wrt_user_seq = #{userSeq}
or (
a.ia_state = 'DST002' and
( select ab.approval_auth ~ 'APC003' or ab.approval_auth ~ 'APC004'
from menu_mgt aa
left outer join approval_config ab on aa.menu_key = ab.menu_key and ab.user_seq = #{userSeq}
where aa.menu_key = 34 )
) or (
a.ia_state = 'DST004' and
( select ab.approval_auth ~ 'APC001' or ab.approval_auth ~ 'APC002'
from menu_mgt aa
left outer join approval_config ab on aa.menu_key = ab.menu_key and ab.user_seq = #{userSeq}
where aa.menu_key = 34 )
)
)
union all
select 35 as board,
a.fer_key as key,
b.op_name||' 해고(연장)보고' as title,
a.wrt_dt
from fire_extension_report a
inner join operation_plan b on a.op_key = b.op_key
where (
a.wrt_user_seq = #{userSeq}
or (
a.fer_state = 'DST002' and
( select ab.approval_auth ~ 'APC003' or ab.approval_auth ~ 'APC004'
from menu_mgt aa
left outer join approval_config ab on aa.menu_key = ab.menu_key and ab.user_seq = #{userSeq}
where aa.menu_key = 35 )
) or (
a.fer_state = 'DST004' and
( select ab.approval_auth ~ 'APC001' or ab.approval_auth ~ 'APC002'
from menu_mgt aa
left outer join approval_config ab on aa.menu_key = ab.menu_key and ab.user_seq = #{userSeq}
where aa.menu_key = 35 )
)
)
union all
select 36 as board,
a.md_key as key,
a.md_title as title,
a.wrt_dt
from monitoring_designation a
where (
a.wrt_user_seq = #{userSeq}
or (
a.md_state = 'DST002' and
( select ab.approval_auth ~ 'APC003' or ab.approval_auth ~ 'APC004'
from menu_mgt aa
left outer join approval_config ab on aa.menu_key = ab.menu_key and ab.user_seq = #{userSeq}
where aa.menu_key = 36)
) or (
a.md_state = 'DST004' and
( select ab.approval_auth ~ 'APC001' or ab.approval_auth ~ 'APC002'
from menu_mgt aa
left outer join approval_config ab on aa.menu_key = ab.menu_key and ab.user_seq = #{userSeq}
where aa.menu_key = 36)
)
)
union all
select 37 as board,
a.mr_key as key,
a.mr_title as title,
a.wrt_dt
from monitoring_result a
where (
a.wrt_user_seq = #{userSeq}
or (
a.mr_state = 'DST002' and
( select ab.approval_auth ~ 'APC003' or ab.approval_auth ~ 'APC004'
from menu_mgt aa
left outer join approval_config ab on aa.menu_key = ab.menu_key and ab.user_seq = #{userSeq}
where aa.menu_key = 37)
) or (
a.mr_state = 'DST004' and
( select ab.approval_auth ~ 'APC001' or ab.approval_auth ~ 'APC002'
from menu_mgt aa
left outer join approval_config ab on aa.menu_key = ab.menu_key and ab.user_seq = #{userSeq}
where aa.menu_key = 37 )
)
)
union all
select 12 as board,
b.case_key as key,
b.title,
b.wrt_dt
from activity_case a
inner join activity_case_info b on a.receipt_key = b.receipt_key
where (
a.wrt_user_seq = #{userSeq}
or b.case_key in (
select case_key
from activity_case_apprv
where user_seq = #{userSeq}
)
)
order by wrt_dt desc
limit 9
</select> </select>
</mapper> </mapper>

View File

@ -6,6 +6,15 @@ $(function(){
autoclose: true autoclose: true
}); });
}) })
if(location.search.includes("refDocKey")){
const params = location.search.split('&');
$.each(params, function (idx, param){
if(param.includes("refDocKey")){
const key = param.slice(param.indexOf("=")+1, param.length);
getActivityCaseViewModal(key, null);
}
})
}
$(document).on('click', '.addActivityCaseInfoBtn', function (){ $(document).on('click', '.addActivityCaseInfoBtn', function (){
getActivityCaseEditModal(null, null, $(this).attr('data-casetype')); getActivityCaseEditModal(null, null, $(this).attr('data-casetype'));
}) })
@ -58,7 +67,7 @@ $(document).on('click', '.activityCaseTr', function (){
}) })
$(document).on('click', '.summaryTr', function (){ $(document).on('click', '.summaryTr', function (){
getActivityCaseViewModal($(this).attr("data-receiptkey"), $(this).attr("data-casekey"), $(this).attr("data-modaltype")); getActivityCaseViewModal($(this).attr("data-casekey"), $(this).attr("data-modaltype"));
}) })
$(document).on('click', '#editInfoBtn', function (){ $(document).on('click', '#editInfoBtn', function (){
@ -153,10 +162,10 @@ function getActivityCaseSummaryModal(receiptKey, modalType){
}); });
} }
function getActivityCaseViewModal(receiptKey, caseKey, modalType){ function getActivityCaseViewModal(caseKey, modalType){
$.ajax({ $.ajax({
url: '/counterIntelligence/activityCaseViewModal', url: '/counterIntelligence/activityCaseViewModal',
data: {receiptKey: receiptKey, caseKey: caseKey, modalType: modalType}, data: {caseKey: caseKey, modalType: modalType},
type: 'GET', type: 'GET',
dataType:"html", dataType:"html",
success: function(html){ success: function(html){

View File

@ -28,28 +28,9 @@ $(document).on('click', '.faRptTr', function (){
location.href = "/faRpt/faRptBoard?activeTab=receive&refDocKey="+$(this).find('.faRptKey').val(); location.href = "/faRpt/faRptBoard?activeTab=receive&refDocKey="+$(this).find('.faRptKey').val();
}) })
$(document).on('click', '.affairTr', function (){ $(document).on('click', '.apprvStayTr', function (){
switch ($(this).find('.board').val()){ const tr = $(this);
case "plan1": location.href = "/apprvStayDocRedirect?board="
location.href = "/affairPlan/planMgt?refDocKey="+$(this).find(".key").val(); +tr.find(".boardNo").val()
break; +"&key="+tr.find(".docKey").val();
case "affair1":
location.href = "/affair/affairMgt/myReport?affairCategory=CAT215&refDocKey="+$(this).find(".key").val();
break;
case "result":
location.href = "/affairResult/resultMgt?refDocKey="+$(this).find(".key").val();
break;
case "plan2":
/*location.href = "/affairPlan/planMgt?refDocKey="+$(this).find(".key").val();*/
break;
case "affair2":
location.href = "/affair/affairMgt/myReport?affairCategory=CAT215&refDocKey="+$(this).find(".key").val();
break;
case "analyze":
/*location.href = "/affairPlan/planMgt?refDocKey="+$(this).find(".key").val();*/
break;
case "fire":
/*location.href = "/affairPlan/planMgt?refDocKey="+$(this).find(".key").val();*/
break;
}
}) })

View File

@ -1,4 +1,13 @@
$(function(){ $(function(){
if(location.search.includes("refDocKey")){
const params = location.search.split('&');
$.each(params, function (idx, param){
if(param.includes("refDocKey")){
const key = param.slice(param.indexOf("=")+1, param.length);
fireExtensionReportViewModal(key);
}
})
}
$("#dateSelectorDiv").datepicker({ $("#dateSelectorDiv").datepicker({
format: "yyyy-mm-dd", format: "yyyy-mm-dd",
language: "ko", language: "ko",

View File

@ -1,4 +1,13 @@
$(function(){ $(function(){
if(location.search.includes("refDocKey")){
const params = location.search.split('&');
$.each(params, function (idx, param){
if(param.includes("refDocKey")){
const key = param.slice(param.indexOf("=")+1, param.length);
getIntelligenceAnalyzeViewModal(key);
}
})
}
$("#dateSelectorDiv").datepicker({ $("#dateSelectorDiv").datepicker({
format: "yyyy-mm-dd", format: "yyyy-mm-dd",
language: "ko", language: "ko",

View File

@ -1,4 +1,13 @@
$(function(){ $(function(){
if(location.search.includes("refDocKey")){
const params = location.search.split('&');
$.each(params, function (idx, param){
if(param.includes("refDocKey")){
const key = param.slice(param.indexOf("=")+1, param.length);
getOperationPlanViewModal(key);
}
})
}
$("#dateSelectorDiv").datepicker({ $("#dateSelectorDiv").datepicker({
format: "yyyy-mm-dd", format: "yyyy-mm-dd",
language: "ko", language: "ko",

View File

@ -1,4 +1,13 @@
$(function(){ $(function(){
if(location.search.includes("refDocKey")){
const params = location.search.split('&');
$.each(params, function (idx, param){
if(param.includes("refDocKey")){
const key = param.slice(param.indexOf("=")+1, param.length);
getDesignationViewModal(key);
}
})
}
$("#dateSelectorDiv").datepicker({ $("#dateSelectorDiv").datepicker({
format: "yyyy-mm-dd", format: "yyyy-mm-dd",
language: "ko", language: "ko",

View File

@ -1,4 +1,13 @@
$(function(){ $(function(){
if(location.search.includes("refDocKey")){
const params = location.search.split('&');
$.each(params, function (idx, param){
if(param.includes("refDocKey")){
const key = param.slice(param.indexOf("=")+1, param.length);
getResultViewModal(key);
}
})
}
$("#dateSelectorDiv").datepicker({ $("#dateSelectorDiv").datepicker({
format: "yyyy-mm-dd", format: "yyyy-mm-dd",
language: "ko", language: "ko",

View File

@ -51,23 +51,23 @@
<col style="width: 20%"> <col style="width: 20%">
</colgroup> </colgroup>
<tbody> <tbody>
<!--<th:block th:if="${#lists.isEmpty(noticeList)}"> <th:block th:if="${#lists.isEmpty(apprvStayList)}">
<tr> <tr>
<td colspan="2">공지사항이 없습니다.</td> <td colspan="2">결재대기 문서가 없습니다.</td>
</tr> </tr>
</th:block> </th:block>
<th:block th:unless="${#lists.isEmpty(noticeList)}"> <th:block th:unless="${#lists.isEmpty(apprvStayList)}">
<tr class="noticeTr" th:each="notice:${noticeList}"> <tr class="apprvStayTr" th:each="doc:${apprvStayList}">
<input type="hidden" class="publicKey" th:value="${notice.publicKey}"> <input type="hidden" class="boardNo" th:value="${doc.board}">
<input type="hidden" class="docKey" th:value="${doc.key}">
<td> <td>
<i class="bi bi-dot" style="color: #3d73d7"></i> <i class="bi bi-dot" style="color: #3d73d7"></i>
<th:block th:if="${#strings.length(notice.title)>20}" th:text="|${#strings.substring(notice.title, 0, 20)}...|"></th:block> <th:block th:if="${#strings.length(doc.title)>20}" th:text="|${#strings.substring(doc.title, 0, 20)}...|"></th:block>
<th:block th:unless="${#strings.length(notice.title)>20}" th:text="${notice.title}"></th:block> <th:block th:unless="${#strings.length(doc.title)>20}" th:text="${doc.title}"></th:block>
</td> </td>
<td th:text="${notice.wrtUserNm}"></td> <td th:text="${#temporals.format(doc.wrtDt, 'yyyy-MM-dd')}"></td>
<td th:text="${#temporals.format(notice.wrtDt, 'yyyy-MM-dd')}"></td>
</tr> </tr>
</th:block>--> </th:block>
</tbody> </tbody>
</table> </table>
</dd> </dd>