|
|
@ -1,11 +1,11 @@
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<?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">
|
|
|
|
<!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.FactionMapper">
|
|
|
|
<mapper namespace="cokr.xit.fims.mngt.dao.OgdpMapper">
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectAllFactionList" resultType="dataobject">
|
|
|
|
<select id="selectAllOgdpList" resultType="dataobject">
|
|
|
|
/* 전체 기관,부서 목록 조회(factionMapper.selectAllFactionList) */
|
|
|
|
/* 전체 기관,부서 목록 조회(ogdpMapper.selectAllOgdpList) */
|
|
|
|
SELECT CONCAT(A.INST_CD,'/',B.DEPT_CD) AS FACTION_CD
|
|
|
|
SELECT CONCAT(A.INST_CD,'/',B.DEPT_CD) AS OGDP_CD
|
|
|
|
, CONCAT(A.INST_NM,' / ',B.DEPT_NM) AS FACTION_NM
|
|
|
|
, CONCAT(A.INST_NM,' / ',B.DEPT_NM) AS OGDP_NM
|
|
|
|
, A.INST_CD
|
|
|
|
, A.INST_CD
|
|
|
|
, A.INST_NM
|
|
|
|
, A.INST_NM
|
|
|
|
, B.DEPT_CD
|
|
|
|
, B.DEPT_CD
|
|
|
@ -15,8 +15,8 @@ SELECT CONCAT(A.INST_CD,'/',B.DEPT_CD) AS FACTION_CD
|
|
|
|
FROM TB_SGG A
|
|
|
|
FROM TB_SGG A
|
|
|
|
LEFT OUTER JOIN TB_DEPT B ON (A.INST_CD = B.INST_CD)
|
|
|
|
LEFT OUTER JOIN TB_DEPT B ON (A.INST_CD = B.INST_CD)
|
|
|
|
UNION
|
|
|
|
UNION
|
|
|
|
SELECT ('default/default') AS FACTION_CD
|
|
|
|
SELECT ('default/default') AS OGDP_CD
|
|
|
|
, CONCAT('기본 기관',' / ','기본 부서') AS FACTION_NM
|
|
|
|
, CONCAT('기본 기관',' / ','기본 부서') AS OGDP_NM
|
|
|
|
, 'default' AS INST_CD
|
|
|
|
, 'default' AS INST_CD
|
|
|
|
, '기본 기관' AS INST_NM
|
|
|
|
, '기본 기관' AS INST_NM
|
|
|
|
, 'default' AS DEPT_CD
|
|
|
|
, 'default' AS DEPT_CD
|
|
|
@ -26,10 +26,10 @@ SELECT ('default/default') AS FACTION_CD
|
|
|
|
FROM DUAL
|
|
|
|
FROM DUAL
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectAbleFactionList" parameterType="map" resultType="dataobject">
|
|
|
|
<select id="selectAbleOgdpList" parameterType="map" resultType="dataobject">
|
|
|
|
/* 사용가능한 기관,부서 목록 조회(factionMapper.selectAbleFactionList) */
|
|
|
|
/* 사용가능한 기관,부서 목록 조회(ogdpMapper.selectAbleOgdpList) */
|
|
|
|
SELECT CONCAT(A.INST_CD,'/',B.DEPT_CD) AS FACTION_CD
|
|
|
|
SELECT CONCAT(A.INST_CD,'/',B.DEPT_CD) AS OGDP_CD
|
|
|
|
, CONCAT(A.INST_NM,' / ',B.DEPT_NM) AS FACTION_NM
|
|
|
|
, CONCAT(A.INST_NM,' / ',B.DEPT_NM) AS OGDP_NM
|
|
|
|
, A.INST_CD
|
|
|
|
, A.INST_CD
|
|
|
|
, A.INST_NM
|
|
|
|
, A.INST_NM
|
|
|
|
, B.DEPT_CD
|
|
|
|
, B.DEPT_CD
|
|
|
@ -48,8 +48,8 @@ LEFT OUTER JOIN TB_DEPT B ON (A.INST_CD = B.INST_CD)
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="currentUser.institute == 'default'">
|
|
|
|
<if test="currentUser.institute == 'default'">
|
|
|
|
UNION
|
|
|
|
UNION
|
|
|
|
SELECT 'default/default' AS FACTION_CD
|
|
|
|
SELECT 'default/default' AS OGDP_CD
|
|
|
|
, CONCAT('기본 기관',' / ','기본 부서') AS FACTION_NM
|
|
|
|
, CONCAT('기본 기관',' / ','기본 부서') AS OGDP_NM
|
|
|
|
, 'default' AS INST_CD
|
|
|
|
, 'default' AS INST_CD
|
|
|
|
, '기본 기관' AS INST_NM
|
|
|
|
, '기본 기관' AS INST_NM
|
|
|
|
, 'default' AS DEPT_CD
|
|
|
|
, 'default' AS DEPT_CD
|
|
|
@ -63,8 +63,8 @@ LEFT OUTER JOIN TB_DEPT B ON (A.INST_CD = B.INST_CD)
|
|
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectFactionInfoOfUser" parameterType="string" resultType="dataobject">
|
|
|
|
<select id="selectOgdpInfoOfUser" parameterType="string" resultType="dataobject">
|
|
|
|
/* 사용자의 시군구,기관,부서 조회(factionMapper.selectFactionInfoOfUser) */
|
|
|
|
/* 사용자의 시군구,기관,부서 조회(ogdpMapper.selectOgdpInfoOfUser) */
|
|
|
|
SELECT S.SGG_CD
|
|
|
|
SELECT S.SGG_CD
|
|
|
|
, S.SGG_NM
|
|
|
|
, S.SGG_NM
|
|
|
|
, U.NSTT_CD AS INST_CD
|
|
|
|
, U.NSTT_CD AS INST_CD
|
|
|
@ -78,7 +78,7 @@ SELECT S.SGG_CD
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectAllSggList" parameterType="string" resultType="dataobject">
|
|
|
|
<select id="selectAllSggList" parameterType="string" resultType="dataobject">
|
|
|
|
/* 모든 시군구 조회(factionMapper.selectAllSggList) */
|
|
|
|
/* 모든 시군구 조회(ogdpMapper.selectAllSggList) */
|
|
|
|
SELECT SGG_CD
|
|
|
|
SELECT SGG_CD
|
|
|
|
, SGG_NM
|
|
|
|
, SGG_NM
|
|
|
|
FROM TB_SGG
|
|
|
|
FROM TB_SGG
|
|
|
@ -86,7 +86,7 @@ SELECT SGG_CD
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectAllInstList" parameterType="string" resultType="dataobject">
|
|
|
|
<select id="selectAllInstList" parameterType="string" resultType="dataobject">
|
|
|
|
/* 모든 기관 조회(factionMapper.selectAllInstList) */
|
|
|
|
/* 모든 기관 조회(ogdpMapper.selectAllInstList) */
|
|
|
|
SELECT INST_CD
|
|
|
|
SELECT INST_CD
|
|
|
|
, INST_NM
|
|
|
|
, INST_NM
|
|
|
|
FROM TB_SGG
|
|
|
|
FROM TB_SGG
|
|
|
@ -118,7 +118,7 @@ SELECT S.SGG_CD <!-- 시군구 코드 -->
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectSggs" parameterType="map" resultType="dataobject">
|
|
|
|
<select id="selectSggs" parameterType="map" resultType="dataobject">
|
|
|
|
/* 시군구 객체 가져오기(factionMapper.selectSggs) */
|
|
|
|
/* 시군구 객체 가져오기(ogdpMapper.selectSggs) */
|
|
|
|
<include refid="selectSgg" />
|
|
|
|
<include refid="selectSgg" />
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="sggCd != null">
|
|
|
|
<if test="sggCd != null">
|
|
|
@ -132,14 +132,14 @@ SELECT S.SGG_CD <!-- 시군구 코드 -->
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectSggCdByDeptCd" parameterType="string" resultType="string">
|
|
|
|
<select id="selectSggCdByDeptCd" parameterType="string" resultType="string">
|
|
|
|
/* 부서에 따른 시군구코드 조회(factionMapper.selectSggCdByDeptCd) */
|
|
|
|
/* 부서에 따른 시군구코드 조회(ogdpMapper.selectSggCdByDeptCd) */
|
|
|
|
SELECT SGG_CD
|
|
|
|
SELECT SGG_CD
|
|
|
|
FROM TB_DEPT
|
|
|
|
FROM TB_DEPT
|
|
|
|
WHERE DEPT_CD = #{deptCd}
|
|
|
|
WHERE DEPT_CD = #{deptCd}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<update id="updateSgg" parameterType="map">
|
|
|
|
<update id="updateSgg" parameterType="map">
|
|
|
|
/* 시군구 설정정보 수정 (factionMapper.updateSgg) */
|
|
|
|
/* 시군구 설정정보 수정 (ogdpMapper.updateSgg) */
|
|
|
|
UPDATE TB_SGG
|
|
|
|
UPDATE TB_SGG
|
|
|
|
SET MDFCN_DT = <include refid="utility.now" />
|
|
|
|
SET MDFCN_DT = <include refid="utility.now" />
|
|
|
|
, MDFR = #{sgg.modifiedBy}
|
|
|
|
, MDFR = #{sgg.modifiedBy}
|
|
|
@ -239,7 +239,7 @@ UPDATE TB_SGG
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectDeptList" parameterType="map" resultType="dataobject">
|
|
|
|
<select id="selectDeptList" parameterType="map" resultType="dataobject">
|
|
|
|
/* 부서 목록 조회(factionMapper.selectDeptList) */
|
|
|
|
/* 부서 목록 조회(ogdpMapper.selectDeptList) */
|
|
|
|
<include refid="utility.paging-prefix" />
|
|
|
|
<include refid="utility.paging-prefix" />
|
|
|
|
<include refid="selectDept" />
|
|
|
|
<include refid="selectDept" />
|
|
|
|
WHERE D.SGG_CD = #{sggCd} <!-- 시군구 코드 -->
|
|
|
|
WHERE D.SGG_CD = #{sggCd} <!-- 시군구 코드 -->
|
|
|
@ -257,7 +257,7 @@ UPDATE TB_SGG
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectDepts" parameterType="map" resultType="dataobject">
|
|
|
|
<select id="selectDepts" parameterType="map" resultType="dataobject">
|
|
|
|
/* 부서 객체 가져오기(factionMapper.selectDepts) */
|
|
|
|
/* 부서 객체 가져오기(ogdpMapper.selectDepts) */
|
|
|
|
<include refid="selectDept" />
|
|
|
|
<include refid="selectDept" />
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="sggCd != null">
|
|
|
|
<if test="sggCd != null">
|
|
|
@ -277,7 +277,7 @@ UPDATE TB_SGG
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertDept" parameterType="map">
|
|
|
|
<insert id="insertDept" parameterType="map">
|
|
|
|
/* 부서 등록(factionMapper.insertDept) */
|
|
|
|
/* 부서 등록(ogdpMapper.insertDept) */
|
|
|
|
INSERT
|
|
|
|
INSERT
|
|
|
|
INTO TB_DEPT (
|
|
|
|
INTO TB_DEPT (
|
|
|
|
DEPT_CD <!-- 부서 코드 -->
|
|
|
|
DEPT_CD <!-- 부서 코드 -->
|
|
|
@ -349,7 +349,7 @@ UPDATE TB_SGG
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
<update id="updateDept" parameterType="map">
|
|
|
|
<update id="updateDept" parameterType="map">
|
|
|
|
/* 부서 수정(factionMapper.updateDept) */
|
|
|
|
/* 부서 수정(ogdpMapper.updateDept) */
|
|
|
|
UPDATE TB_DEPT
|
|
|
|
UPDATE TB_DEPT
|
|
|
|
SET SGG_CD = #{dept.sggID} <!-- 시군구 코드 -->
|
|
|
|
SET SGG_CD = #{dept.sggID} <!-- 시군구 코드 -->
|
|
|
|
, INST_CD = #{dept.instCode} <!-- 기관 코드 -->
|
|
|
|
, INST_CD = #{dept.instCode} <!-- 기관 코드 -->
|
|
|
@ -384,7 +384,7 @@ UPDATE TB_SGG
|
|
|
|
</update>
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
<update id="setStatus" parameterType="map">
|
|
|
|
<update id="setStatus" parameterType="map">
|
|
|
|
/* 부서 사용 여부 변경(factionMapper.setStatus) */
|
|
|
|
/* 부서 사용 여부 변경(ogdpMapper.setStatus) */
|
|
|
|
UPDATE TB_DEPT
|
|
|
|
UPDATE TB_DEPT
|
|
|
|
SET USE_YN = #{useYn} <!-- 사용 여부 -->
|
|
|
|
SET USE_YN = #{useYn} <!-- 사용 여부 -->
|
|
|
|
, MDFCN_DT = <include refid="utility.now" /> <!-- 수정 일시 -->
|
|
|
|
, MDFCN_DT = <include refid="utility.now" /> <!-- 수정 일시 -->
|