133 lines
4.4 KiB
XML
133 lines
4.4 KiB
XML
<?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="sgis.app.mapper.AppSoftGroundMapper">
|
|
<select id="selectSoftGroundInfo" parameterType="map" resultType="egovMap">
|
|
<![CDATA[
|
|
SELECT
|
|
PBD_MET
|
|
, PRE_LOAD_MET
|
|
, SU_TR_MET
|
|
, VA_CO_MET
|
|
, const_stage
|
|
, zone_code
|
|
, business_code
|
|
, case when kisi_thick is null then ' ' else kisi_thick::text end as kisi_thick
|
|
, case when fill_height is null then ' ' else fill_height::text end as fill_height
|
|
, case when fill_start_dt is null then ' ' else TO_CHAR(fill_start_dt, 'yyyy-MM-dd') end as fill_start_dt
|
|
, case when fill_end_dt is null then ' ' else TO_CHAR(fill_end_dt, 'yyyy-MM-dd') end as fill_end_dt
|
|
, fill_period
|
|
, neglect_period
|
|
, case when fill_height2 is null then ' ' else fill_height2::text end as fill_height2
|
|
, case when fill_start_dt2 is null then ' ' else TO_CHAR(fill_start_dt2, 'yyyy-MM-dd') end as fill_start_dt2
|
|
, case when fill_end_dt2 is null then ' ' else TO_CHAR(fill_end_dt2, 'yyyy-MM-dd') end as fill_end_dt2
|
|
, fill_period2
|
|
, neglect_period2
|
|
, case when fill_height3 is null then ' ' else fill_height3::text end as fill_height3
|
|
, case when fill_start_dt3 is null then ' ' else TO_CHAR(fill_start_dt3, 'yyyy-MM-dd') end as fill_start_dt3
|
|
, case when fill_end_dt3 is null then ' ' else TO_CHAR(fill_end_dt3, 'yyyy-MM-dd') end as fill_end_dt3
|
|
, fill_period3
|
|
, neglect_period3
|
|
, case when fill_height4 is null then ' ' else fill_height4::text end as fill_height4
|
|
, case when fill_start_dt4 is null then ' ' else TO_CHAR(fill_start_dt4, 'yyyy-MM-dd') end as fill_start_dt4
|
|
, case when fill_end_dt4 is null then ' ' else TO_CHAR(fill_end_dt4, 'yyyy-MM-dd') end as fill_end_dt4
|
|
, fill_period4
|
|
, neglect_period4
|
|
, case when fill_height5 is null then ' ' else fill_height5::text end as fill_height5
|
|
, case when fill_start_dt5 is null then ' ' else TO_CHAR(fill_start_dt5, 'yyyy-MM-dd') end as fill_start_dt5
|
|
, case when fill_end_dt5 is null then ' ' else TO_CHAR(fill_end_dt5, 'yyyy-MM-dd') end as fill_end_dt5
|
|
, fill_period5
|
|
, neglect_period5
|
|
FROM apptb_sgii01
|
|
WHERE 1=1
|
|
]]>
|
|
<if test='businessCode != null and businessCode != ""'>
|
|
<![CDATA[
|
|
AND BUSINESS_CODE = #{businessCode}
|
|
]]>
|
|
</if>
|
|
</select>
|
|
|
|
<insert id="insertSoftGroundInfo" parameterType="map">
|
|
INSERT INTO apptb_sgii01(
|
|
const_stage
|
|
, zone_code
|
|
, business_code
|
|
, kisi_thick
|
|
, fill_height
|
|
, fill_start_dt
|
|
, fill_end_dt
|
|
, fill_period
|
|
, neglect_period
|
|
, fill_height2
|
|
, fill_start_dt2
|
|
, fill_end_dt2
|
|
, fill_period2
|
|
, neglect_period2
|
|
, fill_height3
|
|
, fill_start_dt3
|
|
, fill_end_dt3
|
|
, fill_period3
|
|
, neglect_period3
|
|
, fill_height4
|
|
, fill_start_dt4
|
|
, fill_end_dt4
|
|
, fill_period4
|
|
, neglect_period4
|
|
, fill_height5
|
|
, fill_start_dt5
|
|
, fill_end_dt5
|
|
, fill_period5
|
|
, neglect_period5
|
|
) VALUES (
|
|
#{constStage}
|
|
, #{zoneCode}
|
|
, #{businessCode}
|
|
, coalesce(#{kisiThick}:: numeric, null)
|
|
, coalesce(#{fillHeight}:: numeric, null)
|
|
, TO_DATE(#{fillStartDt}:: text, 'YYYY-MM-DD')
|
|
, TO_DATE(#{fillEndDt}:: text, 'YYYY-MM-DD')
|
|
, #{fillPeriod}
|
|
, #{neglectPeriod}
|
|
, coalesce(#{fillHeight2}:: numeric, null)
|
|
, TO_DATE(#{fillStartDt2}:: text, 'YYYY-MM-DD')
|
|
, TO_DATE(#{fillEndDt2}:: text, 'YYYY-MM-DD')
|
|
, #{fillPeriod2}
|
|
, #{neglectPeriod2}
|
|
, coalesce(#{fillHeight3}:: numeric, null)
|
|
, TO_DATE(#{fillStartDt3}:: text, 'YYYY-MM-DD')
|
|
, TO_DATE(#{fillEndDt3}:: text, 'YYYY-MM-DD')
|
|
, #{fillPeriod3}
|
|
, #{neglectPeriod3}
|
|
, coalesce(#{fillHeight4}:: numeric, null)
|
|
, TO_DATE(#{fillStartDt4}:: text, 'YYYY-MM-DD')
|
|
, TO_DATE(#{fillEndDt4}:: text, 'YYYY-MM-DD')
|
|
, #{fillPeriod4}
|
|
, #{neglectPeriod4}
|
|
, coalesce(#{fillHeight5}:: numeric, null)
|
|
, TO_DATE(#{fillStartDt5}:: text, 'YYYY-MM-DD')
|
|
, TO_DATE(#{fillEndDt5}:: text, 'YYYY-MM-DD')
|
|
, #{fillPeriod5}
|
|
, #{neglectPeriod5}
|
|
)
|
|
</insert>
|
|
|
|
<delete id="deleteSoftGroundInfo" parameterType="map">
|
|
<![CDATA[
|
|
DELETE FROM apptb_sgii01
|
|
WHERE 1=1
|
|
]]>
|
|
<if test='businessCode != null and businessCode != ""'>
|
|
<![CDATA[
|
|
AND BUSINESS_CODE = #{businessCode}
|
|
]]>
|
|
</if>
|
|
</delete>
|
|
|
|
<select id="includeSoftGroundInfo" resultType="egovMap">
|
|
SELECT
|
|
BUSINESS_NAME, BUSINESS_COMPANY_NM FROM APPTB_SAUP01
|
|
WHERE BUSINESS_CODE = #{businessCode}
|
|
</select>
|
|
</mapper> |