From 9075d0a8c9077be1f1db7a470e20c32d2d154e41 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Mon, 8 Jan 2024 17:43:38 +0900 Subject: [PATCH] =?UTF-8?q?=EC=8B=9C=EA=B5=B0=EA=B5=AC=20=EA=B4=80?= =?UTF-8?q?=EB=A6=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cokr/xit/fims/base/CodeController.java | 4 +-- .../xit/fims/mngt/web/Mngt03Controller.java | 30 +++++++++++++++++-- .../cokr/xit/fims/task/web/CmnController.java | 4 +-- .../WEB-INF/jsp/fims/mngt/mngt03011-main.jsp | 10 +++++++ src/main/webapp/WEB-INF/jsp/index.jsp | 2 +- 5 files changed, 42 insertions(+), 8 deletions(-) create mode 100644 src/main/webapp/WEB-INF/jsp/fims/mngt/mngt03011-main.jsp diff --git a/src/main/java/cokr/xit/fims/base/CodeController.java b/src/main/java/cokr/xit/fims/base/CodeController.java index f51e67f2..739d622f 100644 --- a/src/main/java/cokr/xit/fims/base/CodeController.java +++ b/src/main/java/cokr/xit/fims/base/CodeController.java @@ -61,9 +61,9 @@ public class CodeController extends cokr.xit.base.code.web.CodeController { req.setSggCd(sggCd); List result = taskService.getTasks(req); if(result != null && !result.isEmpty()) { - mav.addObject("taskForSgg", "Y"); + mav.addObject("sggHasTask", "Y"); } else { - mav.addObject("taskForSgg", "N"); + mav.addObject("sggHasTask", "N"); } diff --git a/src/main/java/cokr/xit/fims/mngt/web/Mngt03Controller.java b/src/main/java/cokr/xit/fims/mngt/web/Mngt03Controller.java index 4079d88d..d317346e 100644 --- a/src/main/java/cokr/xit/fims/mngt/web/Mngt03Controller.java +++ b/src/main/java/cokr/xit/fims/mngt/web/Mngt03Controller.java @@ -11,6 +11,8 @@ import cokr.xit.fims.cmmn.CmmnQuery; import cokr.xit.fims.mngt.VltnQuery; import cokr.xit.fims.mngt.service.TaskService; import cokr.xit.fims.mngt.service.VltnService; +import cokr.xit.fims.mngt.service.bean.FactionBean; +import cokr.xit.foundation.UserInfo; import cokr.xit.foundation.data.DataObject; /**시군구관리 서비스 웹 컨트롤러.
@@ -37,13 +39,35 @@ public class Mngt03Controller extends ApplicationController { @Resource(name = "vltnService") private VltnService vltnService; + @Resource(name = "factionBean") + private FactionBean factionBean; + /** 시군구관리 메인화면을 연다. * @return fims/mngt/mngt03010-main */ - public ModelAndView sggMngtMain() { + public ModelAndView sggMngtMain(String sggCd) { ModelAndView mav = new ModelAndView(); - mav.setViewName("fims/mngt/mngt03010-main"); - mav.addObject("pageName", "mngt03010-main"); + + UserInfo userInfo = currentUser(); + + if(userInfo.getInstitute().equals("default")) { + if(ifEmpty(sggCd, ()->"").equals("")) { + + mav.setViewName("fims/mngt/mngt03011-main"); + mav.addObject("pageName", "mngt03011-main"); + + } else { + mav.setViewName("fims/mngt/mngt03010-main"); + mav.addObject("pageName", "mngt03010-main"); + mav.addObject("sggCd", sggCd); + } + + } else { + mav.setViewName("fims/mngt/mngt03010-main"); + mav.addObject("pageName", "mngt03010-main"); + factionBean.initUserInfo(userInfo); + mav.addObject("sggCd", userInfo.getInfo().get("sggCd")); + } return mav; } diff --git a/src/main/java/cokr/xit/fims/task/web/CmnController.java b/src/main/java/cokr/xit/fims/task/web/CmnController.java index 3d89f9f9..748ea24a 100644 --- a/src/main/java/cokr/xit/fims/task/web/CmnController.java +++ b/src/main/java/cokr/xit/fims/task/web/CmnController.java @@ -595,8 +595,8 @@ public class CmnController { @Override @RequestMapping(name="시군구 정보 관리 메인", value=METHOD_URL.sggMngtMain) - public ModelAndView sggMngtMain() { - return super.sggMngtMain(); + public ModelAndView sggMngtMain(String sggCd) { + return super.sggMngtMain(sggCd); } @Override diff --git a/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt03011-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt03011-main.jsp new file mode 100644 index 00000000..e9232768 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt03011-main.jsp @@ -0,0 +1,10 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> +<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> +시군구 목록 +
+
+
+ +
+
+
\ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/index.jsp b/src/main/webapp/WEB-INF/jsp/index.jsp index 273a509c..96861fd2 100644 --- a/src/main/webapp/WEB-INF/jsp/index.jsp +++ b/src/main/webapp/WEB-INF/jsp/index.jsp @@ -97,7 +97,7 @@ data: {}, dataType: 'json', success: function(resp, textStatus, jqXHR) { - if(resp.taskForSgg == "Y"){ + if(resp.sggHasTask == "Y"){ resolve({resp, textStatus, jqXHR}); } else { reject("시군구 업무 설정이 없습니다.");