diff --git a/src/main/java/cokr/xit/fims/base/UserController.java b/src/main/java/cokr/xit/fims/base/UserController.java index 5637bf3e..50e16d4b 100644 --- a/src/main/java/cokr/xit/fims/base/UserController.java +++ b/src/main/java/cokr/xit/fims/base/UserController.java @@ -100,8 +100,8 @@ public class UserController extends cokr.xit.base.user.web.UserController taskList = codeBean.getCodeList((new CodeQuery()).setGroupIDs("FIM054")) + .stream().map(item -> item.string("CODE")).toList(); + + List availableTaskList = new ArrayList<>(); - List hasTaskAuthList = new ArrayList<>(); + if(userInfo.getInstitute().equals("default")) { //최고관리자 - CodeQuery codeQuery = new CodeQuery(); - codeQuery.setGroupIDs("FIM054"); - List taskList = codeBean.getCodeList(codeQuery); + availableTaskList = taskList; + + } else if(isAdmin) { //관리자 + Map info = userInfo.getInfo(); + if(info == null || info.get("sggCd") == null || info.get("sggCd").equals("")) { + factionBean.initUserInfo(userInfo); + } - List authorities = userInfo.getAuthorities(); - if(authorities != null && !authorities.isEmpty()) { - for(Authority authority : authorities) { - String authId = authority.getId(); + availableTaskList = taskBean.getTasks((new CmmnQuery()).setSggCd((String)userInfo.getInfo().get("sggCd")).setUseYN("Y")) + .stream().map(item -> item.string("TASK_SE_CD")).toList(); - for(int i=0; i authorities = userInfo.getAuthorities(); + + if(authorities != null && !authorities.isEmpty()) { + for(Authority authority : authorities) { + String authId = authority.getId(); + + for(int i=0; i/* 업무 정보 객체 가져오기(taskMapper.selectTasks) */ WHERE T.SGG_CD = #{sggCd} + AND T.TASK_SE_CD = #{taskSeCd} + AND T.USE_YN = #{useYN} - + - - - - - - - - - - - - - - - - - - - - - - +
  • diff --git a/src/main/webapp/WEB-INF/jsp/index.jsp b/src/main/webapp/WEB-INF/jsp/index.jsp index a3d8718d..c508f6e4 100644 --- a/src/main/webapp/WEB-INF/jsp/index.jsp +++ b/src/main/webapp/WEB-INF/jsp/index.jsp @@ -72,6 +72,14 @@ pageObject.childReq = []; pageObject.parentRes = []; + var ALL_TASK = { + "PVS" : "주정차위반", + "BPV" : "전용차로위반", + "DPV" : "장애인전용", + "ECA" : "전기차주차", + "TPV" : "밤샘주차위반", + "DVS" : "미세먼지" + }; var MY_INFO = {}; function getBrowserName() { @@ -152,6 +160,24 @@ return; } + //사용자별 선택가능한 업무 라디오버튼 렌더링 + for(var i=0; i < MY_INFO.info.taskForUser.length; i++){ + var taskCd = MY_INFO.info.taskForUser[i]; + var taskNm = ALL_TASK[taskCd]; + + var radio = ""; + radio += ""; + radio += ""; + radio += ""; + radio += ""; + $("#taskSeCd--Top").append(radio); + } + + //업무선택 모달 다이얼로그 + if(MY_INFO.info.defaultTask == null || MY_INFO.info.defaultTask == ""){ + //$("#selectTaskModal").modal("show"); + //return; + } //업무 체크 if("${param.taskSeCd}" == "" || $("#layout-navbar").find("input[name='taskSeCd'][value='${param.taskSeCd}']").length == 0){