diff --git a/src/main/java/cokr/xit/fims/base/dao/OgdpMapper.java b/src/main/java/cokr/xit/fims/base/dao/OgdpMapper.java
index 07a39296..067e2cb4 100644
--- a/src/main/java/cokr/xit/fims/base/dao/OgdpMapper.java
+++ b/src/main/java/cokr/xit/fims/base/dao/OgdpMapper.java
@@ -4,7 +4,6 @@ import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Select;
-import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
@@ -16,7 +15,21 @@ import cokr.xit.foundation.data.DataObject;
@Mapper("ogdpMapper")
public interface OgdpMapper extends AbstractMapper {
- public static String selectAdd = """
+ public static String select = """
+ SELECT D.DEPT_CD
+ , D.SGG_CD
+ , (SELECT SGG_NM FROM TB_SGG WHERE SGG_CD = D.SGG_CD) AS SGG_NM
+ , D.INST_CD
+ , (SELECT INST_NM FROM TB_SGG WHERE INST_CD = D.INST_CD) AS INST_NM
+ , D.DEPT_NM
+ , D.DEPT_TELNO
+ , D.DEPT_FXNO
+ , D.USE_YN
+ , (CASE D.USE_YN WHEN 'Y' THEN '사용' WHEN 'N' THEN '미사용' ELSE '' END) AS USE_YN_NM
+ , D.REG_DT
+ , D.RGTR
+ , D.MDFCN_DT
+ , D.MDFR
, D.CVLCPT_LINK_SE_CD
, D.VRBACNT_LINK_SE_CD
, D.PSTOFC_NM
@@ -39,6 +52,21 @@ public interface OgdpMapper extends AbstractMapper {
, D.DTBN_ACTNO
, D.DOC_HEADER
, D.SRVR_OS
+ FROM TB_DEPT D
+
+
+ AND D.SGG_CD = #{sggCd}
+
+
+ AND D.DEPT_CD = #{deptCd}
+
+
+ AND D.INST_CD = #{instCd}
+
+
+ AND D.USE_YN = #{useYn}
+
+
""";
/**모든 기관,부서 목록을 반환한다.
@@ -152,7 +180,7 @@ public interface OgdpMapper extends AbstractMapper {
- /**시군구 정보를 수정한다.
+ /**시군구 설정 정보를 수정한다.
* @param sgg 시군구
* @return 저장 여부
*
- 저장됐으면 true
@@ -163,9 +191,9 @@ public interface OgdpMapper extends AbstractMapper {
return sgg != null && updateSggStng(params().set("sgg", sgg)) == 1;
}
- /**시군구 정보를 수정한다.
+ /**시군구 설정 정보를 수정한다.
* @param params 파라미터
- * - "sgg" - 시군구 정보
+ * - "sgg" - 시군구 설정 정보
* - "currentUser" - 현재 접속한 사용자
*
* @return 저장된 정보수
@@ -194,33 +222,27 @@ public interface OgdpMapper extends AbstractMapper {
"""+SQLUtil.SCRIPT_END)
int updateSggStng(Map params);
- /**지정한 조건에 따라 시군구 객체를 반환한다.
+ /**지정한 조건에 따라 시군구 설정 객체를 반환한다.
* @param req 시군구 조회 조건
* @return 시군구 객체
*/
- default DataObject selectSggInfo(OgdpQuery req) {
+ default DataObject selectSggStngInfo(OgdpQuery req) {
// 사용 여부 확인
if (req.getUseYn() == null) {
req.setUseYn("Y");
}
- return selectSgg(req);
+ return selectSggStng(req);
}
- /**지정한 조건에 따라 시군구 객체들을 반환한다.
+ /**지정한 조건에 따라 시군구 설정 객체들을 반환한다.
* @param req 시군구 조회 조건
* @return 시군구 객체 목록
*/
- @SelectProvider(type=OgdpMapper.class, method="selectSggProvider")
- DataObject selectSgg(OgdpQuery req);
-
- public static String selectSggProvider() {
-
- String comment = " /* 시군구 객체 가져오기(ogdpMapper.selectSgg) */ ";
-
- String selectFrom = """
- SELECT S.SGG_CD
+ @Select(SQLUtil.SCRIPT_START+"""
+ /* 시군구 설정 객체 가져오기(ogdpMapper.selectSgg) */
+ SELECT S.SGG_CD
, S.SGG_NM
, S.INST_SE_CD
, S.INST_CD
@@ -240,9 +262,7 @@ public interface OgdpMapper extends AbstractMapper {
, S.OFFCS_FILE_PATH
, S.OFFCS_FILE_NM
FROM TB_SGG S
- """;
- String where = """
-
+
AND S.SGG_CD = #{sggCd}
@@ -250,13 +270,9 @@ public interface OgdpMapper extends AbstractMapper {
AND S.USE_YN = #{useYn}
- """;
+ """+SQLUtil.SCRIPT_END)
+ DataObject selectSggStng(OgdpQuery req);
- return SQLUtil.SCRIPT_START
- + comment
- + selectFrom + where
- + SQLUtil.SCRIPT_END;
- }
@@ -299,78 +315,22 @@ public interface OgdpMapper extends AbstractMapper {
- @SelectProvider(type=OgdpMapper.class, method="selectDeptInfoProvider")
- DataObject selectDeptInfo(OgdpQuery req);
-
- public static String selectDeptInfoProvider(OgdpQuery req) {
-
- String comment = "/* 부서 객체 가져오기(ogdpMapper.selectDeptInfo) */ ";
-
- String selectFromWhere = selectDept(req);
+ @Select(SQLUtil.SCRIPT_START
+ + " /* 부서 설정 객체 가져오기(ogdpMapper.selectDeptInfo) */ "
+ + select
+ + SQLUtil.SCRIPT_END)
+ DataObject selectDeptStngInfo(OgdpQuery req);
- return SQLUtil.SCRIPT_START
- + comment
- + selectFromWhere
- + SQLUtil.SCRIPT_END;
- }
-
- @SelectProvider(type=OgdpMapper.class, method="selectDeptListProvider")
- List selectDeptList(OgdpQuery query);
-
- public static String selectDeptListProvider(OgdpQuery req) {
+ @Select(SQLUtil.SCRIPT_START
+ + " /* 부서 설정 객체 목록 가져오기(ogdpMapper.selectDeptList) */ "
+ + SQLUtil.pagingPrefix
+ + select
+ + SQLUtil.orderBy
+ + SQLUtil.pagingSuffix
+ + SQLUtil.SCRIPT_END)
+ List selectDeptStngList(OgdpQuery query);
- String comment = "/* 부서 객체 목록 가져오기(ogdpMapper.selectDeptList) */ ";
-
- String selectFromWhere = selectDept(req);
-
- return SQLUtil.SCRIPT_START
- + comment
- + SQLUtil.pagingPrefix
- + selectFromWhere
- + SQLUtil.orderBy
- + SQLUtil.pagingSuffix
- + SQLUtil.SCRIPT_END;
- }
- public static String selectDept(OgdpQuery req) {
- String select = """
- SELECT D.DEPT_CD
- , D.SGG_CD
- , (SELECT SGG_NM FROM TB_SGG WHERE SGG_CD = D.SGG_CD) AS SGG_NM
- , D.INST_CD
- , (SELECT INST_NM FROM TB_SGG WHERE INST_CD = D.INST_CD) AS INST_NM
- , D.DEPT_NM
- , D.DEPT_TELNO
- , D.DEPT_FXNO
- , D.USE_YN
- , (CASE D.USE_YN WHEN 'Y' THEN '사용' WHEN 'N' THEN '미사용' ELSE '' END) AS USE_YN_NM
- , D.REG_DT
- , D.RGTR
- , D.MDFCN_DT
- , D.MDFR
- """;
-
- String fromWhere = """
- FROM TB_DEPT D
-
-
- AND D.SGG_CD = #{sggCd}
-
-
- AND D.DEPT_CD = #{deptCd}
-
-
- AND D.INST_CD = #{instCd}
-
-
- AND D.USE_YN = #{useYn}
-
-
- """;
-
-
- return select + selectAdd + fromWhere;
- }
}
diff --git a/src/main/java/cokr/xit/fims/base/service/bean/OgdpBean.java b/src/main/java/cokr/xit/fims/base/service/bean/OgdpBean.java
index f011a345..c0b05501 100644
--- a/src/main/java/cokr/xit/fims/base/service/bean/OgdpBean.java
+++ b/src/main/java/cokr/xit/fims/base/service/bean/OgdpBean.java
@@ -86,10 +86,12 @@ public class OgdpBean extends AbstractBean {
* @param req 시군구 조회 조건
* @return 시군구 객체
*/
- public DataObject getSggInfo(OgdpQuery req) {
- return ogdpMapper.selectSggInfo(req);
+ public DataObject getSggStngInfo(OgdpQuery req) {
+ return ogdpMapper.selectSggStngInfo(req);
}
- public List getDeptList(OgdpQuery query) {
+
+
+ public List getDeptStngList(OgdpQuery query) {
// 기본 정렬
if (query.getOrderBy() == null) {
if(query.getFetchSize() > 0) {
@@ -101,15 +103,15 @@ public class OgdpBean extends AbstractBean {
- return ogdpMapper.selectDeptList(query);
+ return ogdpMapper.selectDeptStngList(query);
}
- public DataObject getDeptInfo(OgdpQuery query) {
+ public DataObject getDeptStngInfo(OgdpQuery query) {
- return ogdpMapper.selectDeptInfo(query);
+ return ogdpMapper.selectDeptStngInfo(query);
}
diff --git a/src/main/java/cokr/xit/fims/base/web/FimsSggDeptController.java b/src/main/java/cokr/xit/fims/base/web/OgdpController.java
similarity index 70%
rename from src/main/java/cokr/xit/fims/base/web/FimsSggDeptController.java
rename to src/main/java/cokr/xit/fims/base/web/OgdpController.java
index fde9819b..acc27789 100644
--- a/src/main/java/cokr/xit/fims/base/web/FimsSggDeptController.java
+++ b/src/main/java/cokr/xit/fims/base/web/OgdpController.java
@@ -7,7 +7,7 @@ import cokr.xit.base.user.Sigungu;
import cokr.xit.base.user.web.SigunguDepartmentController;
@Controller
-public class FimsSggDeptController extends SigunguDepartmentController {
+public class OgdpController extends SigunguDepartmentController {
}
\ 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 27c67d55..b601b3bf 100644
--- a/src/main/java/cokr/xit/fims/mngt/web/Mngt03Controller.java
+++ b/src/main/java/cokr/xit/fims/mngt/web/Mngt03Controller.java
@@ -39,7 +39,7 @@ public class Mngt03Controller extends ApplicationController {
public class METHOD_URL {
public static final String
sggMngtMain = "/010/main.do",
- getSggInfo = "/010/getSggInfo.do",
+ getSggStngInfo = "/010/getSggInfo.do",
getTasks = "/010/getTasks.do",
getVltns = "/010/getVltns.do",
updateSggStng = "/010/updateSgg.do",
@@ -102,10 +102,10 @@ public class Mngt03Controller extends ApplicationController {
* @param req
* @return jsonView
*/
- @RequestMapping(name="시군구 조회", value=METHOD_URL.getSggInfo)
+ @RequestMapping(name="시군구 설정 조회", value=METHOD_URL.getSggStngInfo)
public ModelAndView getSggInfo(OgdpQuery req) {
ModelAndView mav = new ModelAndView("jsonView");
- DataObject sggInfo = ogdpBean.getSggInfo(req);
+ DataObject sggInfo = ogdpBean.getSggStngInfo(req);
mav.addObject("sggInfo", sggInfo);
return mav;
}
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 c6110c23..122d1c8c 100644
--- a/src/main/java/cokr/xit/fims/mngt/web/Mngt04Controller.java
+++ b/src/main/java/cokr/xit/fims/mngt/web/Mngt04Controller.java
@@ -30,8 +30,8 @@ public class Mngt04Controller extends ApplicationController {
public class METHOD_URL {
public static final String
deptStngMngtMain = "/010/main.do"
- , getDeptList = "/010/list.do"
- , getDeptInfo = "/020/info.do"
+ , getDeptStngList = "/010/list.do"
+ , getDeptStngInfo = "/020/info.do"
, updateDeptStng = "/020/update.do"
;
}
@@ -62,16 +62,16 @@ public class Mngt04Controller extends ApplicationController {
}
/**부서 목록을 조회한다.
- * {@link OgdpService#getDeptList(CmmnQuery)} 참고
+ * {@link OgdpService#getDeptStngList(CmmnQuery)} 참고
* @param query 부서 목록 조회 조건
* @return jsonView
*/
- @RequestMapping(name="부서 목록 조회", value=METHOD_URL.getDeptList)
- public ModelAndView getDeptList(OgdpQuery query) {
+ @RequestMapping(name="부서 목록 조회", value=METHOD_URL.getDeptStngList)
+ public ModelAndView getDeptStngList(OgdpQuery query) {
setFetchSize(query);
- return setCollectionInfo(new ModelAndView("jsonView"), ogdpBean.getDeptList(query),"","");
+ return setCollectionInfo(new ModelAndView("jsonView"), ogdpBean.getDeptStngList(query),"","");
}
@@ -82,12 +82,12 @@ public class Mngt04Controller extends ApplicationController {
* "deptInfo": 부서 정보
* }
*/
- @RequestMapping(name="부서 상세 조회", value=METHOD_URL.getDeptInfo)
- public ModelAndView getDeptInfo(OgdpQuery query) {
+ @RequestMapping(name="부서 상세 조회", value=METHOD_URL.getDeptStngInfo)
+ public ModelAndView getDeptStngInfo(OgdpQuery query) {
DataObject deptInfo = new DataObject();
if(!ifEmpty(query.getDeptCd(), ()->"").equals("")) {
- deptInfo = ogdpBean.getDeptInfo(query);
+ deptInfo = ogdpBean.getDeptStngInfo(query);
} else {
deptInfo = null;
}
diff --git a/src/main/java/cokr/xit/fims/nxrp/service/bean/NisIndivBean.java b/src/main/java/cokr/xit/fims/nxrp/service/bean/NisIndivBean.java
index 51152b54..bd5dcc55 100644
--- a/src/main/java/cokr/xit/fims/nxrp/service/bean/NisIndivBean.java
+++ b/src/main/java/cokr/xit/fims/nxrp/service/bean/NisIndivBean.java
@@ -145,7 +145,7 @@ public class NisIndivBean extends AbstractBean {
DataObject userInfo = userBean.getUserInfo(currentUser().getId());
// 2. 부서 정보
- DataObject deptInfo = ogdpBean.getDeptInfo(new OgdpQuery().setDeptCd(userInfo.string("DEPT_CD")));
+ DataObject deptInfo = ogdpBean.getDeptStngInfo(new OgdpQuery().setDeptCd(userInfo.string("DEPT_CD")));
// 3. 세외수입 과태료대장에 연계할 단속 정보를 조회
DataObject selectCrdnInfo = nisA01Mapper.selectCrdnInfo(req.getCrdnId());
@@ -347,7 +347,7 @@ public class NisIndivBean extends AbstractBean {
DataObject userInfo = userBean.getUserInfo(currentUser().getId());
// 2. 부서 정보
- DataObject deptInfo = ogdpBean.getDeptInfo(new OgdpQuery().setDeptCd(userInfo.string("DEPT_CD")));
+ DataObject deptInfo = ogdpBean.getDeptStngInfo(new OgdpQuery().setDeptCd(userInfo.string("DEPT_CD")));
// 3. 세외수입 과태료대장에 연계할 단속 정보를 조회
DataObject selectCrdnInfo = nisA01Mapper.selectCrdnInfo(req.getCrdnId());