From 96ef0ca9f4edeb682e478234b93ad6b5e857fe8e Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Fri, 5 Jan 2024 13:48: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=ED=99=94=EB=A9=B4=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 | 38 +++++++++++++++++++ .../xit/fims/mngt/web/Mngt03Controller.java | 5 ++- .../WEB-INF/jsp/fims/mngt/mngt03010-main.jsp | 24 +++++++----- src/main/webapp/WEB-INF/jsp/index.jsp | 34 +++++++++++++++-- 4 files changed, 85 insertions(+), 16 deletions(-) diff --git a/src/main/java/cokr/xit/fims/base/CodeController.java b/src/main/java/cokr/xit/fims/base/CodeController.java index 06dbbd01..f51e67f2 100644 --- a/src/main/java/cokr/xit/fims/base/CodeController.java +++ b/src/main/java/cokr/xit/fims/base/CodeController.java @@ -12,6 +12,10 @@ import org.springframework.web.servlet.ModelAndView; import cokr.xit.base.code.service.CodeQuery; import cokr.xit.base.code.service.bean.CodeBean; +import cokr.xit.fims.cmmn.CmmnQuery; +import cokr.xit.fims.mngt.service.TaskService; +import cokr.xit.fims.mngt.service.bean.FactionBean; +import cokr.xit.foundation.UserInfo; import cokr.xit.foundation.data.DataObject; @Controller @@ -19,6 +23,12 @@ public class CodeController extends cokr.xit.base.code.web.CodeController { @Resource(name = "codeBean") private CodeBean codeBean; + @Resource(name = "taskService") + private TaskService taskService; + + @Resource(name = "factionBean") + private FactionBean factionBean; + @RequestMapping(name="모든 업무구분코드 조회",value="/getAllTaskSeCd.do") public ModelAndView getAllTaskSeCd() { ModelAndView mav = new ModelAndView("jsonView"); @@ -33,4 +43,32 @@ public class CodeController extends cokr.xit.base.code.web.CodeController { return mav; } + @RequestMapping(name="시군구 업무 설정 유무 조회", value="/sggHasTask.do") + public ModelAndView sggHasTask() { + ModelAndView mav = new ModelAndView("jsonView"); + + UserInfo userInfo = currentUser(); + if(userInfo.getInstitute().equals("default")) { + mav.addObject("sggHasTask", "Y"); + } else { + + factionBean.initUserInfo(userInfo); + + String sggCd = (String)userInfo.getInfo().get("sggCd"); + + CmmnQuery req = new CmmnQuery(); + req.setUseYN("Y"); + req.setSggCd(sggCd); + List result = taskService.getTasks(req); + if(result != null && !result.isEmpty()) { + mav.addObject("taskForSgg", "Y"); + } else { + mav.addObject("taskForSgg", "N"); + } + + + } + + return mav; + } } \ No newline at end of file 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 c324b0d5..4079d88d 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,7 @@ 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.foundation.data.DataObject; /**시군구관리 서비스 웹 컨트롤러.
* {웹 컨텍스트}/mngt/mngt03 로 접근할 수 있다. @@ -48,13 +49,13 @@ public class Mngt03Controller extends ApplicationController { } public ModelAndView getTasks(CmmnQuery req) { - List result = taskService.getTasks(req); + List result = taskService.getTasks(req); return setCollectionInfo(new ModelAndView("jsonView"), result, "task"); } public ModelAndView getVltns(VltnQuery req) { - List result = vltnService.getVltns(req); + List result = vltnService.getVltns(req); return setCollectionInfo(new ModelAndView("jsonView"), result, "vltn"); } } diff --git a/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt03010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt03010-main.jsp index 4fbefe9c..60e1f8f1 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt03010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt03010-main.jsp @@ -31,7 +31,7 @@ - + @@ -77,7 +77,6 @@ @@ -143,8 +142,6 @@ - -