시군구,부서 관리 수정

main
이범준 5 months ago
parent d695519292
commit 67bcf44f97

@ -0,0 +1,39 @@
package cokr.xit.applib;
public class SQLUtil {
public static final String SCRIPT_START = "<script>";
public static final String SCRIPT_END = "</script>";
public static final String now = """
<if test="_databaseId == 'mariadb'">DATE_FORMAT(CURRENT_TIMESTAMP, '%Y%m%d%H%i%s')</if>
<if test="_databaseId == 'oracle'">TO_CHAR(CURRENT_TIMESTAMP, 'YYYYMMDDHH24MISS')</if>
""";
public static final String sortBy = """
<if test="orderBy != null and orderBy != ''">ORDER BY ${orderBy}</if>
""";
public static final String orderBy = """
<if test="fetchSize == null or fetchSize &lt; 1">"""
+sortBy+"""
</if>""";
public static final String pagingPrefix = """
<if test="fetchSize != null and fetchSize &gt; 0">
SELECT QROWS.*
FROM (
SELECT ROW_NUMBER() OVER("""
+sortBy+"""
) ROW_NUM
, COUNT(*) OVER() TOT_CNT
, QBODY.*
FROM (
</if>""";
public static final String pagingSuffix = """
<if test="fetchSize != null and fetchSize &gt; 0"> ) QBODY
) QROWS
WHERE ROW_NUM BETWEEN ((#{pageNum} - 1) * #{fetchSize}) + 1 AND (#{pageNum} * #{fetchSize})
</if>""";
}

@ -5,12 +5,15 @@ import cokr.xit.foundation.component.QueryRequest;
public class OgdpQuery extends QueryRequest {
private static final long serialVersionUID = 1L;
private String sggCd; // 시군구 코드
private String deptCd; // 부서 코드
private String instCd; // 기관 코드
private String useYn; // 사용 여부
private String delYn; // 삭제 여부
private String selectAdd;
public String getSggCd() {
return ifEmpty(sggCd, () -> null);
}
@ -55,4 +58,13 @@ public class OgdpQuery extends QueryRequest {
this.delYn = delYn;
return self();
}
public String getSelectAdd() {
return ifEmpty(selectAdd, () -> null);
}
public <T extends OgdpQuery> T setSelectAdd(String selectAdd) {
this.selectAdd = selectAdd;
return self();
}
}

@ -1,120 +0,0 @@
package cokr.xit.applib.ogdp.dao;
import java.util.List;
import java.util.Map;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.applib.ogdp.OgdpQuery;
import cokr.xit.applib.ogdp.OgdpSigungu;
import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject;
@Mapper("cmmnOgdpMapper")
public interface CmmnOgdpMapper extends AbstractMapper {
/** , .<br />
* @param
* @return ,
*/
List<DataObject> selectAllOgdpList();
/** , .<br />
* @param stringMap
* @param
* @return ,
*/
List<DataObject> selectAbleOgdpList(Map<String, Object> params);
/** ,,,,, .<br />
* @param ID
* @return ,,,,,
*/
DataObject selectOgdpInfoOfUser(String userId);
/** .<br />
* @param
* @return
*/
List<DataObject> selectAllInstList();
/** .<br />
* @param
* @return
*/
List<DataObject> selectAllSggList();
/** .<br />
* @param deptCd
* @return
*/
String selectSggCdByDeptCd(String deptCd);
/** .
* @param params
* <ul><li>"sgg" - </li>
* <li>"currentUser" - </li>
* </ul>
* @return
*/
int updateSgg(Map<String, Object> params);
/** .
* @param sgg
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
default boolean updateSgg(OgdpSigungu sgg) {
return sgg != null && updateSgg(params().set("sgg", sgg)) == 1;
}
/** .
* @param req
* @return
*/
List<DataObject> selectSggs(OgdpQuery req);
/** .
* @param req
* @return
*/
default DataObject selectSggInfo(OgdpQuery req) {
// 사용 여부 확인
if (req.getUseYn() == null) {
req.setUseYn("Y");
}
// 기본 정렬
if (req.getOrderBy() == null) {
req.setOrderBy("S.SGG_CD DESC");
}
List<DataObject> sggs = selectSggs(req);
return (!sggs.isEmpty() || sggs.size() == 1) ? sggs.get(0) : null;
}
/** .
* @param params
* <ul><li>"deptCds" - </li>
* <li>"currentUser" - </li>
* </ul>
* @return
*/
int setStatus(Map<String, ?> params);
/** .
* @param deptCds
* @return
*/
default int setStatus(String useYn, String... deptCds) {
DataObject params = params();
params.set("useYn", useYn);
params.set("deptCds", deptCds);
int effected = setStatus(params);
return effected;
}
}

@ -1,96 +0,0 @@
package cokr.xit.applib.ogdp.dao;
import java.util.List;
import java.util.Map;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.applib.ogdp.OgdpQuery;
import cokr.xit.base.user.Department;
import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject;
/** DAO
*
* <p> :
*
* <pre>
* ============ ============
* 2023-09-15 leebj
* ================================
* </pre>
*/
@Mapper("defaultOgdpMapper")
public interface DefaultOgdpMapper extends AbstractMapper {
/** .<br />
* @param req
* @return
*/
List<DataObject> selectDeptList(OgdpQuery req);
/** .
* @param req
* @return
*/
List<DataObject> selectDepts(OgdpQuery req);
/** .
* @param req
* @return
*/
default DataObject selectDeptInfo(OgdpQuery req) {
// 기본 정렬
if (req.getOrderBy() == null) {
req.setOrderBy("D.DEPT_CD DESC");
}
List<DataObject> depts = selectDepts(req);
return !depts.isEmpty() ? depts.get(0) : null;
}
/** .
* @param params
* <ul><li>"dept" - </li>
* <li>"currentUser" - </li>
* </ul>
* @return
*/
int insertDept(Map<String, Object> params);
/** .
* @param dept
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
default boolean insert(Department dept) {
return dept != null && insertDept(params().set("dept", dept)) == 1;
}
/** .
* @param params
* <ul><li>"dept" - </li>
* <li>"currentUser" - </li>
* </ul>
* @return
*/
int updateDept(Map<String, Object> params);
/** .
* @param dept
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
default boolean update(Department dept) {
return dept != null && updateDept(params().set("dept", dept)) == 1;
}
}

@ -0,0 +1,466 @@
package cokr.xit.applib.ogdp.dao;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.applib.SQLUtil;
import cokr.xit.applib.ogdp.OgdpQuery;
import cokr.xit.applib.ogdp.OgdpSigungu;
import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject;
@Mapper("ogdpMapper")
public interface OgdpMapper extends AbstractMapper {
/** , .<br />
* @param
* @return ,
*/
@Select(SQLUtil.SCRIPT_START+"""
/* 전체 기관,부서 목록 조회(ogdpMapper.selectAllOgdpList) */
SELECT CONCAT(A.INST_CD,'/',B.DEPT_CD) AS OGDP_CD
, CONCAT(A.INST_NM,' / ',B.DEPT_NM) AS OGDP_NM
, A.INST_CD
, A.INST_NM
, B.DEPT_CD
, B.DEPT_NM
, A.SGG_CD
, A.SGG_NM
FROM TB_SGG A
LEFT OUTER JOIN TB_DEPT B ON (A.INST_CD = B.INST_CD)
UNION
SELECT ('default/default') AS OGDP_CD
, CONCAT(' ',' / ',' ') AS OGDP_NM
, 'default' AS INST_CD
, ' ' AS INST_NM
, 'default' AS DEPT_CD
, ' ' AS DEPT_NM
, 'default' AS SGG_CD
, ' ' AS SGG_NM
FROM DUAL
"""+SQLUtil.SCRIPT_END)
List<DataObject> selectAllOgdpList();
/** , .<br />
* @param stringMap
* @param
* @return ,
*/
@Select(SQLUtil.SCRIPT_START+"""
/* 사용가능한 기관,부서 목록 조회(ogdpMapper.selectAbleOgdpList) */
SELECT CONCAT(A.INST_CD,'/',B.DEPT_CD) AS OGDP_CD
, CONCAT(A.INST_NM,' / ',B.DEPT_NM) AS OGDP_NM
, A.INST_CD
, A.INST_NM
, B.DEPT_CD
, B.DEPT_NM
, A.SGG_CD
, A.SGG_NM
FROM TB_SGG A
LEFT OUTER JOIN TB_DEPT B ON (A.INST_CD = B.INST_CD)
<choose>
<when test='anonymous == "Y" '>
WHERE A.INST_CD = #{institute}
</when>
<otherwise>
<if test="currentUser.institute != 'default'">
WHERE A.SGG_CD = #{currentUser.user.orgID}
</if>
<if test="currentUser.institute == 'default'">
UNION
SELECT 'default/default' AS OGDP_CD
, CONCAT(' ',' / ',' ') AS OGDP_NM
, 'default' AS INST_CD
, ' ' AS INST_NM
, 'default' AS DEPT_CD
, ' ' AS DEPT_NM
, 'default' AS SGG_CD
, ' ' AS SGG_NM
FROM DUAL
</if>
</otherwise>
</choose>
"""+SQLUtil.SCRIPT_END)
List<DataObject> selectAbleOgdpList(Map<String, Object> params);
/** ,,,,, .<br />
* @param ID
* @return ,,,,,
*/
@Select(SQLUtil.SCRIPT_START+"""
/* 사용자의 시군구,기관,부서 조회(ogdpMapper.selectOgdpInfoOfUser) */
SELECT S.SGG_CD
, S.SGG_NM
, U.NSTT_CD AS INST_CD
, S.INST_NM
, U.DEPT_CD
, D.DEPT_NM
FROM TB_USER U
LEFT OUTER JOIN TB_SGG S ON (U.ORG_ID = S.SGG_CD)
LEFT OUTER JOIN TB_DEPT D ON (U.DEPT_CD = D.DEPT_CD)
WHERE U.USER_ID = #{userId}
"""+SQLUtil.SCRIPT_END)
DataObject selectOgdpInfoOfUser(String userId);
/** .<br />
* @param
* @return
*/
@Select(SQLUtil.SCRIPT_START+"""
/* 모든 기관 조회(ogdpMapper.selectAllInstList) */
SELECT INST_CD
, INST_NM
FROM TB_SGG
WHERE USE_YN = 'Y'
"""+SQLUtil.SCRIPT_END)
List<DataObject> selectAllInstList();
/** .<br />
* @param
* @return
*/
@Select(SQLUtil.SCRIPT_START+"""
/* 모든 시군구 조회(ogdpMapper.selectAllSggList) */
SELECT SGG_CD
, SGG_NM
FROM TB_SGG
WHERE USE_YN = 'Y'
"""+SQLUtil.SCRIPT_END)
List<DataObject> selectAllSggList();
/** .<br />
* @param deptCd
* @return
*/
@Select(SQLUtil.SCRIPT_START+"""
/* 부서에 따른 시군구코드 조회(ogdpMapper.selectSggCdByDeptCd) */
SELECT SGG_CD
FROM TB_DEPT
WHERE DEPT_CD = #{deptCd}
"""+SQLUtil.SCRIPT_END)
String selectSggCdByDeptCd(String deptCd);
/** .
* @param sgg
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
default boolean updateSgg(OgdpSigungu sgg) {
return sgg != null && updateSgg(params().set("sgg", sgg)) == 1;
}
/** .
* @param params
* <ul><li>"sgg" - </li>
* <li>"currentUser" - </li>
* </ul>
* @return
*/
@Update(SQLUtil.SCRIPT_START+"""
/* 시군구 설정정보 수정 (ogdpMapper.updateSgg) */
UPDATE TB_SGG
SET MDFCN_DT =
"""
+SQLUtil.now
+"""
, MDFR = #{sgg.modifiedBy}
, INST_ZIP = #{sgg.instituteZipCode} <!-- -->
, INST_ADDR = #{sgg.instAddress} <!-- -->
, INST_DADDR = #{sgg.instDetailAddress} <!-- -->
<if test="sgg.symbolFilepath != null">
, SYMBOL_FILE_PATH = #{sgg.symbolFilepath} <!-- -->
, SYMBOL_FILE_NM = #{sgg.symbolFilename} <!-- -->
</if>
<if test="sgg.logoFilepath != null">
, LOGO_FILE_PATH = #{sgg.logoFilepath} <!-- -->
, LOGO_FILE_NM = #{sgg.logoFilename} <!-- -->
</if>
<if test="sgg.officialSealFilepath != null">
, OFFCS_FILE_PATH = #{sgg.officialSealFilepath} <!-- -->
, OFFCS_FILE_NM = #{sgg.officialSealFilename} <!-- -->
</if>
WHERE SGG_CD = #{sgg.sggID}
"""+SQLUtil.SCRIPT_END)
int updateSgg(Map<String, Object> params);
/** .
* @param req
* @return
*/
default DataObject selectSggInfo(OgdpQuery req) {
// 사용 여부 확인
if (req.getUseYn() == null) {
req.setUseYn("Y");
}
return selectSgg(req);
}
/** .
* @param req
* @return
*/
@SelectProvider(type=OgdpMapper.class, method="selectSggProvider")
DataObject selectSgg(OgdpQuery req);
public static String selectSggProvider() {
String comment = " /* 시군구 객체 가져오기(ogdpMapper.selectSggs) */ ";
String selectFrom = """
SELECT S.SGG_CD <!-- -->
, S.SGG_NM <!-- -->
, S.INST_SE_CD <!-- -->
, S.INST_CD <!-- -->
, S.INST_NM <!-- -->
, (CASE
WHEN S.INST_DADDR IS NULL OR S.INST_DADDR = ''
THEN S.INST_ADDR
ELSE CONCAT(S.INST_ADDR,' ',S.INST_DADDR)
END) AS INST_FULL_ADDR <!-- -->
, S.INST_ADDR <!-- -->
, S.INST_DADDR <!-- -->
, S.INST_ZIP <!-- -->
, S.SYMBOL_FILE_PATH <!-- -->
, S.SYMBOL_FILE_NM <!-- -->
, S.LOGO_FILE_PATH <!-- -->
, S.LOGO_FILE_NM <!-- -->
, S.OFFCS_FILE_PATH <!-- -->
, S.OFFCS_FILE_NM <!-- -->
FROM TB_SGG S
""";
String where = """
<where>
<if test="sggCd != null">
AND S.SGG_CD = #{sggCd} <!-- -->
</if>
<if test="useYn != null">
AND S.USE_YN = #{useYn} <!-- -->
</if>
</where>
""";
return SQLUtil.SCRIPT_START
+ comment
+ selectFrom + where
+ SQLUtil.SCRIPT_END;
}
/** .
* @param deptCds
* @return
*/
default int setStatus(String useYn, String... deptCds) {
DataObject params = params();
params.set("useYn", useYn);
params.set("deptCds", deptCds);
int effected = setStatus(params);
return effected;
}
/** .
* @param params
* <ul><li>"deptCds" - </li>
* <li>"currentUser" - </li>
* </ul>
* @return
*/
@Update(SQLUtil.SCRIPT_START+"""
/* 부서 사용 여부 변경(ogdpMapper.setStatus) */
UPDATE TB_DEPT
SET USE_YN = #{useYn} <!-- -->
, MDFCN_DT =
"""
+SQLUtil.now
+"""
<!-- -->
, MDFR = #{currentUser.id} <!-- -->
WHERE DEPT_CD IN ( <foreach collection="deptCds" item="deptCd" separator=","> #{deptCd} </foreach> )<!-- -->
"""+SQLUtil.SCRIPT_END)
int setStatus(Map<String, ?> params);
@InsertProvider(type=OgdpMapper.class, method="insertDeptProvider")
int insertDept(Map<String, Object> params);
/** .
* @param params
* <ul><li>"dept" - </li>
* <li>"currentUser" - </li>
* </ul>
* @return
*/
public static String insertDeptProvider(Map<String, Object> params) {
String comment = "/* 부서 등록(ogdpMapper.insertDept) */ ";
String insertInto = """
INSERT
INTO TB_DEPT (
DEPT_CD <!-- -->
, SGG_CD <!-- -->
, INST_CD <!-- -->
, DEPT_NM <!-- -->
, DEPT_TELNO <!-- -->
, DEPT_FXNO <!-- -->
, USE_YN <!-- -->
, REG_DT <!-- -->
, RGTR <!-- -->
, MDFCN_DT <!-- -->
, MDFR <!-- -->
""";
String values = """
) VALUES (
#{dept.deptID} <!-- -->
, #{dept.sggID} <!-- -->
, #{dept.instCode} <!-- -->
, #{dept.name} <!-- -->
, #{dept.telno} <!-- -->
, #{dept.faxno} <!-- -->
, 'Y' <!-- -->
,
"""
+SQLUtil.now
+"""
, #{dept.createdBy} <!-- -->
,
"""
+SQLUtil.now
+"""
, #{dept.modifiedBy} <!-- -->
""";
String close = ")";
String insertIntoAdd = params.get("insertIntoAdd") == null ? "" : (String)params.get("insertIntoAdd");
String valuesAdd = params.get("valuesAdd") == null ? "" : (String)params.get("valuesAdd");
return SQLUtil.SCRIPT_START
+ comment
+ insertInto + insertIntoAdd + values + valuesAdd + close
+ SQLUtil.SCRIPT_END;
}
@UpdateProvider(type=OgdpMapper.class, method="updateDeptProvider")
int updateDept(Map<String, Object> params);
public static String updateDeptProvider(Map<String, Object> params) {
String comment = "/* 부서 수정(ogdpMapper.updateDept) */ ";
String updateSet = """
UPDATE TB_DEPT
SET SGG_CD = #{dept.sggID} <!-- -->
, INST_CD = #{dept.instCode} <!-- -->
, DEPT_NM = #{dept.name} <!-- -->
, DEPT_TELNO = #{dept.telno} <!-- -->
, DEPT_FXNO = #{dept.faxno} <!-- -->
, MDFCN_DT =
"""
+SQLUtil.now
+"""
<!-- -->
, MDFR = #{dept.modifiedBy} <!-- -->
""";
String where = """
WHERE DEPT_CD = #{dept.deptID}
AND USE_YN = 'Y'
""";
String updateSetAdd = params.get("updateSetAdd") == null ? "" : (String)params.get("updateSetAdd");
return SQLUtil.SCRIPT_START
+ comment
+ updateSet + updateSetAdd + where
+ SQLUtil.SCRIPT_END;
}
@SelectProvider(type=OgdpMapper.class, method="selectDeptInfoProvider")
DataObject selectDeptInfo(OgdpQuery req);
public static String selectDeptInfoProvider(OgdpQuery req) {
String comment = "/* 부서 객체 가져오기(ogdpMapper.selectDeptInfo) */ ";
String selectFromWhere = selectDept(req);
return SQLUtil.SCRIPT_START
+ comment
+ selectFromWhere
+ SQLUtil.SCRIPT_END;
}
@SelectProvider(type=OgdpMapper.class, method="selectDeptListProvider")
List<DataObject> selectDeptList(OgdpQuery query);
public static String selectDeptListProvider(OgdpQuery req) {
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
<where>
<if test="sggCd != null">
AND D.SGG_CD = #{sggCd} <!-- -->
</if>
<if test="deptCd != null">
AND D.DEPT_CD = #{deptCd} <!-- -->
</if>
<if test="instCd != null">
AND D.INST_CD = #{instCd} <!-- -->
</if>
<if test="useYn != null">
AND D.USE_YN = #{useYn} <!-- -->
</if>
</where>
""";
return select + req.getSelectAdd() + fromWhere;
}
}

@ -1,41 +0,0 @@
package cokr.xit.applib.ogdp.service;
import java.util.List;
import cokr.xit.applib.ogdp.OgdpQuery;
import cokr.xit.base.user.Department;
import cokr.xit.foundation.data.DataObject;
public interface OgdpService {
/** .
* @param req
* @return
*/
List<DataObject> getDeptList(OgdpQuery req);
/** .
* @param req
* @return
*/
DataObject getDeptInfo(OgdpQuery req);
/** .
* @param dept
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
String create(Department dept);
/** .
* @param dept
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
String update(Department dept);
}

@ -0,0 +1,133 @@
package cokr.xit.applib.ogdp.service.bean;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import cokr.xit.applib.ogdp.OgdpQuery;
import cokr.xit.applib.ogdp.OgdpSigungu;
import cokr.xit.applib.ogdp.dao.OgdpMapper;
import cokr.xit.base.user.Department;
import cokr.xit.foundation.UserInfo;
import cokr.xit.foundation.component.AbstractBean;
import cokr.xit.foundation.data.DataObject;
public abstract class AbstractOgdpBean extends AbstractBean {
@Resource(name="ogdpMapper")
private OgdpMapper ogdpMapper;
public Object selectAllOgdpList() {
return ogdpMapper.selectAllOgdpList();
}
public List<DataObject> selectAbleOgdpList(DataObject params) {
return ogdpMapper.selectAbleOgdpList(params);
}
public List<DataObject> selectAllInstList() {
return ogdpMapper.selectAllInstList();
}
public List<DataObject> selectAllSggList(){
return ogdpMapper.selectAllSggList();
}
public DataObject selectOgdpInfoOfUser(String userId){
return ogdpMapper.selectOgdpInfoOfUser(userId);
}
public String selectSggCdByDeptCd(String deptCd) {
return ogdpMapper.selectSggCdByDeptCd(deptCd);
}
/**userInfo ,, .
* @param userInfo
* @return
*/
public void initUserInfo(UserInfo userInfo) {
DataObject ogdpInfo = ogdpMapper.selectOgdpInfoOfUser(userInfo.getId());
Map<String, Object> infoMap = userInfo.getInfo();
if(ogdpInfo == null) {
infoMap.put("sggCd", "");
infoMap.put("sggNm", "");
infoMap.put("instCd", "");
infoMap.put("instNm", "");
infoMap.put("deptCd", "");
infoMap.put("deptNm", "");
} else {
infoMap.put("sggCd", ogdpInfo.string("SGG_CD"));
infoMap.put("sggNm", ogdpInfo.string("SGG_NM"));
infoMap.put("instCd", ogdpInfo.string("INST_CD"));
infoMap.put("instNm", ogdpInfo.string("INST_NM"));
infoMap.put("deptCd", ogdpInfo.string("DEPT_CD"));
infoMap.put("deptNm", ogdpInfo.string("DEPT_NM"));
}
userInfo.setInfo(infoMap);
}
/** .
* @param sgg
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public boolean updateSgg(OgdpSigungu sgg) {
return ogdpMapper.updateSgg(sgg);
}
/** .
* @param req
* @return
*/
public DataObject getSggInfo(OgdpQuery req) {
return ogdpMapper.selectSggInfo(req);
}
/** .
* @param deptCds
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public boolean remove(String... deptCds) {
return ogdpMapper.setStatus("N", deptCds) > 0 ? true : false;
}
/** .
* @param req
* @return
*/
public abstract List<DataObject> getDeptList(OgdpQuery req);
/** .
* @param req
* @return
*/
public abstract DataObject getDeptInfo(OgdpQuery req);
/** .
* @param dept
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public abstract boolean createDept(Department dept);
/** .
* @param dept
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public abstract boolean updateDept(Department dept);
}

@ -1,82 +0,0 @@
package cokr.xit.applib.ogdp.service.bean;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Component;
import cokr.xit.applib.ogdp.OgdpQuery;
import cokr.xit.applib.ogdp.OgdpSigungu;
import cokr.xit.applib.ogdp.dao.CmmnOgdpMapper;
import cokr.xit.foundation.UserInfo;
import cokr.xit.foundation.component.AbstractBean;
import cokr.xit.foundation.data.DataObject;
@Component("cmmnOgdpBean")
public class CmmnOgdpBean extends AbstractBean {
@Resource(name="cmmnOgdpMapper")
private CmmnOgdpMapper cmmnOgdpMapper;
/**userInfo ,, .
* @param userInfo
* @return
*/
public void initUserInfo(UserInfo userInfo) {
DataObject ogdpInfo = cmmnOgdpMapper.selectOgdpInfoOfUser(userInfo.getId());
Map<String, Object> infoMap = userInfo.getInfo();
if(ogdpInfo == null) {
infoMap.put("sggCd", "");
infoMap.put("sggNm", "");
infoMap.put("instCd", "");
infoMap.put("instNm", "");
infoMap.put("deptCd", "");
infoMap.put("deptNm", "");
} else {
infoMap.put("sggCd", ogdpInfo.string("SGG_CD"));
infoMap.put("sggNm", ogdpInfo.string("SGG_NM"));
infoMap.put("instCd", ogdpInfo.string("INST_CD"));
infoMap.put("instNm", ogdpInfo.string("INST_NM"));
infoMap.put("deptCd", ogdpInfo.string("DEPT_CD"));
infoMap.put("deptNm", ogdpInfo.string("DEPT_NM"));
}
userInfo.setInfo(infoMap);
}
/** .
* @param sgg
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public boolean updateSgg(OgdpSigungu sgg) {
return cmmnOgdpMapper.updateSgg(sgg);
}
/** .
* @param req
* @return
*/
public DataObject getSggInfo(OgdpQuery req) {
return cmmnOgdpMapper.selectSggInfo(req);
}
/** .
* @param deptCds
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public boolean remove(String... deptCds) {
return cmmnOgdpMapper.setStatus("N", deptCds) > 0 ? true : false;
}
}

@ -0,0 +1,63 @@
package cokr.xit.applib.ogdp.service.bean;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Component;
import cokr.xit.applib.ogdp.OgdpQuery;
import cokr.xit.applib.ogdp.dao.OgdpMapper;
import cokr.xit.base.user.Department;
import cokr.xit.foundation.data.DataObject;
@Component("defaultOgdpBean")
public class DefaultOgdpBean extends AbstractOgdpBean {
@Resource(name = "ogdpMapper")
private OgdpMapper ogdpMapper;
@Override
public List<DataObject> getDeptList(OgdpQuery query) {
// 기본 정렬
if (query.getOrderBy() == null) {
if(query.getFetchSize() > 0) {
query.setOrderBy("QBODY.DEPT_CD DESC");
} else {
query.setOrderBy("D.DEPT_CD DESC");
}
}
return ogdpMapper.selectDeptList(query);
}
@Override
public DataObject getDeptInfo(OgdpQuery query) {
return ogdpMapper.selectDeptInfo(query);
}
@Override
public boolean createDept(Department dept) {
boolean result = dept != null && ogdpMapper.insertDept(
new DataObject()
.set("currentUser", currentUser())
.set("dept", dept)) == 1;
return result;
}
@Override
public boolean updateDept(Department dept) {
boolean result = dept != null && ogdpMapper.updateDept(
new DataObject()
.set("currentUser", currentUser())
.set("dept", dept)) == 1;
return result;
}
}

@ -1,43 +0,0 @@
package cokr.xit.applib.ogdp.service.bean;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import cokr.xit.applib.ogdp.OgdpQuery;
import cokr.xit.applib.ogdp.dao.DefaultOgdpMapper;
import cokr.xit.applib.ogdp.service.OgdpService;
import cokr.xit.base.user.Department;
import cokr.xit.foundation.component.AbstractServiceBean;
import cokr.xit.foundation.data.DataObject;
@Service("defaultOgdpService")
public class DefaultOgdpServiceBean extends AbstractServiceBean implements OgdpService {
@Resource(name = "defaultOgdpMapper")
private DefaultOgdpMapper defaultOgdpMapper;
@Override
public List<DataObject> getDeptList(OgdpQuery req) {
return defaultOgdpMapper.selectDeptList(req);
}
@Override
public DataObject getDeptInfo(OgdpQuery req) {
return defaultOgdpMapper.selectDeptInfo(req);
}
@Override
public String create(Department dept) {
return defaultOgdpMapper.insert(dept) ? "[S]" : "[F]";
}
@Override
public String update(Department dept) {
return defaultOgdpMapper.update(dept) ? "[S]" : "[F]";
}
}

@ -10,9 +10,9 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.ogdp.dao.CmmnOgdpMapper;
import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.user.service.UserService;
import cokr.xit.fims.mngt.service.bean.FimsOgdpBean;
import cokr.xit.fims.task.TaskRequestMappingHandlerMapping;
import cokr.xit.foundation.data.DataObject;
import cokr.xit.foundation.web.AbstractController;
@ -24,8 +24,8 @@ public class MainController extends AbstractController {
@Autowired
private TaskRequestMappingHandlerMapping requestHandlers;
@Resource(name="cmmnOgdpMapper")
CmmnOgdpMapper cmmnOgdpMapper;
@Resource(name="fimsOgdpBean")
private FimsOgdpBean fimsOgdpBean;
@Resource(name="userService")
private UserService userService;
@ -39,12 +39,12 @@ public class MainController extends AbstractController {
public ModelAndView signupPage(String institute) {
ModelAndView mav = new ModelAndView("fims/user/user-info");
mav.addObject("allOgdpList", cmmnOgdpMapper.selectAllOgdpList());
mav.addObject("allOgdpList", fimsOgdpBean.selectAllOgdpList());
DataObject params = new DataObject();
params.set("anonymous", "Y");
params.set("institute", institute);
List<DataObject> ableOgdpList = cmmnOgdpMapper.selectAbleOgdpList(params);
List<DataObject> ableOgdpList = fimsOgdpBean.selectAbleOgdpList(params);
mav.addObject("ableOgdpList", ableOgdpList);
mav.addObject("userInfo", "{}");
@ -71,7 +71,7 @@ public class MainController extends AbstractController {
@RequestMapping(name="기관 목록", value="/instList.do")
public ModelAndView instList(String account, String institute) {
List<DataObject> instList = cmmnOgdpMapper.selectAllInstList();
List<DataObject> instList = fimsOgdpBean.selectAllInstList();
return new ModelAndView("jsonView")
.addObject("instList", instList);
}

@ -10,10 +10,10 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.ogdp.service.bean.CmmnOgdpBean;
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.bean.FimsOgdpBean;
import cokr.xit.fims.mngt.service.bean.TaskBean;
import cokr.xit.foundation.UserInfo;
import cokr.xit.foundation.data.DataObject;
@ -26,8 +26,8 @@ public class CodeController extends cokr.xit.base.code.web.CodeController {
@Resource(name = "taskBean")
private TaskBean taskBean;
@Resource(name = "cmmnOgdpBean")
private CmmnOgdpBean cmmnOgdpBean;
@Resource(name = "fimsOgdpBean")
private FimsOgdpBean fimsOgdpBean;
@RequestMapping(name="모든 업무구분코드 조회",value="/getAllTaskSeCd.do")
public ModelAndView getAllTaskSeCd() {
@ -52,7 +52,7 @@ public class CodeController extends cokr.xit.base.code.web.CodeController {
mav.addObject("sggHasTask", "Y");
} else {
cmmnOgdpBean.initUserInfo(userInfo);
fimsOgdpBean.initUserInfo(userInfo);
String sggCd = (String)userInfo.getInfo().get("sggCd");

@ -8,14 +8,13 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.ogdp.dao.CmmnOgdpMapper;
import cokr.xit.applib.ogdp.service.bean.CmmnOgdpBean;
import cokr.xit.base.code.service.CodeQuery;
import cokr.xit.base.code.service.bean.CodeBean;
import cokr.xit.base.security.SecuredUserInfo;
import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.user.service.UserService;
import cokr.xit.fims.cmmn.service.bean.StngBean;
import cokr.xit.fims.mngt.service.bean.FimsOgdpBean;
import cokr.xit.foundation.data.DataObject;
@Controller
@ -30,11 +29,8 @@ public class UserController extends cokr.xit.base.user.web.UserController<Manage
@Resource(name = "codeBean")
private CodeBean codeBean;
@Resource(name = "cmmnOgdpBean")
private CmmnOgdpBean cmmnOgdpBean;
@Resource(name="cmmnOgdpMapper")
CmmnOgdpMapper cmmnOgdpMapper;
@Resource(name="fimsOgdpBean")
private FimsOgdpBean fimsOgdpBean;
@Resource(name = "stngBean")
private StngBean stngBean;
@ -49,10 +45,10 @@ public class UserController extends cokr.xit.base.user.web.UserController<Manage
public ModelAndView getInfo(String userID) {
ModelAndView mav = super.getInfo(userID);
mav.addObject("allOgdpList", cmmnOgdpMapper.selectAllOgdpList());
mav.addObject("allOgdpList", fimsOgdpBean.selectAllOgdpList());
DataObject params = new DataObject().set("currentUser", currentUser());
List<DataObject> ableOgdpList = cmmnOgdpMapper.selectAbleOgdpList(params);
List<DataObject> ableOgdpList = fimsOgdpBean.selectAbleOgdpList(params);
mav.addObject("ableOgdpList", ableOgdpList);
return mav;
@ -65,7 +61,7 @@ public class UserController extends cokr.xit.base.user.web.UserController<Manage
SecuredUserInfo userInfo = currentUser();
//시군구,기관,부서
cmmnOgdpBean.initUserInfo(userInfo);
fimsOgdpBean.initUserInfo(userInfo);
//관리자여부,업무권한여부
boolean isAdmin = userInfo.hasAuthorities("ROLE_ADMIN");
@ -112,9 +108,9 @@ public class UserController extends cokr.xit.base.user.web.UserController<Manage
DataObject userInfo = userService.getUserInfo(currentUser().getId());
mav.addObject("userInfo", toJson(userInfo));
mav.addObject("allOgdpList", cmmnOgdpMapper.selectAllOgdpList());
mav.addObject("allOgdpList", fimsOgdpBean.selectAllOgdpList());
DataObject params = new DataObject().set("currentUser", currentUser());
List<DataObject> ableOgdpList = cmmnOgdpMapper.selectAbleOgdpList(params);
List<DataObject> ableOgdpList = fimsOgdpBean.selectAbleOgdpList(params);
mav.addObject("ableOgdpList", ableOgdpList);
return mav;

@ -9,7 +9,6 @@ import javax.annotation.Resource;
import org.springframework.stereotype.Component;
import cokr.xit.applib.ogdp.service.bean.CmmnOgdpBean;
import cokr.xit.base.code.CommonCode;
import cokr.xit.base.code.service.CodeQuery;
import cokr.xit.base.code.service.bean.CodeBean;
@ -17,6 +16,7 @@ import cokr.xit.base.security.Authority;
import cokr.xit.base.security.SecuredUserInfo;
import cokr.xit.fims.cmmn.CmmnQuery;
import cokr.xit.fims.cmmn.dao.StngMapper;
import cokr.xit.fims.mngt.service.bean.FimsOgdpBean;
import cokr.xit.fims.mngt.service.bean.TaskBean;
import cokr.xit.foundation.UserInfo;
import cokr.xit.foundation.component.AbstractBean;
@ -27,8 +27,8 @@ public class StngBean extends AbstractBean {
@Resource(name = "codeBean")
private CodeBean codeBean;
@Resource(name = "cmmnOgdpBean")
private CmmnOgdpBean cmmnOgdpBean;
@Resource(name = "fimsOgdpBean")
private FimsOgdpBean fimsOgdpBean;
@Resource(name = "stngMapper")
private StngMapper stngMapper;
@ -49,14 +49,14 @@ public class StngBean extends AbstractBean {
if(userInfo.getInstitute().equals("default")) {
return new DataObject();
}
cmmnOgdpBean.initUserInfo(userInfo);
fimsOgdpBean.initUserInfo(userInfo);
return stngMapper.selectDeptStng((String)userInfo.getInfo().get("deptCd"));
} else if(type.equals("sgg")){
UserInfo userInfo = currentUser();
if(userInfo.getInstitute().equals("default")) {
return new DataObject();
}
cmmnOgdpBean.initUserInfo(userInfo);
fimsOgdpBean.initUserInfo(userInfo);
return stngMapper.selectSggStng((String)userInfo.getInfo().get("sggCd"));
} else {
return null;
@ -71,7 +71,7 @@ public class StngBean extends AbstractBean {
public boolean updateDtbnActno(String dtbnBankNm, String dtbnActno) {
Map<String, String> params = new HashMap<String, String>();
UserInfo userInfo = currentUser();
cmmnOgdpBean.initUserInfo(userInfo);
fimsOgdpBean.initUserInfo(userInfo);
params.put("mdfr", userInfo.getId());
params.put("deptCd", (String)userInfo.getInfo().get("deptCd"));
params.put("dtbnBankNm", dtbnBankNm);
@ -99,7 +99,7 @@ public class StngBean extends AbstractBean {
} else if(isAdmin) { //관리자
Map<String, Object> info = userInfo.getInfo();
if(info == null || info.get("sggCd") == null || info.get("sggCd").equals("")) {
cmmnOgdpBean.initUserInfo(userInfo);
fimsOgdpBean.initUserInfo(userInfo);
}
availableTaskList = taskBean.getTasks((new CmmnQuery()).setSggCd((String)userInfo.getInfo().get("sggCd")).setUseYn("Y"))
@ -182,7 +182,7 @@ public class StngBean extends AbstractBean {
SecuredUserInfo userInfo = currentUser();
Map<String, Object> info = userInfo.getInfo();
if(info == null || info.get("sggCd") == null || info.get("sggCd").equals("")) {
cmmnOgdpBean.initUserInfo(userInfo);
fimsOgdpBean.initUserInfo(userInfo);
}
List<String> taskSeCdListForSgg = taskBean.getTasks((new CmmnQuery()).setSggCd((String)userInfo.getInfo().get("sggCd")).setUseYn("Y"))

@ -6,10 +6,10 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.ogdp.service.bean.CmmnOgdpBean;
import cokr.xit.fims.cmmn.dao.ExtrStngMapper;
import cokr.xit.fims.cmmn.service.LinkService;
import cokr.xit.fims.cmmn.service.bean.LinkBean;
import cokr.xit.fims.mngt.service.bean.FimsOgdpBean;
import cokr.xit.foundation.UserInfo;
import cokr.xit.foundation.data.DataObject;
import cokr.xit.foundation.web.AbstractController;
@ -24,8 +24,8 @@ public class LinkController extends AbstractController {
@Resource(name = "linkService")
private LinkService linkService;
@Resource(name = "cmmnOgdpBean")
private CmmnOgdpBean cmmnOgdpBean;
@Resource(name = "fimsOgdpBean")
private FimsOgdpBean fimsOgdpBean;
@Resource(name = "extrStngMapper")
private ExtrStngMapper extrStngMapper;
@ -36,7 +36,7 @@ public class LinkController extends AbstractController {
boolean saved = false;
UserInfo userInfo = currentUser();
cmmnOgdpBean.initUserInfo(userInfo);
fimsOgdpBean.initUserInfo(userInfo);
String sggCd = (String) userInfo.getInfo().get("sggCd");
System.out.println("파라미터 : "+ param);

@ -18,7 +18,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.ogdp.service.bean.CmmnOgdpBean;
import cokr.xit.base.code.CommonCode;
import cokr.xit.base.file.FileInfo;
import cokr.xit.base.file.web.FileInfoFactory;
@ -43,6 +42,7 @@ import cokr.xit.fims.crdn.service.CrdnService;
import cokr.xit.fims.crdn.service.CrdnStngService;
import cokr.xit.fims.crdn.service.ImportService;
import cokr.xit.fims.crdn.service.bean.CrdnStngBean;
import cokr.xit.fims.mngt.service.bean.FimsOgdpBean;
import cokr.xit.fims.task.Task;
import cokr.xit.foundation.UserInfo;
import cokr.xit.foundation.data.DataObject;
@ -95,8 +95,8 @@ public class Crdn05Controller extends ApplicationController {
@Resource(name="crdnStngMapper")
private CrdnStngMapper crdnStngMapper;
@Resource(name = "cmmnOgdpBean")
private CmmnOgdpBean cmmnOgdpBean;
@Resource(name = "fimsOgdpBean")
private FimsOgdpBean fimsOgdpBean;
@Resource(name = "stngBean")
private StngBean stngBean;
@ -481,7 +481,7 @@ public class Crdn05Controller extends ApplicationController {
boolean saved = false;
UserInfo userInfo = currentUser();
cmmnOgdpBean.initUserInfo(userInfo);
fimsOgdpBean.initUserInfo(userInfo);
crdn.setSggCd((String)userInfo.getInfo().get("sggCd"));
crdn.setCrdnRegSeCd("01");

@ -15,7 +15,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.Print;
import cokr.xit.applib.ogdp.service.bean.CmmnOgdpBean;
import cokr.xit.base.code.CommonCode;
import cokr.xit.base.docs.xls.CellDef;
import cokr.xit.base.docs.xls.Format;
@ -38,6 +37,7 @@ import cokr.xit.fims.crdn.service.CrdnService;
import cokr.xit.fims.cvlc.CrdnCvlcpt;
import cokr.xit.fims.cvlc.service.CrdnCvlcptService;
import cokr.xit.fims.cvlc.service.bean.CrdnCvlcptMainBean;
import cokr.xit.fims.mngt.service.bean.FimsOgdpBean;
import cokr.xit.fims.task.Task;
import cokr.xit.foundation.UserInfo;
import cokr.xit.foundation.data.DataObject;
@ -82,8 +82,8 @@ public class Cvlc01Controller extends ApplicationController {
@Resource(name = "fileBean")
private FileBean fileBean;
@Resource(name = "cmmnOgdpBean")
private CmmnOgdpBean cmmnOgdpBean;
@Resource(name = "fimsOgdpBean")
private FimsOgdpBean fimsOgdpBean;
@Resource(name = "crdnCvlcptMainBean")
private CrdnCvlcptMainBean crdnCvlcptMainBean;
@ -221,7 +221,7 @@ public class Cvlc01Controller extends ApplicationController {
FimsPrintOption printOption = new FimsPrintOption();
UserInfo userInfo = currentUser();
cmmnOgdpBean.initUserInfo(userInfo);
fimsOgdpBean.initUserInfo(userInfo);
Print print = new Print();
print.setPrintRequestUserInfo(userInfo);

@ -16,7 +16,6 @@ import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.Print;
import cokr.xit.applib.ogdp.service.bean.CmmnOgdpBean;
import cokr.xit.base.code.CommonCode;
import cokr.xit.base.docs.xls.CellDef;
import cokr.xit.base.docs.xls.Format;
@ -37,6 +36,7 @@ import cokr.xit.fims.excl.OpnnDlbrMbr;
import cokr.xit.fims.excl.OpnnSbmsn;
import cokr.xit.fims.excl.service.OpnnDlbrMbrService;
import cokr.xit.fims.excl.service.OpnnSbmsnService;
import cokr.xit.fims.mngt.service.bean.FimsOgdpBean;
import cokr.xit.fims.task.Task;
import cokr.xit.foundation.UserInfo;
import cokr.xit.foundation.data.DataObject;
@ -90,8 +90,8 @@ public class Excl02Controller extends ApplicationController {
@Resource(name="stngBean")
private StngBean stngBean;
@Resource(name = "cmmnOgdpBean")
private CmmnOgdpBean cmmnOgdpBean;
@Resource(name = "fimsOgdpBean")
private FimsOgdpBean fimsOgdpBean;
/** (fims/excl/excl02/010-main) .
*
@ -377,7 +377,7 @@ public class Excl02Controller extends ApplicationController {
@RequestMapping(name="의견제출 심의의결서 출력", value=METHOD_URL.makeDlbrDecsnFileFromHwpFormat)
public ModelAndView makeDlbrDecsnFileFromHwpFormat(LevyExclQuery req) {
UserInfo userInfo = currentUser();
cmmnOgdpBean.initUserInfo(userInfo);
fimsOgdpBean.initUserInfo(userInfo);
Print print = new Print();
print.setPrintRequestUserInfo(userInfo);

@ -1,47 +0,0 @@
package cokr.xit.fims.mngt.dao;
import java.util.List;
import java.util.Map;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.applib.ogdp.OgdpQuery;
import cokr.xit.fims.mngt.FimsDepartment;
import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject;
@Mapper("fimsOgdpMapper")
public interface FimsOgdpMapper extends AbstractMapper {
default DataObject selectDeptInfo(OgdpQuery req) {
// 기본 정렬
if (req.getOrderBy() == null) {
req.setOrderBy("D.DEPT_CD DESC");
}
List<DataObject> depts = selectDepts(req);
return !depts.isEmpty() ? depts.get(0) : null;
};
/** .
* @param req
* @return
*/
List<DataObject> selectDepts(OgdpQuery req);
List<DataObject> selectDeptList(OgdpQuery query);
default boolean insertDept(FimsDepartment dept) {
return dept != null && insertDept(params().set("dept", dept)) == 1;
};
int insertDept(Map<String, Object> params);
default boolean updateDept(FimsDepartment dept) {
return dept != null && updateDept(params().set("dept", dept)) == 1;
}
int updateDept(Map<String, Object> params);
}

@ -1,5 +1,6 @@
package cokr.xit.fims.mngt.service.bean;
import java.util.List;
import javax.annotation.Resource;
@ -7,32 +8,174 @@ import javax.annotation.Resource;
import org.springframework.stereotype.Component;
import cokr.xit.applib.ogdp.OgdpQuery;
import cokr.xit.applib.ogdp.service.bean.CmmnOgdpBean;
import cokr.xit.applib.ogdp.dao.OgdpMapper;
import cokr.xit.applib.ogdp.service.bean.AbstractOgdpBean;
import cokr.xit.base.user.Department;
import cokr.xit.fims.mngt.FimsDepartment;
import cokr.xit.fims.mngt.dao.FimsOgdpMapper;
import cokr.xit.foundation.data.DataObject;
@Component("fimsOgdpBean")
public class FimsOgdpBean extends CmmnOgdpBean {
public class FimsOgdpBean extends AbstractOgdpBean {
@Resource(name = "fimsOgdpMapper")
private FimsOgdpMapper fimsOgdpMapper;
public static String selectAdd = """
, D.CVLCPT_LINK_SE_CD <!-- -->
, D.VRBACNT_LINK_SE_CD <!-- -->
, D.PSTOFC_NM <!-- -->
, D.RG_NO_HEADER <!-- -->
, D.SNDNG_LINK_SE_CD <!-- -->
, D.EGP_CON_ORG <!-- E -->
, D.EGP_RCEPT_ID <!-- E -->
, D.EGP_APVL_NB <!-- E -->
, D.EGP_ESB_PATH <!-- E ESB -->
, D.EGP_POST_INST_ID <!-- E ID -->
, D.EGP_CERT_CN <!-- E CN -->
, D.ENS_INTERFACE_ID <!-- ID -->
, D.ENS_SOURCE_CD <!-- -->
, D.ENS_TARGET_CD <!-- -->
, D.ENS_URL <!-- URL -->
, D.NXRP_LINK_YN <!-- -->
, D.NXRP_LINK_SRVC_URL <!-- URL -->
, D.NXRP_RGN_SE_CD <!-- -->
, D.DTBN_BANK_NM <!-- -->
, D.DTBN_ACTNO <!-- -->
, D.DOC_HEADER <!-- 릿 -->
, D.SRVR_OS <!-- OS -->
""";
public DataObject getDeptInfo(OgdpQuery query) {
return fimsOgdpMapper.selectDeptInfo(query);
}
@Resource(name="ogdpMapper")
private OgdpMapper ogdpMapper;
@Override
public List<DataObject> getDeptList(OgdpQuery query) {
return fimsOgdpMapper.selectDeptList(query);
// 기본 정렬
if (query.getOrderBy() == null) {
if(query.getFetchSize() > 0) {
query.setOrderBy("QBODY.DEPT_CD DESC");
} else {
query.setOrderBy("D.DEPT_CD DESC");
}
}
query.setSelectAdd(selectAdd);
return ogdpMapper.selectDeptList(query);
}
@Override
public DataObject getDeptInfo(OgdpQuery query) {
query.setSelectAdd(selectAdd);
return ogdpMapper.selectDeptInfo(query);
}
public boolean createFimsDept(FimsDepartment dept) {
return fimsOgdpMapper.insertDept(dept);
@Override
public boolean createDept(Department dept) {
if(dept != null && dept instanceof FimsDepartment fimsDept) {
String insertIntoAdd = """
, CVLCPT_LINK_SE_CD <!-- -->
, VRBACNT_LINK_SE_CD <!-- -->
, PSTOFC_NM <!-- -->
, RG_NO_HEADER <!-- -->
, SNDNG_LINK_SE_CD <!-- -->
, EGP_CON_ORG <!-- E -->
, EGP_RCEPT_ID <!-- E -->
, EGP_APVL_NB <!-- E -->
, EGP_ESB_PATH <!-- E ESB -->
, EGP_POST_INST_ID <!-- E ID -->
, EGP_CERT_CN <!-- E CN -->
, ENS_INTERFACE_ID <!-- ID -->
, ENS_SOURCE_CD <!-- -->
, ENS_TARGET_CD <!-- -->
, ENS_URL <!-- URL -->
, NXRP_LINK_YN <!-- -->
, NXRP_RGN_SE_CD <!-- -->
, DTBN_BANK_NM <!-- -->
, DTBN_ACTNO <!-- -->
, DOC_HEADER <!-- 릿 -->
, SRVR_OS <!-- OS -->
""";
String valuesAdd = """
, #{dept.cvlcptLinkSeCd} <!-- -->
, #{dept.vrbacntLinkSeCd} <!-- -->
, #{dept.pstofcNm} <!-- -->
, #{dept.rgNoHeader} <!-- -->
, #{dept.sndngLinkSeCd} <!-- -->
, #{dept.egpConOrg} <!-- E -->
, #{dept.egpRceptId} <!-- E -->
, #{dept.egpApvlNb} <!-- E -->
, #{dept.egpEsbPath} <!-- E ESB -->
, #{dept.egpPostInstId} <!-- E ID -->
, #{dept.egpCertCn} <!-- E CN -->
, #{dept.ensInterfaceId} <!-- ID -->
, #{dept.ensSourceCd} <!-- -->
, #{dept.ensTargetCd} <!-- -->
, #{dept.ensUrl} <!-- URL -->
, #{dept.nxrpLinkYn} <!-- -->
, #{dept.nxrpRgnSeCd} <!-- -->
, #{dept.dtbnBankNm} <!-- -->
, #{dept.dtbnActno} <!-- -->
, #{dept.docHeader} <!-- 릿 -->
, #{dept.srvrOs} <!-- OS -->
""";
boolean result = ogdpMapper.insertDept(
new DataObject()
.set("currentUser", currentUser())
.set("dept", fimsDept)
.set("insertIntoAdd", insertIntoAdd)
.set("valuesAdd",valuesAdd)) == 1;
return result;
}
return false;
}
public boolean updateFimsDept(FimsDepartment dept) {
return fimsOgdpMapper.updateDept(dept);
@Override
public boolean updateDept(Department dept) {
if(dept != null && dept instanceof FimsDepartment fimsDept) {
String updateSetAdd = """
, CVLCPT_LINK_SE_CD = #{dept.cvlcptLinkSeCd} <!-- -->
, VRBACNT_LINK_SE_CD = #{dept.vrbacntLinkSeCd} <!-- -->
, PSTOFC_NM = #{dept.pstofcNm} <!-- -->
, RG_NO_HEADER = #{dept.rgNoHeader} <!-- -->
, SNDNG_LINK_SE_CD = #{dept.sndngLinkSeCd} <!-- -->
, EGP_CON_ORG = #{dept.egpConOrg} <!-- E -->
, EGP_RCEPT_ID = #{dept.egpRceptId} <!-- E -->
, EGP_APVL_NB = #{dept.egpApvlNb} <!-- E -->
, EGP_ESB_PATH = #{dept.egpEsbPath} <!-- E ESB -->
, EGP_POST_INST_ID = #{dept.egpPostInstId} <!-- E ID -->
, EGP_CERT_CN = #{dept.egpCertCn} <!-- E CN -->
, ENS_INTERFACE_ID = #{dept.ensInterfaceId} <!-- ID -->
, ENS_SOURCE_CD = #{dept.ensSourceCd} <!-- -->
, ENS_TARGET_CD = #{dept.ensTargetCd} <!-- -->
, ENS_URL = #{dept.ensUrl} <!-- URL -->
, NXRP_LINK_YN = #{dept.nxrpLinkYn} <!-- -->
, NXRP_RGN_SE_CD = #{dept.nxrpRgnSeCd} <!-- -->
, DTBN_BANK_NM = #{dept.dtbnBankNm} <!-- -->
, DTBN_ACTNO = #{dept.dtbnActno} <!-- -->
, DOC_HEADER = #{dept.docHeader} <!-- 릿 -->
, SRVR_OS = #{dept.srvrOs} <!-- OS -->
""";
boolean result = ogdpMapper.updateDept(
new DataObject()
.set("currentUser", currentUser())
.set("dept", fimsDept)
.set("updateSetAdd", updateSetAdd)) == 1;
return result;
}
return false;
}
}

@ -1,51 +0,0 @@
package cokr.xit.fims.mngt.service.bean;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import cokr.xit.applib.ogdp.OgdpQuery;
import cokr.xit.applib.ogdp.service.OgdpService;
import cokr.xit.base.user.Department;
import cokr.xit.fims.mngt.FimsDepartment;
import cokr.xit.foundation.component.AbstractServiceBean;
import cokr.xit.foundation.data.DataObject;
@Service("fimsOgdpService")
public class FimsOgdpServiceBean extends AbstractServiceBean implements OgdpService {
@Resource(name="fimsOgdpBean")
private FimsOgdpBean fimsOgdpBean;
@Override
public List<DataObject> getDeptList(OgdpQuery query) {
return fimsOgdpBean.getDeptList(query);
}
@Override
public DataObject getDeptInfo(OgdpQuery query) {
return fimsOgdpBean.getDeptInfo(query);
}
@Override
public String create(Department dept) {
if(dept instanceof FimsDepartment fdept) {
return fimsOgdpBean.createFimsDept(fdept) ? "[S]" : "[F]";
}
return "[F]";
}
@Override
public String update(Department dept) {
if(dept instanceof FimsDepartment fdept) {
return fimsOgdpBean.updateFimsDept(fdept) ? "[S]" : "[F]";
}
return "[F]";
}
}

@ -8,13 +8,12 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.ogdp.dao.CmmnOgdpMapper;
import cokr.xit.applib.ogdp.dao.DefaultOgdpMapper;
import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.mngt.Ntc;
import cokr.xit.fims.mngt.NtcQuery;
import cokr.xit.fims.mngt.service.NtcService;
import cokr.xit.fims.mngt.service.bean.FimsOgdpBean;
import cokr.xit.foundation.data.DataObject;
/** .<br />
@ -41,11 +40,8 @@ public class Mngt01Controller extends ApplicationController {
@Resource(name="ntcService")
private NtcService ntcService;
@Resource(name="cmmnOgdpMapper")
CmmnOgdpMapper cmmnOgdpMapper;
@Resource(name = "defaultOgdpMapper")
private DefaultOgdpMapper defaultOgdpMapper;
@Resource(name="fimsOgdpBean")
private FimsOgdpBean fimsOgdpBean;
/** .
* @return fims/mngt/mngt01010-main
@ -100,7 +96,7 @@ public class Mngt01Controller extends ApplicationController {
}
mav.addObject("ntcInfo", json ? info : toJson(info));
List<DataObject> allSggList = cmmnOgdpMapper.selectAllSggList();
List<DataObject> allSggList = fimsOgdpBean.selectAllSggList();
mav.addObject("sggList", allSggList);
return mav;

@ -15,13 +15,12 @@ import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.ogdp.OgdpQuery;
import cokr.xit.applib.ogdp.OgdpSigungu;
import cokr.xit.applib.ogdp.dao.CmmnOgdpMapper;
import cokr.xit.applib.ogdp.service.bean.CmmnOgdpBean;
import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.cmmn.CmmnQuery;
import cokr.xit.fims.cmmn.service.StngService;
import cokr.xit.fims.mngt.Task;
import cokr.xit.fims.mngt.VltnQuery;
import cokr.xit.fims.mngt.service.bean.FimsOgdpBean;
import cokr.xit.fims.mngt.service.bean.TaskBean;
import cokr.xit.fims.mngt.service.bean.VltnBean;
import cokr.xit.foundation.UserInfo;
@ -49,12 +48,8 @@ public class Mngt03Controller extends ApplicationController {
;
}
@Resource(name = "cmmnOgdpBean")
private CmmnOgdpBean cmmnOgdpBean;
@Resource(name="cmmnOgdpMapper")
CmmnOgdpMapper cmmnOgdpMapper;
@Resource(name="fimsOgdpBean")
private FimsOgdpBean fimsOgdpBean;
/** 설정 정보 서비스 */
@Resource(name = "stngService")
@ -84,7 +79,7 @@ public class Mngt03Controller extends ApplicationController {
mav.setViewName("fims/mngt/select-sgg");
mav.addObject("pageName", "selectSgg");
List<DataObject> sggList = cmmnOgdpMapper.selectAllSggList();
List<DataObject> sggList = fimsOgdpBean.selectAllSggList();
mav.addObject("sggList", sggList);
} else {
@ -96,7 +91,7 @@ public class Mngt03Controller extends ApplicationController {
} else {
mav.setViewName("fims/mngt/mngt03010-main");
mav.addObject("pageName", "mngt03010");
cmmnOgdpBean.initUserInfo(userInfo);
fimsOgdpBean.initUserInfo(userInfo);
mav.addObject("sggCd", userInfo.getInfo().get("sggCd"));
}
@ -110,7 +105,7 @@ public class Mngt03Controller extends ApplicationController {
@RequestMapping(name="시군구 조회", value=METHOD_URL.getSggInfo)
public ModelAndView getSggInfo(OgdpQuery req) {
ModelAndView mav = new ModelAndView("jsonView");
DataObject sggInfo = cmmnOgdpBean.getSggInfo(req);
DataObject sggInfo = fimsOgdpBean.getSggInfo(req);
mav.addObject("sggInfo", sggInfo);
return mav;
}
@ -163,7 +158,7 @@ public class Mngt03Controller extends ApplicationController {
sgg.setOfficialSealFilepath(newOffcs.get("filePath"));
sgg.setOfficialSealFilename(newOffcs.get("fileName"));
}
boolean saved = cmmnOgdpBean.updateSgg(sgg);
boolean saved = fimsOgdpBean.updateSgg(sgg);
mav.addObject("saved", saved);
return mav;

@ -9,12 +9,10 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.ogdp.OgdpQuery;
import cokr.xit.applib.ogdp.dao.CmmnOgdpMapper;
import cokr.xit.applib.ogdp.service.OgdpService;
import cokr.xit.applib.ogdp.service.bean.CmmnOgdpBean;
import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.cmmn.CmmnQuery;
import cokr.xit.fims.mngt.FimsDepartment;
import cokr.xit.fims.mngt.service.bean.FimsOgdpBean;
import cokr.xit.foundation.data.DataObject;
/** .<br />
@ -40,14 +38,8 @@ public class Mngt04Controller extends ApplicationController {
/** 소속 정보 서비스 */
@Resource(name = "fimsOgdpService")
private OgdpService fimsOgdpService;
@Resource(name = "cmmnOgdpBean")
private CmmnOgdpBean cmmnOgdpBean;
@Resource(name = "cmmnOgdpMapper")
private CmmnOgdpMapper cmmnOgdpMapper;
@Resource(name = "fimsOgdpBean")
private FimsOgdpBean fimsOgdpBean;
/** .
@ -60,7 +52,7 @@ public class Mngt04Controller extends ApplicationController {
mav.setViewName("fims/mngt/mngt04010-main");
mav.addObject("pageName", "mngt04010");
List<DataObject> allSggList = cmmnOgdpMapper.selectAllSggList();
List<DataObject> allSggList = fimsOgdpBean.selectAllSggList();
mav.addObject("sggList", allSggList);
@ -77,7 +69,7 @@ public class Mngt04Controller extends ApplicationController {
setFetchSize(query);
return setCollectionInfo(new ModelAndView("jsonView"), fimsOgdpService.getDeptList(query),"","");
return setCollectionInfo(new ModelAndView("jsonView"), fimsOgdpBean.getDeptList(query),"","");
}
@ -93,7 +85,7 @@ public class Mngt04Controller extends ApplicationController {
DataObject deptInfo = new DataObject();
if(!ifEmpty(query.getDeptCd(), ()->"").equals("")) {
deptInfo = fimsOgdpService.getDeptInfo(query);
deptInfo = fimsOgdpBean.getDeptInfo(query);
} else {
deptInfo = null;
}
@ -117,7 +109,7 @@ public class Mngt04Controller extends ApplicationController {
public ModelAndView removeDept(String... deptCds) {
ModelAndView mav = new ModelAndView("jsonView");
boolean saved = cmmnOgdpBean.remove(deptCds);
boolean saved = fimsOgdpBean.remove(deptCds);
mav.addObject("saved", saved);
return mav;
@ -133,11 +125,7 @@ public class Mngt04Controller extends ApplicationController {
@RequestMapping(name="부서 등록", value=METHOD_URL.createDept)
public ModelAndView createDept(FimsDepartment dept) {
ModelAndView mav = new ModelAndView("jsonView");
boolean saved = false;
String rtnMsg = fimsOgdpService.create(dept);
if(rtnMsg.contains("[S]")) {
saved = true;
}
boolean saved = fimsOgdpBean.createDept(dept);
mav.addObject("saved", saved);
return mav;
@ -153,11 +141,7 @@ public class Mngt04Controller extends ApplicationController {
@RequestMapping(name="부서 수정", value=METHOD_URL.updateDept)
public ModelAndView updateDept(FimsDepartment dept) {
ModelAndView mav = new ModelAndView("jsonView");
boolean saved = false;
String rtnMsg = fimsOgdpService.update(dept);
if(rtnMsg.contains("[S]")) {
saved = true;
}
boolean saved = fimsOgdpBean.updateDept(dept);
mav.addObject("saved", saved);
return mav;

@ -112,7 +112,7 @@ public class NisIndivBean extends AbstractBean {
/** 부서 정보 DAO */
@Resource(name = "fimsOgdpBean")
private FimsOgdpBean fimsOgdpBean;
private FimsOgdpBean FimsOgdpBean;
/** .
* @param req
@ -145,7 +145,7 @@ public class NisIndivBean extends AbstractBean {
DataObject userInfo = userBean.getUserInfo(currentUser().getId());
// 2. 부서 정보
DataObject deptInfo = fimsOgdpBean.getDeptInfo(new OgdpQuery().setDeptCd(userInfo.string("DEPT_CD")));
DataObject deptInfo = FimsOgdpBean.getDeptInfo(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 = fimsOgdpBean.getDeptInfo(new OgdpQuery().setDeptCd(userInfo.string("DEPT_CD")));
DataObject deptInfo = FimsOgdpBean.getDeptInfo(new OgdpQuery().setDeptCd(userInfo.string("DEPT_CD")));
// 3. 세외수입 과태료대장에 연계할 단속 정보를 조회
DataObject selectCrdnInfo = nisA01Mapper.selectCrdnInfo(req.getCrdnId());

@ -14,7 +14,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.Print;
import cokr.xit.applib.ogdp.service.bean.CmmnOgdpBean;
import cokr.xit.base.code.CommonCode;
import cokr.xit.base.docs.xls.CellDef;
import cokr.xit.base.docs.xls.Format;
@ -37,6 +36,7 @@ import cokr.xit.fims.cmmn.service.bean.StngBean;
import cokr.xit.fims.cmmn.xls.FormatMaker;
import cokr.xit.fims.cmmn.xls.StyleMaker;
import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.mngt.service.bean.FimsOgdpBean;
import cokr.xit.fims.mngt.service.bean.TaskBean;
import cokr.xit.fims.sndb.SndbQuery;
import cokr.xit.fims.sndb.Sndng;
@ -153,8 +153,8 @@ public class Sndb01Controller extends ApplicationController {
@Resource(name="fileBean")
private FileBean fileBean;
@Resource(name = "cmmnOgdpBean")
private CmmnOgdpBean cmmnOgdpBean;
@Resource(name = "fimsOgdpBean")
private FimsOgdpBean fimsOgdpBean;
@Resource(name="svbtcBean")
private SvbtcBean svbtcBean;
@ -1657,7 +1657,7 @@ public class Sndb01Controller extends ApplicationController {
UserInfo userInfo = currentUser();
cmmnOgdpBean.initUserInfo(userInfo);
fimsOgdpBean.initUserInfo(userInfo);
Print print = new Print();
print.setPrintRequestUserInfo(userInfo);
@ -1866,7 +1866,7 @@ public class Sndb01Controller extends ApplicationController {
Print print = new Print();
UserInfo userInfo = currentUser();
cmmnOgdpBean.initUserInfo(userInfo);
fimsOgdpBean.initUserInfo(userInfo);
print.setPrintRequestUserInfo(userInfo);
//출력물 기본 설정

@ -17,7 +17,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.applib.Print;
import cokr.xit.applib.ogdp.service.bean.CmmnOgdpBean;
import cokr.xit.base.code.CommonCode;
import cokr.xit.base.docs.xls.CellDef;
import cokr.xit.base.docs.xls.Format;
@ -49,6 +48,7 @@ import cokr.xit.fims.cmmn.xls.StyleMaker;
import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.dao.CrdnListMapper;
import cokr.xit.fims.mngt.service.bean.FimsOgdpBean;
import cokr.xit.fims.mngt.service.bean.TaskBean;
import cokr.xit.fims.sndb.SndbQuery;
import cokr.xit.fims.sndb.Sndng;
@ -127,8 +127,8 @@ public class Sprt01Controller extends ApplicationController {
@Resource(name = "taskBean")
private TaskBean taskBean;
@Resource(name = "cmmnOgdpBean")
private CmmnOgdpBean cmmnOgdpBean;
@Resource(name = "fimsOgdpBean")
private FimsOgdpBean fimsOgdpBean;
@Resource(name = "mediaBean")
private MediaBean mediaBean;
@ -457,7 +457,7 @@ public class Sprt01Controller extends ApplicationController {
FimsPrintOption printOption = new FimsPrintOption();
printOption.setPrivateInfoYn(privateInfoYn);
UserInfo userInfo = currentUser();
cmmnOgdpBean.initUserInfo(userInfo);
fimsOgdpBean.initUserInfo(userInfo);
Print print = new Print();
print.setPrintRequestUserInfo(userInfo);
@ -483,7 +483,7 @@ public class Sprt01Controller extends ApplicationController {
FimsPrintOption printOption = new FimsPrintOption();
UserInfo userInfo = currentUser();
cmmnOgdpBean.initUserInfo(userInfo);
fimsOgdpBean.initUserInfo(userInfo);
Print print = new Print();
print.setPrintRequestUserInfo(userInfo);
@ -558,7 +558,7 @@ public class Sprt01Controller extends ApplicationController {
printOption.setGlobalVariable(globalVariable);
UserInfo userInfo = currentUser();
cmmnOgdpBean.initUserInfo(userInfo);
fimsOgdpBean.initUserInfo(userInfo);
Print print = new Print();
print.setPrintRequestUserInfo(userInfo);
@ -584,7 +584,7 @@ public class Sprt01Controller extends ApplicationController {
DataObject deptStngInfo = stngBean.getStng("dept");
UserInfo userInfo = currentUser();
cmmnOgdpBean.initUserInfo(userInfo);
fimsOgdpBean.initUserInfo(userInfo);
Print print = new Print();
print.setPrintRequestUserInfo(userInfo);
@ -624,7 +624,7 @@ public class Sprt01Controller extends ApplicationController {
public ModelAndView makeRcvmtConfirmFileFromHwpFormat(String... crdnIds) {
UserInfo userInfo = currentUser();
cmmnOgdpBean.initUserInfo(userInfo);
fimsOgdpBean.initUserInfo(userInfo);
Print print = new Print();
print.setPrintRequestUserInfo(userInfo);
@ -662,7 +662,7 @@ public class Sprt01Controller extends ApplicationController {
@RequestMapping(name="사전통지서 pdf 파일 생성", value=METHOD_URL.makeAdvntcePdf)
public ModelAndView makeAdvntcePdf(String[] crdnIds, Sndng sndng, FimsPrintOption printOption) {
UserInfo userInfo = currentUser();
cmmnOgdpBean.initUserInfo(userInfo);
fimsOgdpBean.initUserInfo(userInfo);
sndng.setSggCd((String)userInfo.getInfo().get("sggCd"));
@ -782,7 +782,7 @@ public class Sprt01Controller extends ApplicationController {
@RequestMapping(name="사전통지서 외주 파일 생성", value=METHOD_URL.makeAdvntceOutsourcing)
public ModelAndView makeAdvntceOutsourcing(String[] crdnIds, Sndng sndng, FimsPrintOption printOption) {
UserInfo userInfo = currentUser();
cmmnOgdpBean.initUserInfo(userInfo);
fimsOgdpBean.initUserInfo(userInfo);
sndng.setSggCd((String)userInfo.getInfo().get("sggCd"));
@ -900,7 +900,7 @@ public class Sprt01Controller extends ApplicationController {
public ModelAndView makeNhtPdf(String[] crdnIds, Sndng sndng, FimsPrintOption printOption) {
UserInfo userInfo = currentUser();
cmmnOgdpBean.initUserInfo(userInfo);
fimsOgdpBean.initUserInfo(userInfo);
sndng.setSggCd((String)userInfo.getInfo().get("sggCd"));
@ -1022,7 +1022,7 @@ public class Sprt01Controller extends ApplicationController {
@RequestMapping(name="고지서 외주 파일 생성", value=METHOD_URL.makeNhtOutsourcing)
public ModelAndView makeNhtOutsourcing(String[] crdnIds, Sndng sndng, FimsPrintOption printOption) {
UserInfo userInfo = currentUser();
cmmnOgdpBean.initUserInfo(userInfo);
fimsOgdpBean.initUserInfo(userInfo);
sndng.setSggCd((String)userInfo.getInfo().get("sggCd"));

@ -1,190 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cokr.xit.fims.mngt.dao.FimsOgdpMapper">
<sql id="selectDept">
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.CVLCPT_LINK_SE_CD <!-- 민원 연계 구분 코드 -->
, D.VRBACNT_LINK_SE_CD <!-- 가상계좌 연계 구분 코드 -->
, D.PSTOFC_NM <!-- 우체국 명 -->
, D.RG_NO_HEADER <!-- 등기 번호 헤더 -->
, D.SNDNG_LINK_SE_CD <!-- 발송 연계 구분 코드 -->
, D.EGP_CON_ORG <!-- E그린 외부기관구분코드 -->
, D.EGP_RCEPT_ID <!-- E그린 접수우체국국기호 -->
, D.EGP_APVL_NB <!-- E그린 후납계약승인번호 -->
, D.EGP_ESB_PATH <!-- E그린 ESB경로 -->
, D.EGP_POST_INST_ID <!-- E그린 우정정보센터 기관ID -->
, D.EGP_CERT_CN <!-- E그린 인증서CN -->
, D.ENS_INTERFACE_ID <!-- 세외수입 인터페이스ID -->
, D.ENS_SOURCE_CD <!-- 세외수입 소스코드 -->
, D.ENS_TARGET_CD <!-- 세외수입 타겟코드 -->
, D.ENS_URL <!-- 세외수입 URL -->
, D.NXRP_LINK_YN <!-- 세외수입 연계 여부 -->
, D.NXRP_LINK_SRVC_URL <!-- 세외수입 연계 서비스 URL -->
, D.NXRP_RGN_SE_CD <!-- 세외수입 지역 구분 코드 -->
, D.DTBN_BANK_NM <!-- 교부 은행 명 -->
, D.DTBN_ACTNO <!-- 교부 계좌번호 -->
, D.DOC_HEADER <!-- 문서 머릿말 -->
, D.SRVR_OS <!-- 서버 OS -->
, D.USE_YN <!-- 사용 여부 -->
, GET_CODE_NM('CMN003', D.USE_YN) AS USE_YN_NM <!-- 사용 여부 명 -->
, D.REG_DT <!-- 등록 일시 -->
, D.RGTR <!-- 등록자 -->
, D.MDFCN_DT <!-- 수정 일시 -->
, D.MDFR <!-- 수정자 -->
FROM TB_DEPT D
</sql>
<select id="selectDepts" parameterType="map" resultType="dataobject">
/* 부서 객체 가져오기(fimsOgdpMapper.selectDepts) */
<include refid="selectDept" />
<where>
<if test="sggCd != null">
AND D.SGG_CD = #{sggCd} <!-- 시군구 코드 -->
</if>
<if test="deptCd != null">
AND D.DEPT_CD = #{deptCd} <!-- 부서 코드 -->
</if>
<if test="instCd != null">
AND D.INST_CD = #{instCd} <!-- 기관 코드 -->
</if>
<if test="useYn != null">
AND D.USE_YN = #{useYn} <!-- 사용 여부 -->
</if>
</where>
<include refid="utility.orderBy" />
</select>
<select id="selectDeptList" parameterType="map" resultType="dataobject">
/* 부서 목록 조회(fimsOgdpMapper.selectDeptList) */
<include refid="utility.paging-prefix" />
<include refid="selectDept" />
WHERE D.SGG_CD = #{sggCd} <!-- 시군구 코드 -->
<if test="deptCd != null">
AND D.DEPT_CD = #{deptCd} <!-- 부서 코드 -->
</if>
<if test="instCd != null">
AND D.INST_CD = #{instCd} <!-- 기관 코드 -->
</if>
<if test="useYn != null">
AND D.USE_YN = #{useYn} <!-- 사용 여부 -->
</if>
<include refid="utility.orderBy" />
<include refid="utility.paging-suffix" />
</select>
<insert id="insertDept" parameterType="map">
/* 부서 등록(fimsOgdpMapper.insertDept) */
INSERT
INTO TB_DEPT (
DEPT_CD <!-- 부서 코드 -->
, SGG_CD <!-- 시군구 코드 -->
, INST_CD <!-- 기관 코드 -->
, DEPT_NM <!-- 부서 명 -->
, DEPT_TELNO <!-- 부서 전화번호 -->
, DEPT_FXNO <!-- 부서 팩스번호 -->
, CVLCPT_LINK_SE_CD <!-- 민원 연계 구분 코드 -->
, VRBACNT_LINK_SE_CD <!-- 가상계좌 연계 구분 코드 -->
, PSTOFC_NM <!-- 우체국 명 -->
, RG_NO_HEADER <!-- 등기 번호 헤더 -->
, SNDNG_LINK_SE_CD <!-- 발송 연계 구분 코드 -->
, EGP_CON_ORG <!-- E그린 외부기관구분코드 -->
, EGP_RCEPT_ID <!-- E그린 접수우체국국기호 -->
, EGP_APVL_NB <!-- E그린 후납계약승인번호 -->
, EGP_ESB_PATH <!-- E그린 ESB경로 -->
, EGP_POST_INST_ID <!-- E그린 우정정보센터 기관ID -->
, EGP_CERT_CN <!-- E그린 인증서CN -->
, ENS_INTERFACE_ID <!-- 세외수입 인터페이스ID -->
, ENS_SOURCE_CD <!-- 세외수입 소스코드 -->
, ENS_TARGET_CD <!-- 세외수입 타겟코드 -->
, ENS_URL <!-- 세외수입 URL -->
, NXRP_LINK_YN <!-- 세외수입 연계 여부 -->
, NXRP_RGN_SE_CD <!-- 세외수입 지역 구분 코드 -->
, DTBN_BANK_NM <!-- 교부 은행 명 -->
, DTBN_ACTNO <!-- 교부 계좌번호 -->
, DOC_HEADER <!-- 문서 머릿말 -->
, SRVR_OS <!-- 서버 OS -->
, USE_YN <!-- 사용 여부 -->
, REG_DT <!-- 등록 일시 -->
, RGTR <!-- 등록자 -->
, MDFCN_DT <!-- 수정 일시 -->
, MDFR <!-- 수정자 -->
) VALUES (
#{dept.deptID} <!-- 부서 코드 -->
, #{dept.sggID} <!-- 시군구 코드 -->
, #{dept.instCode} <!-- 기관 코드 -->
, #{dept.name} <!-- 부서 명 -->
, #{dept.telno} <!-- 부서 전화번호 -->
, #{dept.faxno} <!-- 부서 팩스번호 -->
, #{dept.cvlcptLinkSeCd} <!-- 민원 연계 구분 코드 -->
, #{dept.vrbacntLinkSeCd} <!-- 가상계좌 연계 구분 코드 -->
, #{dept.pstofcNm} <!-- 우체국 명 -->
, #{dept.rgNoHeader} <!-- 등기 번호 헤더 -->
, #{dept.sndngLinkSeCd} <!-- 발송 연계 구분 코드 -->
, #{dept.egpConOrg} <!-- E그린 외부기관구분코드 -->
, #{dept.egpRceptId} <!-- E그린 접수우체국국기호 -->
, #{dept.egpApvlNb} <!-- E그린 후납계약승인번호 -->
, #{dept.egpEsbPath} <!-- E그린 ESB경로 -->
, #{dept.egpPostInstId} <!-- E그린 우정정보센터 기관ID -->
, #{dept.egpCertCn} <!-- E그린 인증서CN -->
, #{dept.ensInterfaceId} <!-- 세외수입 인터페이스ID -->
, #{dept.ensSourceCd} <!-- 세외수입 소스코드 -->
, #{dept.ensTargetCd} <!-- 세외수입 타겟코드 -->
, #{dept.ensUrl} <!-- 세외수입 URL -->
, #{dept.nxrpLinkYn} <!-- 세외수입 연계 여부 -->
, #{dept.nxrpRgnSeCd} <!-- 세외수입 지역 구분 코드 -->
, #{dept.dtbnBankNm} <!-- 교부 은행 명 -->
, #{dept.dtbnActno} <!-- 교부 계좌번호 -->
, #{dept.docHeader} <!-- 문서 머릿말 -->
, #{dept.srvrOs} <!-- 서버 OS -->
, 'Y' <!-- 사용 여부 -->
, <include refid="utility.now" /> <!-- 등록 일시 -->
, #{dept.createdBy} <!-- 등록자 -->
, <include refid="utility.now" /> <!-- 수정 일시 -->
, #{dept.modifiedBy} <!-- 수정자 -->
)
</insert>
<update id="updateDept" parameterType="map">
/* 부서 수정(fimsOgdpMapper.updateDept) */
UPDATE TB_DEPT
SET SGG_CD = #{dept.sggID} <!-- 시군구 코드 -->
, INST_CD = #{dept.instCode} <!-- 기관 코드 -->
, DEPT_NM = #{dept.name} <!-- 부서 명 -->
, DEPT_TELNO = #{dept.telno} <!-- 부서 전화번호 -->
, DEPT_FXNO = #{dept.faxno} <!-- 부서 팩스번호 -->
, CVLCPT_LINK_SE_CD = #{dept.cvlcptLinkSeCd} <!-- 민원 연계 구분 코드 -->
, VRBACNT_LINK_SE_CD = #{dept.vrbacntLinkSeCd} <!-- 가상계좌 연계 구분 코드 -->
, PSTOFC_NM = #{dept.pstofcNm} <!-- 우체국 명 -->
, RG_NO_HEADER = #{dept.rgNoHeader} <!-- 등기 번호 헤더 -->
, SNDNG_LINK_SE_CD = #{dept.sndngLinkSeCd} <!-- 발송 연계 구분 코드 -->
, EGP_CON_ORG = #{dept.egpConOrg} <!-- E그린 외부기관구분코드 -->
, EGP_RCEPT_ID = #{dept.egpRceptId} <!-- E그린 접수우체국국기호 -->
, EGP_APVL_NB = #{dept.egpApvlNb} <!-- E그린 후납계약승인번호 -->
, EGP_ESB_PATH = #{dept.egpEsbPath} <!-- E그린 ESB경로 -->
, EGP_POST_INST_ID = #{dept.egpPostInstId} <!-- E그린 우정정보센터 기관ID -->
, EGP_CERT_CN = #{dept.egpCertCn} <!-- E그린 인증서CN -->
, ENS_INTERFACE_ID = #{dept.ensInterfaceId} <!-- 세외수입 인터페이스ID -->
, ENS_SOURCE_CD = #{dept.ensSourceCd} <!-- 세외수입 소스코드 -->
, ENS_TARGET_CD = #{dept.ensTargetCd} <!-- 세외수입 타겟코드 -->
, ENS_URL = #{dept.ensUrl} <!-- 세외수입 URL -->
, NXRP_LINK_YN = #{dept.nxrpLinkYn} <!-- 세외수입 연계 여부 -->
, NXRP_RGN_SE_CD = #{dept.nxrpRgnSeCd} <!-- 세외수입 지역 구분 코드 -->
, DTBN_BANK_NM = #{dept.dtbnBankNm} <!-- 교부 은행 명 -->
, DTBN_ACTNO = #{dept.dtbnActno} <!-- 교부 계좌번호 -->
, DOC_HEADER = #{dept.docHeader} <!-- 문서 머릿말 -->
, SRVR_OS = #{dept.srvrOs} <!-- 서버 OS -->
, MDFCN_DT = <include refid="utility.now" /> <!-- 수정 일시 -->
, MDFR = #{dept.modifiedBy} <!-- 수정자 -->
WHERE DEPT_CD = #{dept.deptID}
AND USE_YN = 'Y'
</update>
</mapper>

@ -1,174 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cokr.xit.applib.ogdp.dao.CmmnOgdpMapper">
<select id="selectAllOgdpList" resultType="dataobject">
/* 전체 기관,부서 목록 조회(cmmnOgdpMapper.selectAllOgdpList) */
SELECT CONCAT(A.INST_CD,'/',B.DEPT_CD) AS OGDP_CD
, CONCAT(A.INST_NM,' / ',B.DEPT_NM) AS OGDP_NM
, A.INST_CD
, A.INST_NM
, B.DEPT_CD
, B.DEPT_NM
, A.SGG_CD
, A.SGG_NM
FROM TB_SGG A
LEFT OUTER JOIN TB_DEPT B ON (A.INST_CD = B.INST_CD)
UNION
SELECT ('default/default') AS OGDP_CD
, CONCAT('기본 기관',' / ','기본 부서') AS OGDP_NM
, 'default' AS INST_CD
, '기본 기관' AS INST_NM
, 'default' AS DEPT_CD
, '기본 부서' AS DEPT_NM
, 'default' AS SGG_CD
, '기본 시군구' AS SGG_NM
FROM DUAL
</select>
<select id="selectAbleOgdpList" parameterType="map" resultType="dataobject">
/* 사용가능한 기관,부서 목록 조회(cmmnOgdpMapper.selectAbleOgdpList) */
SELECT CONCAT(A.INST_CD,'/',B.DEPT_CD) AS OGDP_CD
, CONCAT(A.INST_NM,' / ',B.DEPT_NM) AS OGDP_NM
, A.INST_CD
, A.INST_NM
, B.DEPT_CD
, B.DEPT_NM
, A.SGG_CD
, A.SGG_NM
FROM TB_SGG A
LEFT OUTER JOIN TB_DEPT B ON (A.INST_CD = B.INST_CD)
<choose>
<when test='anonymous == "Y" '>
WHERE A.INST_CD = #{institute}
</when>
<otherwise>
<if test="currentUser.institute != 'default'">
WHERE A.SGG_CD = #{currentUser.user.orgID}
</if>
<if test="currentUser.institute == 'default'">
UNION
SELECT 'default/default' AS OGDP_CD
, CONCAT('기본 기관',' / ','기본 부서') AS OGDP_NM
, 'default' AS INST_CD
, '기본 기관' AS INST_NM
, 'default' AS DEPT_CD
, '기본 부서' AS DEPT_NM
, 'default' AS SGG_CD
, '기본 시군구' AS SGG_NM
FROM DUAL
</if>
</otherwise>
</choose>
</select>
<select id="selectOgdpInfoOfUser" parameterType="string" resultType="dataobject">
/* 사용자의 시군구,기관,부서 조회(cmmnOgdpMapper.selectOgdpInfoOfUser) */
SELECT S.SGG_CD
, S.SGG_NM
, U.NSTT_CD AS INST_CD
, S.INST_NM
, U.DEPT_CD
, D.DEPT_NM
FROM TB_USER U
LEFT OUTER JOIN TB_SGG S ON (U.ORG_ID = S.SGG_CD)
LEFT OUTER JOIN TB_DEPT D ON (U.DEPT_CD = D.DEPT_CD)
WHERE U.USER_ID = #{userId}
</select>
<select id="selectAllSggList" parameterType="string" resultType="dataobject">
/* 모든 시군구 조회(cmmnOgdpMapper.selectAllSggList) */
SELECT SGG_CD
, SGG_NM
FROM TB_SGG
WHERE USE_YN = 'Y'
</select>
<select id="selectAllInstList" parameterType="string" resultType="dataobject">
/* 모든 기관 조회(cmmnOgdpMapper.selectAllInstList) */
SELECT INST_CD
, INST_NM
FROM TB_SGG
WHERE USE_YN = 'Y'
</select>
<sql id="selectSgg">
SELECT S.SGG_CD <!-- 시군구 코드 -->
, S.SGG_NM <!-- 시군구 명 -->
, S.INST_SE_CD <!-- 기관 구분 코드 -->
, S.INST_CD <!-- 기관 코드 -->
, S.INST_NM <!-- 기관 명 -->
, (CASE
WHEN S.INST_DADDR IS NULL OR S.INST_DADDR = ''
THEN S.INST_ADDR
ELSE CONCAT(S.INST_ADDR,' ',S.INST_DADDR)
END) AS INST_FULL_ADDR <!-- 기관 전체 주소 -->
, S.INST_ADDR <!-- 기관 기본 주소 -->
, S.INST_DADDR <!-- 기관 상세 주소 -->
, S.INST_ZIP <!-- 기관 우편번호 -->
, S.SYMBOL_FILE_PATH <!-- 상징 파일 경로 -->
, S.SYMBOL_FILE_NM <!-- 상징 파일 명 -->
, S.LOGO_FILE_PATH <!-- 로고 파일 경로 -->
, S.LOGO_FILE_NM <!-- 로고 파일 명 -->
, S.OFFCS_FILE_PATH <!-- 직인 파일 경로 -->
, S.OFFCS_FILE_NM <!-- 직인 파일 명 -->
FROM TB_SGG S
</sql>
<select id="selectSggs" parameterType="map" resultType="dataobject">
/* 시군구 객체 가져오기(cmmnOgdpMapper.selectSggs) */
<include refid="selectSgg" />
<where>
<if test="sggCd != null">
AND S.SGG_CD = #{sggCd} <!-- 시군구 코드 -->
</if>
<if test="useYn != null">
AND S.USE_YN = #{useYn} <!-- 사용 여부 -->
</if>
</where>
<include refid="utility.orderBy" />
</select>
<select id="selectSggCdByDeptCd" parameterType="string" resultType="string">
/* 부서에 따른 시군구코드 조회(cmmnOgdpMapper.selectSggCdByDeptCd) */
SELECT SGG_CD
FROM TB_DEPT
WHERE DEPT_CD = #{deptCd}
</select>
<update id="updateSgg" parameterType="map">
/* 시군구 설정정보 수정 (cmmnOgdpMapper.updateSgg) */
UPDATE TB_SGG
SET MDFCN_DT = <include refid="utility.now" />
, MDFR = #{sgg.modifiedBy}
, INST_ZIP = #{sgg.instituteZipCode} <!-- 기관 우편번호 -->
, INST_ADDR = #{sgg.instAddress} <!-- 기관 기본 주소 -->
, INST_DADDR = #{sgg.instDetailAddress} <!-- 기관 상세 주소 -->
<if test="sgg.symbolFilepath != null">
, SYMBOL_FILE_PATH = #{sgg.symbolFilepath} <!-- 상징 파일 경로 -->
, SYMBOL_FILE_NM = #{sgg.symbolFilename} <!-- 상징 파일 명 -->
</if>
<if test="sgg.logoFilepath != null">
, LOGO_FILE_PATH = #{sgg.logoFilepath} <!-- 로고 파일 경로 -->
, LOGO_FILE_NM = #{sgg.logoFilename} <!-- 로고 파일 명 -->
</if>
<if test="sgg.officialSealFilepath != null">
, OFFCS_FILE_PATH = #{sgg.officialSealFilepath} <!-- 직인 파일 경로 -->
, OFFCS_FILE_NM = #{sgg.officialSealFilename} <!-- 직인 파일 명 -->
</if>
WHERE SGG_CD = #{sgg.sggID}
</update>
<update id="setStatus" parameterType="map">
/* 부서 사용 여부 변경(cmmnOgdpMapper.setStatus) */
UPDATE TB_DEPT
SET USE_YN = #{useYn} <!-- 사용 여부 -->
, MDFCN_DT = <include refid="utility.now" /> <!-- 수정 일시 -->
, MDFR = #{currentUser.id} <!-- 수정자 -->
WHERE DEPT_CD IN ( <foreach collection="deptCds" item="deptCd" separator=","> #{deptCd} </foreach> )<!-- 부서 코드 -->
</update>
</mapper>

@ -1,108 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cokr.xit.applib.ogdp.dao.DefaultOgdpMapper">
<sql id="selectDept">
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 <!-- 사용 여부 -->
, GET_CODE_NM('CMN003', D.USE_YN) AS USE_YN_NM <!-- 사용 여부 명 -->
, D.REG_DT <!-- 등록 일시 -->
, D.RGTR <!-- 등록자 -->
, D.MDFCN_DT <!-- 수정 일시 -->
, D.MDFR <!-- 수정자 -->
FROM TB_DEPT D
</sql>
<select id="selectDeptList" parameterType="map" resultType="dataobject">
/* 부서 목록 조회(defaultOgdpMapper.selectDeptList) */
<include refid="utility.paging-prefix" />
<include refid="selectDept" />
WHERE D.SGG_CD = #{sggCd} <!-- 시군구 코드 -->
<if test="deptCd != null">
AND D.DEPT_CD = #{deptCd} <!-- 부서 코드 -->
</if>
<if test="instCd != null">
AND D.INST_CD = #{instCd} <!-- 기관 코드 -->
</if>
<if test="useYn != null">
AND D.USE_YN = #{useYn} <!-- 사용 여부 -->
</if>
<include refid="utility.orderBy" />
<include refid="utility.paging-suffix" />
</select>
<select id="selectDepts" parameterType="map" resultType="dataobject">
/* 부서 객체 가져오기(defaultOgdpMapper.selectDepts) */
<include refid="selectDept" />
<where>
<if test="sggCd != null">
AND D.SGG_CD = #{sggCd} <!-- 시군구 코드 -->
</if>
<if test="deptCd != null">
AND D.DEPT_CD = #{deptCd} <!-- 부서 코드 -->
</if>
<if test="instCd != null">
AND D.INST_CD = #{instCd} <!-- 기관 코드 -->
</if>
<if test="useYn != null">
AND D.USE_YN = #{useYn} <!-- 사용 여부 -->
</if>
</where>
<include refid="utility.orderBy" />
</select>
<insert id="insertDept" parameterType="map">
/* 부서 등록(defaultOgdpMapper.insertDept) */
INSERT
INTO TB_DEPT (
DEPT_CD <!-- 부서 코드 -->
, SGG_CD <!-- 시군구 코드 -->
, INST_CD <!-- 기관 코드 -->
, DEPT_NM <!-- 부서 명 -->
, DEPT_TELNO <!-- 부서 전화번호 -->
, DEPT_FXNO <!-- 부서 팩스번호 -->
, USE_YN <!-- 사용 여부 -->
, REG_DT <!-- 등록 일시 -->
, RGTR <!-- 등록자 -->
, MDFCN_DT <!-- 수정 일시 -->
, MDFR <!-- 수정자 -->
) VALUES (
#{dept.deptID} <!-- 부서 코드 -->
, #{dept.sggID} <!-- 시군구 코드 -->
, #{dept.instCode} <!-- 기관 코드 -->
, #{dept.name} <!-- 부서 명 -->
, #{dept.telno} <!-- 부서 전화번호 -->
, #{dept.faxno} <!-- 부서 팩스번호 -->
, 'Y' <!-- 사용 여부 -->
, <include refid="utility.now" /> <!-- 등록 일시 -->
, #{dept.createdBy} <!-- 등록자 -->
, <include refid="utility.now" /> <!-- 수정 일시 -->
, #{dept.modifiedBy} <!-- 수정자 -->
)
</insert>
<update id="updateDept" parameterType="map">
/* 부서 수정(defaultOgdpMapper.updateDept) */
UPDATE TB_DEPT
SET SGG_CD = #{dept.sggID} <!-- 시군구 코드 -->
, INST_CD = #{dept.instCode} <!-- 기관 코드 -->
, DEPT_NM = #{dept.name} <!-- 부서 명 -->
, DEPT_TELNO = #{dept.telno} <!-- 부서 전화번호 -->
, DEPT_FXNO = #{dept.faxno} <!-- 부서 팩스번호 -->
, MDFCN_DT = <include refid="utility.now" /> <!-- 수정 일시 -->
, MDFR = #{dept.modifiedBy} <!-- 수정자 -->
WHERE DEPT_CD = #{dept.deptID}
AND USE_YN = 'Y'
</update>
</mapper>

@ -202,6 +202,9 @@ $(document).ready(function(){
$("#deptID--${pageName}").attr("disabled","disabled");
$("#name--${pageName}").attr("disabled","disabled");
$P.deptControl.dataset.setData([deptInfo]);
if(deptInfo.USE_YN == "N"){
$("#btnSave--${pageName}").attr("disabled","disabled");
}
} else {
$P.deptControl.dataset.setData([]);
$("#sggID--${pageName}").val(MY_INFO.info.sggCd);

Loading…
Cancel
Save