123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="sample.TcsSiteDhsMapper">
- <!-- 하자) 현장 동호수 -->
- <resultMap type="sample.dto.TcsSiteDhsVo" id="tcsSiteDhsMap">
- <id property="cmpnCd" column="CMPN_CD" /><!-- 회사 코드 -->
- <id property="siteCd" column="SITE_CD" /><!-- 현장코드 -->
- <id property="dong" column="DONG" /><!-- 동 -->
- <id property="hsno" column="HSNO" /><!-- 호수 -->
- <id property="cntprOcphNm" column="CNTPR_OCPH_NM" /><!-- 계약 입주 자 -->
- <id property="cpNo" column="CP_NO" /><!-- 핸드폰 번호 -->
- <id property="wrteDt" column="WRTE_DT" /><!-- 작성 일자 -->
- <id property="wrtePr" column="WRTE_PR" /><!-- 작성 자 -->
- <id property="mdftDt" column="MDFT_DT" /><!-- 수정 일자 -->
- <id property="mdftPr" column="MDFT_PR" /><!-- 수정 자 -->
- </resultMap>
- <!-- 하자) 현장 동호수 - List -->
- <select id="selectTcsSiteDhsList" parameterType="sample.dto.TcsSiteDhsVo" resultMap="tcsSiteDhsMap"><![CDATA[
- SELECT
- A.CMPN_CD AS CMPN_CD ,
- A.SITE_CD AS SITE_CD ,
- A.DONG AS DONG ,
- A.HSNO AS HSNO ,
- A.CNTPR_OCPH_NM AS CNTPR_OCPH_NM ,
- A.CP_NO AS CP_NO ,
- TO_CHAR(WRTE_DT, 'YYYY-MM-DD') AS WRTE_DT ,
- A.WRTE_PR AS WRTE_PR ,
- TO_CHAR(MDFT_DT, 'YYYY-MM-DD') AS MDFT_DT ,
- A.MDFT_PR AS MDFT_PR
- FROM
- TCS_SITE_DHS A
- WHERE
- 1=1
- ORDER BY
- 1
- ]]></select>
- <!-- 하자) 현장 동호수 - View -->
- <select id="selectTcsSiteDhsView" parameterType="sample.dto.TcsSiteDhsVo" resultMap="tcsSiteDhsMap"><![CDATA[
- SELECT
- A.CMPN_CD AS CMPN_CD ,
- A.SITE_CD AS SITE_CD ,
- A.DONG AS DONG ,
- A.HSNO AS HSNO ,
- A.CNTPR_OCPH_NM AS CNTPR_OCPH_NM ,
- A.CP_NO AS CP_NO ,
- TO_CHAR(WRTE_DT, 'YYYY-MM-DD') AS WRTE_DT ,
- A.WRTE_PR AS WRTE_PR ,
- TO_CHAR(MDFT_DT, 'YYYY-MM-DD') AS MDFT_DT ,
- A.MDFT_PR AS MDFT_PR
- FROM
- TCS_SITE_DHS A
- WHERE
- CMPN_CD = #{cmpnCd} AND
- SITE_CD = #{siteCd} AND
- DONG = #{dong} AND
- HSNO = #{hsno}
- ]]></select>
- <!-- 하자) 현장 동호수 - Insert -->
- <insert id="insertTcsSiteDhs" parameterType="sample.dto.TcsSiteDhsVo"><![CDATA[
- INSERT INTO
- TCS_SITE_DHS
- (
- A.CMPN_CD AS CMPN_CD ,
- A.SITE_CD AS SITE_CD ,
- A.DONG AS DONG ,
- A.HSNO AS HSNO ,
- A.CNTPR_OCPH_NM AS CNTPR_OCPH_NM ,
- A.CP_NO AS CP_NO ,
- TO_CHAR(WRTE_DT, 'YYYY-MM-DD') AS WRTE_DT ,
- A.WRTE_PR AS WRTE_PR ,
- TO_CHAR(MDFT_DT, 'YYYY-MM-DD') AS MDFT_DT ,
- A.MDFT_PR AS MDFT_PR
- ) VALUES (
- #{cmpnCd} ,
- #{siteCd} ,
- #{dong} ,
- #{hsno} ,
- #{cntprOcphNm} ,
- #{cpNo} ,
- SYSDATE ,
- #{wrtePr} ,
- SYSDATE ,
- #{mdftPr}
- )
- ]]></insert>
- <!-- 하자) 현장 동호수 - Update -->
- <update id="updateTcsSiteDhs" parameterType="sample.dto.TcsSiteDhsVo"><![CDATA[
- UPDATE
- TCS_SITE_DHS
- SET
- CMPN_CD = #{cmpnCd} ,
- SITE_CD = #{siteCd} ,
- DONG = #{dong} ,
- HSNO = #{hsno} ,
- CNTPR_OCPH_NM = #{cntprOcphNm} ,
- CP_NO = #{cpNo} ,
- WRTE_DT = SYSDATE ,
- WRTE_PR = #{wrtePr} ,
- MDFT_DT = SYSDATE ,
- MDFT_PR = #{mdftPr}
- WHERE
- CMPN_CD = #{cmpnCd} AND
- SITE_CD = #{siteCd} AND
- DONG = #{dong} AND
- HSNO = #{hsno}
- ]]></update>
- <!-- 하자) 현장 동호수 - Delete -->
- <delete id="deleteTcsSiteDhs" parameterType="sample.dto.TcsSiteDhsVo"><![CDATA[
- DELETE
- TCS_SITE_DHS
- WHERE
- CMPN_CD = #{cmpnCd} AND
- SITE_CD = #{siteCd} AND
- DONG = #{dong} AND
- HSNO = #{hsno}
- ]]></delete>
- </mapper>
|