diff --git a/src/main/java/cokr/xit/fims/mngt/web/Mngt04Controller.java b/src/main/java/cokr/xit/fims/mngt/web/Mngt04Controller.java
index 0f017df1..8f0abe0b 100644
--- a/src/main/java/cokr/xit/fims/mngt/web/Mngt04Controller.java
+++ b/src/main/java/cokr/xit/fims/mngt/web/Mngt04Controller.java
@@ -7,6 +7,7 @@ import javax.annotation.Resource;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.base.web.ApplicationController;
+import cokr.xit.fims.cmmn.CmmnQuery;
import cokr.xit.fims.mngt.dao.FactionMapper;
import cokr.xit.fims.mngt.service.FactionService;
import cokr.xit.fims.mngt.service.bean.FactionBean;
@@ -23,6 +24,8 @@ public class Mngt04Controller extends ApplicationController {
public class METHOD_URL {
public static final String
deptMngtMain = "/010/main.do"
+ , getDeptList = "/010/list.do"
+ , getDeptInfo = "/020/info.do"
;
}
@@ -52,4 +55,36 @@ public class Mngt04Controller extends ApplicationController {
return mav;
}
+
+ /**부서 목록을 조회한다.
+ * {@link FactionService#getDeptList(CmmnQuery)} 참고
+ * @param query 부서 목록 조회 조건
+ * @return jsonView
+ */
+ public ModelAndView getDeptList(CmmnQuery query) {
+
+ setFetchSize(query);
+
+ return setCollectionInfo(new ModelAndView("jsonView"), factionService.getDeptList(query),"");
+
+ }
+
+ /**지정한 ID의 부서 정보(info)를 반환한다.
+ * @param query 부서 조회 조건
+ * @return fims/mngt/mngt04020-info 또는 jsonView
+ *
{ + * "deptInfo": 부서 정보 + * }+ */ + public ModelAndView getDeptInfo(CmmnQuery query) { + + DataObject deptInfo = factionService.getDeptInfo(query); + + boolean json = jsonResponse(); + ModelAndView mav = new ModelAndView(json ? "jsonView" : "fims/mngt/mngt04020-info"); + + mav.addObject("pageName", "mngt04020"); + mav.addObject("deptInfo", json ? deptInfo : toJson(deptInfo)); + 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 76744378..e35c2f0f 100644 --- a/src/main/java/cokr/xit/fims/task/web/CmnController.java +++ b/src/main/java/cokr/xit/fims/task/web/CmnController.java @@ -649,6 +649,18 @@ public class CmnController { return super.deptMngtMain(); } + @Override + @RequestMapping(name="부서 목록 조회", value=METHOD_URL.getDeptList) + public ModelAndView getDeptList(CmmnQuery query) { + return super.getDeptList(query); + } + + @Override + @RequestMapping(name="부서 상세 조회", value=METHOD_URL.getDeptInfo) + public ModelAndView getDeptInfo(CmmnQuery query) { + return super.getDeptInfo(query); + } + } @Controller diff --git a/src/main/resources/sql/mapper/fims/mngt/faction-mapper.xml b/src/main/resources/sql/mapper/fims/mngt/faction-mapper.xml index 1856efba..494cc48b 100644 --- a/src/main/resources/sql/mapper/fims/mngt/faction-mapper.xml +++ b/src/main/resources/sql/mapper/fims/mngt/faction-mapper.xml @@ -190,7 +190,9 @@ UPDATE TB_SGG