smartGeoinfoOriginal/target/classes/egovframework/mapper/sgis/app/AppBasicMapper.xml

1212 lines
33 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.AppBasicMapper">
<!-- 사업 표준관입시험정보 -->
<select id="selectSptInfo" parameterType="map" resultType="egovMap">
<![CDATA[
SELECT
A.BUSINESS_CODE
, A.HOLE_CODE
, coalesce(round(A.DEPTH_SPT :: numeric, 2)::text, '') as DEPTH_SPT
, coalesce(A.SPT_N ::text, '') as SPT_N
, coalesce(A.SPT_DEPTH ::text, '') as SPT_DEPTH
, coalesce(A.SPT_HAMMER_ENERGY_FACTOR ::text, '') as SPT_HAMMER_ENERGY_FACTOR
, coalesce(A.SPT_EFFECTIVE_STRESS_FACTOR ::text, '') as SPT_EFFECTIVE_STRESS_FACTOR
, coalesce(A.SPT_LENGTH_FACTOR ::text, '') as SPT_LENGTH_FACTOR
, coalesce(A.SPT_BORE_FACTOR ::text, '') as SPT_BORE_FACTOR
, coalesce(A.SPT_SAMPLE_TYPE_FACTOR ::text, '') as SPT_SAMPLE_TYPE_FACTOR
, A.SET_UNIT
, coalesce(A.SPT_DESC, '') AS SPT_DESC
FROM APPTB_SPT01 A
WHERE 1=1
]]>
<if test='businessCode != null and businessCode != ""'>
<![CDATA[
AND A.BUSINESS_CODE = #{businessCode}
]]>
</if>
<if test='holeCode != null and holeCode != ""'>
<![CDATA[
AND A.HOLE_CODE = #{holeCode}
]]>
</if>
<![CDATA[
ORDER BY A.DEPTH_SPT
]]>
</select>
<insert id="insertSptInfo" parameterType="map">
INSERT INTO APPTB_SPT01(
BUSINESS_CODE
, HOLE_CODE
, DEPTH_SPT
, SPT_N
, SPT_DEPTH
, SPT_HAMMER_ENERGY_FACTOR
, SPT_EFFECTIVE_STRESS_FACTOR
, SPT_LENGTH_FACTOR
, SPT_BORE_FACTOR
, SPT_SAMPLE_TYPE_FACTOR
, SYS_REG_ID
, SYS_REG_DT
, SET_UNIT
, SPT_DESC
) VALUES (
#{businessCode}
, #{holeCode}
, #{depthSpt}
, coalesce(#{sptN} :: numeric, null)
, coalesce(#{sptDepth} :: numeric, null)
, coalesce(#{sptHammerEnergyFactor} :: numeric, null)
, coalesce(#{sptEffectiveStressFactor} :: numeric, null)
, coalesce(#{sptLengthFactor} :: numeric, null)
, coalesce(#{sptBoreFactor} :: numeric, null)
, coalesce(#{sptSampleTypeFactor} :: numeric, null)
, #{sysRegId}
, NOW()
, #{mUnit}
, #{sptDesc}
)
</insert>
<delete id="deleteSptInfo" parameterType="map">
DELETE FROM APPTB_SPT01
WHERE BUSINESS_CODE = #{businessCode}
AND HOLE_CODE = #{holeCode}
</delete>
<!-- 사업 TCR/RQD 시험정보 -->
<select id="selectTcrrqdInfo" parameterType="map" resultType="egovMap">
<![CDATA[
SELECT
A.BUSINESS_CODE
, A.HOLE_CODE
, round(A.TR_DEPTH_FROM :: numeric, 2) as TR_DEPTH_FROM
, round(A.TR_DEPTH_TO :: numeric, 2) as TR_DEPTH_TO
, coalesce(round(A.TR_RQD :: numeric, 2)::text, '') as TR_RQD
, coalesce(round(A.TR_TCR :: numeric, 2)::text, '') as TR_TCR
, case when TCR_DESC is null then ' ' else TCR_DESC::text end as TCR_DESC
, coalesce(A.SET_UNIT, '') as SET_UNIT
, coalesce(A.SET_UNIT2, '') as SET_UNIT2
FROM APPTB_TCR01 A
WHERE 1=1
]]>
<if test='businessCode != null and businessCode != ""'>
<![CDATA[
AND A.BUSINESS_CODE = #{businessCode}
]]>
</if>
<if test='holeCode != null and holeCode != ""'>
<![CDATA[
AND A.HOLE_CODE = #{holeCode}
]]>
</if>
<![CDATA[
ORDER BY A.TR_DEPTH_FROM
]]>
</select>
<insert id="insertTcrrqdInfo" parameterType="map">
INSERT INTO APPTB_TCR01(
BUSINESS_CODE
, HOLE_CODE
, TR_DEPTH_FROM
, TR_DEPTH_TO
, TR_RQD
, TR_TCR
, SYS_REG_ID
, SYS_REG_DT
, TCR_DESC
, SET_UNIT
, SET_UNIT2
) VALUES (
#{businessCode}
, #{holeCode}
, #{trDepthFrom}
, #{trDepthTo}
, coalesce(#{trRqd}::numeric, null)
, coalesce(#{trTcr}::numeric, null)
, #{sysRegId}
, NOW()
, #{tcrDesc}
, #{mUnit}
, #{mUnit2}
)
</insert>
<delete id="deleteTcrrqdInfo" parameterType="map">
DELETE FROM APPTB_TCR01
WHERE BUSINESS_CODE = #{businessCode}
AND HOLE_CODE = #{holeCode}
</delete>
<!-- 사업 DSF 시험정보 -->
<select id="selectDsfInfo" parameterType="map" resultType="egovMap">
<![CDATA[
SELECT
A.BUSINESS_CODE
, A.HOLE_CODE
, round(A.DSF_DEPTH_FROM :: numeric, 2) as DSF_DEPTH_FROM
, round(A.DSF_DEPTH_TO :: numeric, 2) as DSF_DEPTH_TO
, A.DSF_DECOMPOSITION
, A.DSF_STRENGTH
, A.DSF_FRACTURING
, COALESCE(A.SET_UNIT, '') AS SET_UNIT
, COALESCE(A.SET_UNIT2, '') AS SET_UNIT2
FROM APPTB_DSF01 A
WHERE 1=1
]]>
<if test='businessCode != null and businessCode != ""'>
<![CDATA[
AND A.BUSINESS_CODE = #{businessCode}
]]>
</if>
<if test='holeCode != null and holeCode != ""'>
<![CDATA[
AND A.HOLE_CODE = #{holeCode}
]]>
</if>
<![CDATA[
ORDER BY A.DSF_DEPTH_FROM
]]>
</select>
<insert id="insertDsfInfo" parameterType="map">
INSERT INTO APPTB_DSF01(
BUSINESS_CODE
, HOLE_CODE
, DSF_DEPTH_FROM
, DSF_DEPTH_TO
, DSF_DECOMPOSITION
, DSF_STRENGTH
, DSF_FRACTURING
, SYS_REG_ID
, SYS_REG_DT
, SET_UNIT
, SET_UNIT2
) VALUES (
#{businessCode}
, #{holeCode}
, #{dsfDepthFrom}
, #{dsfDepthTo}
, #{dsfDecomposition}
, #{dsfStrength}
, #{dsfFracturing}
, #{sysRegId}
, NOW()
, #{mUnit}
, #{mUnit2}
)
</insert>
<delete id="deleteDsfInfo" parameterType="map">
DELETE FROM APPTB_DSF01
WHERE BUSINESS_CODE = #{businessCode}
AND HOLE_CODE = #{holeCode}
</delete>
<!-- 사업 공내재하 시험정보 -->
<select id="selectPressuremeterInfo" parameterType="map" resultType="egovMap">
<![CDATA[
SELECT
A.BUSINESS_CODE
, A.HOLE_CODE
, A.FIELDPRES_CODE
, round(A.FIELDPRES_DEPTH :: numeric, 2) as FIELDPRES_DEPTH
, A.FIELDPRES_INSPECTED_BY
, A.FIELDPRES_CHECKED_BY
, A.FIELDPRES_TUBE_TYPE
, COALESCE(ROUND(A.FIELDPRES_KP :: NUMERIC, 2)::TEXT, '') AS FIELDPRES_KP
, COALESCE(ROUND(A.FIELDPRES_EP :: NUMERIC, 2)::TEXT, '') AS FIELDPRES_EP
, COALESCE(A.SET_UNIT, '') AS SET_UNIT
, COALESCE(A.SET_UNIT2, '') AS SET_UNIT2
, COALESCE(A.SET_UNIT3, '') AS SET_UNIT3
, COALESCE(A.SET_UNIT4, '') AS SET_UNIT4
, COALESCE(A.SET_UNIT5, '') AS SET_UNIT5
FROM APPTB_PRES01 A
WHERE 1=1
]]>
<if test='businessCode != null and businessCode != ""'>
<![CDATA[
AND A.BUSINESS_CODE = #{businessCode}
]]>
</if>
<if test='holeCode != null and holeCode != ""'>
<![CDATA[
AND A.HOLE_CODE = #{holeCode}
]]>
</if>
<![CDATA[
ORDER BY A.FIELDPRES_CODE
]]>
</select>
<insert id="insertFieldPressuremeterInfo" parameterType="map">
INSERT INTO APPTB_PRES01(
BUSINESS_CODE
, HOLE_CODE
, FIELDPRES_CODE
, FIELDPRES_DEPTH
, FIELDPRES_INSPECTED_BY
, FIELDPRES_CHECKED_BY
, FIELDPRES_TUBE_TYPE
, FIELDPRES_KP
, FIELDPRES_EP
, SYS_REG_ID
, SYS_REG_DT
, SET_UNIT
, SET_UNIT2
, SET_UNIT3
, SET_UNIT4
, SET_UNIT5
) VALUES (
#{businessCode}
, #{holeCode}
, #{fieldpresCode}
, #{fieldpresDepth}
, #{fieldpresInspectedBy}
, #{fieldpresCheckedBy}
, #{fieldpresTubeType}
, coalesce(#{fieldpresKp} :: numeric, null)
, coalesce(#{fieldpresEp} :: numeric, null)
, #{sysRegId}
, NOW()
, COALESCE(#{mUnit}::TEXT, '0')
, COALESCE(#{setUnit2}::TEXT, '0')
, COALESCE(#{mUnit3}::TEXT, '0')
, COALESCE(#{setUnit4}::TEXT, '0')
, COALESCE(#{mUnit5}::TEXT, '0')
)
</insert>
<delete id="deleteFieldPressuremeterInfo" parameterType="map">
DELETE FROM APPTB_PRES01
WHERE BUSINESS_CODE = #{businessCode}
AND HOLE_CODE = #{holeCode}
</delete>
<!-- 사업 절리정보 시험정보 -->
<select id="selectSlickensideInfo" parameterType="map" resultType="egovMap">
<![CDATA[
SELECT
A.BUSINESS_CODE
, A.HOLE_CODE
, round(A.SLICKENSIDE_DEPTH_FROM :: numeric, 2) as SLICKENSIDE_DEPTH_FROM
, round(A.SLICKENSIDE_DEPTH_TO :: numeric, 2) as SLICKENSIDE_DEPTH_TO
, A.SLICKENSIDE_DIRECTION
, A.SLICKENSIDE_ANGLE
, coalesce(round(A.SLICKENSIDE_MAX :: numeric, 2)::text,'') as SLICKENSIDE_MAX
, coalesce(round(A.SLICKENSIDE_MIN :: numeric, 2)::text,'') as SLICKENSIDE_MIN
, coalesce(round(A.SLICKENSIDE_AVG :: numeric, 2)::text,'') as SLICKENSIDE_AVG
, A.SLICKENSIDE_ROUGH
, coalesce(A.SET_UNIT, '') as SET_UNIT
, coalesce(A.SET_UNIT2, '') as SET_UNIT2
, coalesce(A.SLICKENSIDE_DESC, '') as SLICKENSIDE_DESC
FROM APPTB_JONT01 A
WHERE 1=1
]]>
<if test='businessCode != null and businessCode != ""'>
<![CDATA[
AND A.BUSINESS_CODE = #{businessCode}
]]>
</if>
<if test='holeCode != null and holeCode != ""'>
<![CDATA[
AND A.HOLE_CODE = #{holeCode}
]]>
</if>
<![CDATA[
ORDER BY A.SLICKENSIDE_DEPTH_FROM
]]>
</select>
<insert id="insertSlickensideInfo" parameterType="map">
INSERT INTO APPTB_JONT01(
BUSINESS_CODE
, HOLE_CODE
, SLICKENSIDE_DEPTH_FROM
, SLICKENSIDE_DEPTH_TO
, SLICKENSIDE_DIRECTION
, SLICKENSIDE_ANGLE
, SLICKENSIDE_MAX
, SLICKENSIDE_MIN
, SLICKENSIDE_AVG
, SLICKENSIDE_ROUGH
, SYS_REG_ID
, SYS_REG_DT
, SET_UNIT
, SET_UNIT2
, SLICKENSIDE_DESC
) VALUES (
#{businessCode}
, #{holeCode}
, #{slickensideDepthFrom}
, #{slickensideDepthTo}
, #{slickensideDirection}
, #{slickensideAngle}
, coalesce(#{slickensideMax} :: numeric, null)
, coalesce(#{slickensideMin} :: numeric, null)
, coalesce(#{slickensideAvg} :: numeric, null)
, #{slickensideRough}
, #{sysRegId}
, NOW()
, #{mUnit}
, #{mUnit2}
, #{slickensideDesc}
)
</insert>
<delete id="deleteSlickensideInfo" parameterType="map">
DELETE FROM APPTB_JONT01
WHERE BUSINESS_CODE = #{businessCode}
AND HOLE_CODE = #{holeCode}
</delete>
<!-- 사업 Q 시험정보 -->
<select id="selectQInfo" parameterType="map" resultType="egovMap">
<![CDATA[
SELECT
A.BUSINESS_CODE
, A.HOLE_CODE
, round(A.DEPTH_FROM :: numeric, 2) as DEPTH_FROM
, round(A.DEPTH_TO :: numeric, 2) as DEPTH_TO
, A.ROCK_TYPE
, coalesce(round(A.RQD :: numeric, 2)::text,'') as RQD
, coalesce(A.RQD_DESC, '') as RQD_DESC
, coalesce(round(A.JN :: numeric, 2)::text, '') as JN
, coalesce(A.JN_DESC, '') as JN_DESC
, coalesce(round(A.JR :: numeric, 2)::text, '') as JR
, coalesce(A.JR_DESC, '') as JR_DESC
, coalesce(round(A.JA :: numeric, 2)::text, '') as JA
, coalesce(A.JA_DESC, '') as JA_DESC
, coalesce(round(A.JW :: numeric, 2)::text, '') as JW
, coalesce(A.JW_DESC, '') as JW_DESC
, coalesce(round(A.SRF :: numeric, 2)::text, '') as SRF
, coalesce(A.SRF_DESC, '') as SRF_DESC
, coalesce(A.SET_UNIT, '') as SET_UNIT
, coalesce(A.SET_UNIT2, '') as SET_UNIT2
FROM APPTB_SYSQ01 A
WHERE 1=1
]]>
<if test='businessCode != null and businessCode != ""'>
<![CDATA[
AND A.BUSINESS_CODE = #{businessCode}
]]>
</if>
<if test='holeCode != null and holeCode != ""'>
<![CDATA[
AND A.HOLE_CODE = #{holeCode}
]]>
</if>
<![CDATA[
ORDER BY A.DEPTH_FROM
]]>
</select>
<insert id="insertQInfo" parameterType="map">
INSERT INTO APPTB_SYSQ01(
BUSINESS_CODE
, HOLE_CODE
, DEPTH_FROM
, DEPTH_TO
, ROCK_TYPE
, RQD
, RQD_DESC
, JN
, JN_DESC
, JR
, JR_DESC
, JA
, JA_DESC
, JW
, JW_DESC
, SRF
, SRF_DESC
, SYS_REG_ID
, SYS_REG_DT
, SET_UNIT
, SET_UNIT2
) VALUES (
#{businessCode}
, #{holeCode}
, #{depthFrom}
, #{depthTo}
, #{rockType}
, coalesce(#{rqd} :: numeric, null)
, #{rqdDesc}
, coalesce(#{jn}:: numeric, null)
, #{jnDesc}
, coalesce(#{jr}:: numeric, null)
, #{jrDesc}
, coalesce(#{ja}:: numeric, null)
, #{jaDesc}
, coalesce(#{jw}:: numeric, null)
, #{jwDesc}
, coalesce(#{srf}:: numeric, null)
, #{srfDesc}
, #{sysRegId}
, NOW()
, #{mUnit}
, #{mUnit2}
)
</insert>
<delete id="deleteQInfo" parameterType="map">
DELETE FROM APPTB_SYSQ01
WHERE BUSINESS_CODE = #{businessCode}
AND HOLE_CODE = #{holeCode}
</delete>
<!-- 사업 RMR 시험정보 -->
<select id="selectRmrInfo" parameterType="map" resultType="egovMap">
<![CDATA[
SELECT
A.BUSINESS_CODE
, A.HOLE_CODE
, round(A.DEPTH_FROM :: numeric, 2) as DEPTH_FROM
, round(A.DEPTH_TO :: numeric, 2) as DEPTH_TO
, A.ROCK_TYPE
, coalesce(round(A.ROCK_STRENGTH :: numeric, 2)::text, '') as ROCK_STRENGTH
, coalesce(round(A.ROCK_STRENGTH_POINT :: numeric, 2)::text, '') as ROCK_STRENGTH_POINT
, A.ROCK_STRENGTH_DESC
, coalesce(round(A.RQD :: numeric, 2)::text, '') as RQD
, coalesce(round(A.RQD_POINT :: numeric, 2)::text, '') as RQD_POINT
, coalesce(A.RQD_DESC, '') as RQD_DESC
, coalesce(A.JOINTS_SPACING, '') as JOINTS_SPACING
, coalesce(round(A.JOINTS_SPACING_POINT :: numeric, 2)::text, '') as JOINTS_SPACING_POINT
, coalesce(A.JOINTS_SPACING_DESC, '') as JOINTS_SPACING_DESC
, coalesce(A.JOINT_CONDITION, '') as JOINT_CONDITION
, coalesce(round(A.JOINT_CONDITION_POINT :: numeric, 2)::text, '') as JOINT_CONDITION_POINT
, coalesce(A.GROUNDWATER_CONDITION, '') as GROUNDWATER_CONDITION
, coalesce(round(A.GROUNDWATER_CONDITION_POINT :: numeric, 2)::text, '') as GROUNDWATER_CONDITION_POINT
, coalesce(A.JOINT_ORIENTATION, '') as JOINT_ORIENTATION
, coalesce(round(A.JOINT_ORIENTATION_POINT :: numeric, 2)::text, '') as JOINT_ORIENTATION_POINT
, coalesce(A.JOINT_ORIENTATION_DESC, '') as JOINT_ORIENTATION_DESC
, coalesce(A.SET_UNIT, '') as SET_UNIT
, coalesce(A.SET_UNIT2, '') as SET_UNIT2
FROM APPTB_RMR01 A
WHERE 1=1
]]>
<if test='businessCode != null and businessCode != ""'>
<![CDATA[
AND A.BUSINESS_CODE = #{businessCode}
]]>
</if>
<if test='holeCode != null and holeCode != ""'>
<![CDATA[
AND A.HOLE_CODE = #{holeCode}
]]>
</if>
<![CDATA[
ORDER BY A.DEPTH_FROM
]]>
</select>
<insert id="insertRmrInfo" parameterType="map">
INSERT INTO APPTB_RMR01(
BUSINESS_CODE
, HOLE_CODE
, DEPTH_FROM
, DEPTH_TO
, ROCK_TYPE
, ROCK_STRENGTH
, ROCK_STRENGTH_POINT
, ROCK_STRENGTH_DESC
, RQD
, RQD_POINT
, RQD_DESC
, JOINTS_SPACING
, JOINTS_SPACING_POINT
, JOINTS_SPACING_DESC
, JOINT_CONDITION
, JOINT_CONDITION_POINT
, GROUNDWATER_CONDITION
, GROUNDWATER_CONDITION_POINT
, JOINT_ORIENTATION
, JOINT_ORIENTATION_POINT
, JOINT_ORIENTATION_DESC
, SYS_REG_ID
, SYS_REG_DT
, SET_UNIT
, SET_UNIT2
) VALUES (
#{businessCode}
, #{holeCode}
, #{depthFrom}
, #{depthTo}
, #{rockType}
, coalesce(#{rockStrength} :: numeric, null)
, coalesce(#{rockStrengthPoint} :: numeric, null)
, #{rockStrengthDesc}
, coalesce(#{rqd} :: numeric, null)
, coalesce(#{rqdPoint} :: numeric, null)
, #{rqdDesc}
, #{jointsSpacing}
, coalesce(#{jointsSpacingPoint} :: numeric, null)
, #{jointsSpacingDesc}
, #{jointCondition}
, coalesce(#{jointConditionPoint} :: numeric, null)
, #{groundwaterCondition}
, coalesce(#{groundwaterConditionPoint} :: numeric, null)
, #{jointOrientation}
, coalesce(#{jointOrientationPoint} :: numeric, null)
, #{jointOrientationDesc}
, #{sysRegId}
, NOW()
, #{mUnit}
, #{mUnit2}
)
</insert>
<delete id="deleteRmrInfo" parameterType="map">
DELETE FROM APPTB_RMR01
WHERE BUSINESS_CODE = #{businessCode}
AND HOLE_CODE = #{holeCode}
</delete>
<!-- 사업 현장수압정보 시험정보 -->
<select id="selectFieldWaterPressureInfo" parameterType="map" resultType="egovMap">
<![CDATA[
SELECT
A.BUSINESS_CODE
, A.HOLE_CODE
, A.WP_CODE
, round(A.FIELDWP_DEPTH_FROM :: numeric, 2) as FIELDWP_DEPTH_FROM
, round(A.FIELDWP_DEPTH_TO :: numeric, 2) as FIELDWP_DEPTH_TO
, A.FIELDWP_PACKER_TYPE
, coalesce(round(A.FIELDWP_TEST_SPACING :: numeric, 5)::text, '') as FIELDWP_TEST_SPACING
, coalesce(A.FIELDWP_WATER_PRESSURE::text, '') as FIELDWP_WATER_PRESSURE
, coalesce(round(A.FIELDWP_AVG_PERMEABILITY :: numeric, 8)::text, '') as FIELDWP_AVG_PERMEABILITY
, coalesce(round(A.FIELDWP_LU :: numeric, 2)::text, '') as FIELDWP_LU
, A.FIELDWP_INSPECTED_BY
, A.FIELDWP_CHECKED_BY
, coalesce(A.FIELDWP_REMARK, '') as FIELDWP_REMARK
, coalesce(A.SET_UNIT, '') as SET_UNIT
, coalesce(A.SET_UNIT2, '') as SET_UNIT2
, coalesce(A.SET_UNIT3, '') as SET_UNIT3
, coalesce(A.SET_UNIT4, '') as SET_UNIT4
FROM APPTB_WPRS01 A
WHERE 1=1
]]>
<if test='businessCode != null and businessCode != ""'>
<![CDATA[
AND A.BUSINESS_CODE = #{businessCode}
]]>
</if>
<if test='holeCode != null and holeCode != ""'>
<![CDATA[
AND A.HOLE_CODE = #{holeCode}
]]>
</if>
<if test='wpCode != null and wpCode != ""'>
<![CDATA[
AND A.WP_CODE = #{wpCode}
]]>
</if>
<![CDATA[
ORDER BY A.FIELDWP_DEPTH_FROM
]]>
</select>
<insert id="insertFieldWaterPressureInfo" parameterType="map">
INSERT INTO APPTB_WPRS01(
BUSINESS_CODE
, HOLE_CODE
, WP_CODE
, FIELDWP_DEPTH_FROM
, FIELDWP_DEPTH_TO
, FIELDWP_PACKER_TYPE
, FIELDWP_TEST_SPACING
, FIELDWP_WATER_PRESSURE
, FIELDWP_AVG_PERMEABILITY
, FIELDWP_LU
, FIELDWP_INSPECTED_BY
, FIELDWP_CHECKED_BY
, FIELDWP_REMARK
, SYS_REG_ID
, SYS_REG_DT
, SET_UNIT
, SET_UNIT2
, SET_UNIT3
, SET_UNIT4
) VALUES (
#{businessCode}
, #{holeCode}
, #{wpCode}
, #{fieldwpDepthFrom}
, #{fieldwpDepthTo}
, #{fieldwpPackerType}
, coalesce(#{fieldwpTestSpacing}::numeric, null)
, coalesce(#{fieldwpWaterPressure}::numeric, null)
, coalesce(#{fieldwpAvgPermeability}::numeric, null)
, coalesce(#{fieldwpLu}::numeric, null)
, #{fieldwpInspectedBy}
, #{fieldwpCheckedBy}
, #{fieldwpRemark}
, #{sysRegId}
, NOW()
, #{mUnit}
, #{mUnit2}
, #{setUnit3}
, #{mUnit4}
)
</insert>
<delete id="deleteFieldWaterPressureInfo" parameterType="map">
DELETE FROM APPTB_WPRS01
WHERE BUSINESS_CODE = #{businessCode}
AND HOLE_CODE = #{holeCode}
</delete>
<update id="updateFieldWaterPressureSubInfo">
UPDATE APPTB_WPRS02
SET WP_CODE = #{wpCode}
WHERE WP_CODE = #{prevWpCode}
</update>
<!-- 사업 현장수압정보 시험 부정보 -->
<select id="selectFieldWpSubInfo" parameterType="map" resultType="egovMap">
<![CDATA[
SELECT
A.BUSINESS_CODE
, A.HOLE_CODE
, A.WP_CODE
, round(A.WPTEST_ORDER :: numeric, 2) as WPTEST_ORDER
, coalesce(round(A.WPTEST_WATER_PRESSURE :: numeric, 2)::text, '') as WPTEST_WATER_PRESSURE
, coalesce(round(A.WPTEST_TOTAL_HEAD :: numeric, 2)::text, '') as WPTEST_TOTAL_HEAD
, coalesce(round(A.WPTEST_QUANTITY :: numeric, 2)::text, '') as WPTEST_QUANTITY
, coalesce(round(A.WPTEST_PERMEABILITY :: numeric, 8)::text, '') as WPTEST_PERMEABILITY
, coalesce(round(A.WPLUGEON_PRESSURE :: numeric, 2)::text, '') as WPLUGEON_PRESSURE
, coalesce(round(A.WPLUGEON_INJECT_WATER :: numeric, 2)::text, '') as WPLUGEON_INJECT_WATER
, coalesce(round(A.WPLUGEON_LU :: numeric, 2)::text, '') as WPLUGEON_LU
, coalesce(A.SET_UNIT, '') as SET_UNIT
, coalesce(A.SET_UNIT2, '') as SET_UNIT2
, coalesce(A.SET_UNIT3, '') as SET_UNIT3
, coalesce(A.SET_UNIT4
FROM APPTB_WPRS02 A
WHERE 1=1
]]>
<if test='businessCode != null and businessCode != ""'>
<![CDATA[
AND BUSINESS_CODE = #{businessCode}
]]>
</if>
<if test='holeCode != null and holeCode != ""'>
<![CDATA[
AND HOLE_CODE = #{holeCode}
]]>
</if>
<if test='wpCode != null and wpCode != ""'>
<![CDATA[
AND A.WP_CODE = #{wpCode}
]]>
</if>
<![CDATA[
ORDER BY A.WPTEST_ORDER
]]>
</select>
<insert id="insertFieldWpSubInfo" parameterType="map">
INSERT INTO APPTB_WPRS02(
BUSINESS_CODE
, HOLE_CODE
, WP_CODE
, WPTEST_ORDER
, WPTEST_WATER_PRESSURE
, WPTEST_TOTAL_HEAD
, WPTEST_QUANTITY
, WPTEST_PERMEABILITY
, WPLUGEON_PRESSURE
, WPLUGEON_INJECT_WATER
, WPLUGEON_LU
, SYS_REG_ID
, SYS_REG_DT
, SET_UNIT
, SET_UNIT2
, SET_UNIT3
, SET_UNIT4
) VALUES (
#{businessCode}
, #{holeCode}
, #{wpCode}
, #{wptestOrder}
, coalesce(#{wptestWaterPressure}::numeric, null)
, coalesce(#{wptestTotalHead}::numeric, null)
, coalesce(#{wptestQuantity}::numeric, null)
, coalesce(#{wptestPermeability}::numeric, null)
, coalesce(#{wplugeonPressure}::numeric, null)
, coalesce(#{wplugeonInjectWater}::numeric, null)
, coalesce(#{wplugeonLu}::numeric, null)
, #{sysRegId}
, NOW()
, #{setUnit}
, #{mUnit2}
, #{setUnit3}
, #{mUnit4}
)
</insert>
<delete id="deleteFieldWpSubInfo" parameterType="map">
DELETE FROM APPTB_WPRS02
WHERE 1=1
<if test='businessCode != null and businessCode != ""'>
<![CDATA[
AND BUSINESS_CODE = #{businessCode}
]]>
</if>
<if test='holeCode != null and holeCode != ""'>
<![CDATA[
AND HOLE_CODE = #{holeCode}
]]>
</if>
<if test='wpCode != null and wpCode != ""'>
<![CDATA[
AND WP_CODE = #{wpCode}
]]>
</if>
</delete>
<!-- 사업 현장투수정보 시험정보 -->
<select id="selectFieldPermeablityInfo" parameterType="map" resultType="egovMap">
<![CDATA[
SELECT
A.BUSINESS_CODE
, A.HOLE_CODE
, A.PER_CODE
, round(A.FIELDPER_DEPTH_FROM :: numeric, 2) as FIELDPER_DEPTH_FROM
, round(A.FIELDPER_DEPTH_TO :: numeric, 2) as FIELDPER_DEPTH_TO
, coalesce(round(A.FIELDPER_CASING_DIA :: numeric, 2)::text, '') as FIELDPER_CASING_DIA
, coalesce(round(A.FIELDPER_CASING_HEIGHT :: numeric, 2)::text, '') as FIELDPER_CASING_HEIGHT
, coalesce(round(A.FIELDPER_AVG_PERMEABILITY :: numeric, 6)::text, '') as FIELDPER_AVG_PERMEABILITY
, coalesce(A.FIELDPER_INSPECTED_BY, '') as FIELDPER_INSPECTED_BY
, coalesce(A.FIELDPER_CHECKED_BY, '') as FIELDPER_CHECKED_BY
, coalesce(A.FIELDPER_REMARK, '') as FIELDPER_REMARK
, coalesce(A.SET_UNIT, '') as SET_UNIT
, coalesce(A.SET_UNIT2, '') as SET_UNIT2
FROM APPTB_PERA01 A
WHERE 1=1
]]>
<if test='businessCode != null and businessCode != ""'>
<![CDATA[
AND A.BUSINESS_CODE = #{businessCode}
]]>
</if>
<if test='holeCode != null and holeCode != ""'>
<![CDATA[
AND A.HOLE_CODE = #{holeCode}
]]>
</if>
<if test='perCode != null and perCode != ""'>
<![CDATA[
AND A.PER_CODE = #{perCode}
]]>
</if>
<![CDATA[
ORDER BY A.FIELDPER_DEPTH_FROM
]]>
</select>
<insert id="insertFieldPermeablityInfo" parameterType="map">
INSERT INTO APPTB_PERA01(
BUSINESS_CODE
, HOLE_CODE
, PER_CODE
, FIELDPER_DEPTH_FROM
, FIELDPER_DEPTH_TO
, FIELDPER_CASING_DIA
, FIELDPER_CASING_HEIGHT
, FIELDPER_AVG_PERMEABILITY
, FIELDPER_INSPECTED_BY
, FIELDPER_CHECKED_BY
, FIELDPER_REMARK
, SYS_REG_ID
, SYS_REG_DT
, SET_UNIT
, SET_UNIT2
) VALUES (
#{businessCode}
, #{holeCode}
, #{perCode}
, #{fieldperDepthFrom}
, #{fieldperDepthTo}
, coalesce(#{fieldperCasingDia}::numeric, null)
, coalesce(#{fieldperCasingHeight}::numeric, null)
, coalesce(#{fieldperAvgPermeability}::numeric, null)
, #{fieldperInspectedBy}
, #{fieldperCheckedBy}
, #{fieldperRemark}
, #{sysRegId}
, NOW()
, #{mUnit}
, #{mUnit2}
)
</insert>
<delete id="deleteFieldPermeablityInfo" parameterType="map">
DELETE FROM APPTB_PERA01
WHERE BUSINESS_CODE = #{businessCode}
AND HOLE_CODE = #{holeCode}
</delete>
<!-- 사업 현장수압정보 시험 부정보 -->
<select id="selectFieldPerSubInfo" parameterType="map" resultType="egovMap">
<![CDATA[
SELECT
A.BUSINESS_CODE
, A.HOLE_CODE
, A.PER_CODE
, round(A.FIELDPER_ORDER :: numeric, 2) as FIELDPER_ORDER
, coalesce(round(A.FIELDPER_SUB_TIME :: numeric, 2)::text, '') as FIELDPER_SUB_TIME
, coalesce(round(A.FIELDPER_SUB_TOTAL_HEAD :: numeric, 2)::text, '') as FIELDPER_SUB_TOTAL_HEAD
, coalesce(round(A.FIELDPER_SUB_FALLING_HEAD :: numeric, 2)::text, '') as FIELDPER_SUB_FALLING_HEAD
, coalesce(round(A.FIELDPER_SUB_WATER_LOOSE :: numeric, 2)::text, '') as FIELDPER_SUB_WATER_LOOSE
, coalesce(round(A.FIELDPER_SUB_QUANTITY :: numeric, 2)::text, '') as FIELDPER_SUB_QUANTITY
, coalesce(round(A.FIELDPER_SUB_PERMEABILITY :: numeric, 5)::text, '') as FIELDPER_SUB_PERMEABILITY
FROM APPTB_PERA02 A
WHERE 1=1
]]>
<if test='businessCode != null and businessCode != ""'>
<![CDATA[
AND A.BUSINESS_CODE = #{businessCode}
]]>
</if>
<if test='holeCode != null and holeCode != ""'>
<![CDATA[
AND A.HOLE_CODE = #{holeCode}
]]>
</if>
<if test='perCode != null and perCode != ""'>
<![CDATA[
AND A.PER_CODE = #{perCode}
]]>
</if>
<![CDATA[
ORDER BY A.FIELDPER_ORDER
]]>
</select>
<update id="updateFieldPermeablitySubInfo">
UPDATE APPTB_PERA01
SET PER_CODE = #{perCode}
WHERE PER_CODE = #{prevPerCode}
</update>
<delete id="deleteFieldPerSubInfo" parameterType="map">
DELETE FROM APPTB_PERA02
WHERE 1=1
<if test='businessCode != null and businessCode != ""'>
<![CDATA[
AND BUSINESS_CODE = #{businessCode}
]]>
</if>
<if test='holeCode != null and holeCode != ""'>
<![CDATA[
AND HOLE_CODE = #{holeCode}
]]>
</if>
<if test='perCode != null and perCode != ""'>
<![CDATA[
AND PER_CODE = #{perCode}
]]>
</if>
</delete>
<insert id="insertFieldPerSubInfo" parameterType="map">
INSERT INTO APPTB_PERA02(
BUSINESS_CODE
, HOLE_CODE
, PER_CODE
, FIELDPER_ORDER
, FIELDPER_SUB_TIME
, FIELDPER_SUB_TOTAL_HEAD
, FIELDPER_SUB_FALLING_HEAD
, FIELDPER_SUB_WATER_LOOSE
, FIELDPER_SUB_QUANTITY
, FIELDPER_SUB_PERMEABILITY
, SYS_REG_ID
, SYS_REG_DT
) VALUES (
#{businessCode}
, #{holeCode}
, #{perCode}
, #{fieldperOrder}
, coalesce(#{fieldperSubTime}::numeric, null)
, coalesce(#{fieldperSubTotalHead}::numeric, null)
, coalesce(#{fieldperSubFallingHead}::numeric, null)
, coalesce(#{fieldperSubWaterLoose}::numeric, null)
, coalesce(#{fieldperSubQuantity}::numeric, null)
, coalesce(#{fieldperSubPermeability}::numeric, null)
, #{sysRegId}
, NOW()
)
</insert>
<!-- 사업 콘관입정보 시험정보 -->
<select id="selectFieldConePenetrationInfo" parameterType="map" resultType="egovMap">
<![CDATA[
SELECT
A.BUSINESS_CODE
, A.HOLE_CODE
, A.CP_CODE
, round(A.CP_DEPTH_FROM :: numeric, 2) as CP_DEPTH_FROM
, coalesce(round(A.CP_DEPTH_TO :: numeric, 2)::text, '') as CP_DEPTH_TO
, coalesce(round(A.CP_EDGE_RESISTENCE :: numeric, 2)::text, '') as CP_EDGE_RESISTENCE
, coalesce(round(A.CP_CORRECTED_EDGE_RESISTENCE :: numeric, 2)::text, '') as CP_CORRECTED_EDGE_RESISTENCE
, coalesce(round(A.CP_SLEEVE_FRICTIONAL_FORCE :: numeric, 2)::text, '') as CP_SLEEVE_FRICTIONAL_FORCE
, coalesce(round(A.CP_NEUTRALSTRESS :: numeric, 2)::text, '') as CP_NEUTRALSTRESS
, coalesce(round(A.CP_FRICTIONAL_RATIO :: numeric, 2)::text, '') as CP_FRICTIONAL_RATIO
, coalesce(A.SET_UNIT, '') as SET_UNIT
, coalesce(A.SET_UNIT2, '') as SET_UNIT2
, coalesce(A.SET_UNIT3, '') as SET_UNIT3
, coalesce(A.SET_UNIT4, '') as SET_UNIT4
, coalesce(A.SET_UNIT5, '') as SET_UNIT5
, coalesce(A.SET_UNIT6, '') as SET_UNIT6
, coalesce(A.SET_UNIT7, '') as SET_UNIT7
, coalesce(A.SET_UNIT8, '') as SET_UNIT8
, coalesce(A.SET_UNIT9, '') as SET_UNIT9
, coalesce(A.SET_UNIT10, '') as SET_UNIT10
, A.EPSG_CODE_TYPE
, A.POINT_X
, A.POINT_Y
, coalesce(A.CP_DESC, '') as CP_DESC
FROM APPTB_CONE01 A
WHERE 1=1
]]>
<if test='businessCode != null and businessCode != ""'>
<![CDATA[
AND A.BUSINESS_CODE = #{businessCode}
]]>
</if>
<if test='holeCode != null and holeCode != ""'>
<![CDATA[
AND A.HOLE_CODE = #{holeCode}
]]>
</if>
<if test='cpCode != null and cpCode != ""'>
<![CDATA[
AND A.CP_CODE = #{cpCode}
]]>
</if>
<![CDATA[
ORDER BY A.CP_DEPTH_FROM
]]>
</select>
<insert id="insertFieldConePenetrationInfo" parameterType="map">
INSERT INTO APPTB_CONE01(
BUSINESS_CODE
, HOLE_CODE
, CP_CODE
, CP_DEPTH_FROM
, CP_DEPTH_TO
, CP_EDGE_RESISTENCE
, CP_CORRECTED_EDGE_RESISTENCE
, CP_SLEEVE_FRICTIONAL_FORCE
, CP_NEUTRALSTRESS
, CP_FRICTIONAL_RATIO
, SYS_REG_ID
, SYS_REG_DT
, SET_UNIT
, SET_UNIT2
, SET_UNIT3
, SET_UNIT4
, SET_UNIT5
, SET_UNIT6
, SET_UNIT7
, SET_UNIT8
, SET_UNIT9
, SET_UNIT10
, EPSG_CODE_TYPE
, POINT_X
, POINT_Y
, CP_DESC
) VALUES (
#{businessCode}
, #{holeCode}
, #{cpCode}
, #{cpDepthFrom}
, coalesce(#{cpDepthTo} :: numeric, null)
, coalesce(#{cpEdgeResistence} :: numeric, null)
, coalesce(#{cpCorrectedEdgeResistence} :: numeric, null)
, coalesce(#{cpSleeveFrictionalForce} :: numeric, null)
, coalesce(#{cpNeutralstress} :: numeric, null)
, coalesce(#{cpFrictionalRatio} :: numeric, null)
, #{sysRegId}
, NOW()
, coalesce(#{mUnit}:: text, '0')
, coalesce(#{mUnit2}:: text, '0')
, coalesce(#{setUnit3}:: text, '0')
, coalesce(#{mUnit4}:: text, '0')
, coalesce(#{setUnit5}:: text, '0')
, coalesce(#{mUnit6}:: text, '0')
, coalesce(#{setUnit7}:: text, '0')
, coalesce(#{mUnit8}:: text, '0')
, coalesce(#{setUnit9}:: text, '0')
, coalesce(#{mUnit10}:: text, '0')
, #{epsgCodeType}
, #{pointX}
, #{pointY}
, #{cpDesc}
)
</insert>
<delete id="deleteFieldConePenetrationInfo" parameterType="map">
DELETE FROM APPTB_CONE01
WHERE BUSINESS_CODE = #{businessCode}
AND HOLE_CODE = #{holeCode}
</delete>
<!-- 사업 베인정보 시험정보 -->
<select id="selectFieldVaneInfo" parameterType="map" resultType="egovMap">
<![CDATA[
SELECT
A.BUSINESS_CODE
, A.HOLE_CODE
, round(A.VANE_DEPTH :: numeric, 2) as VANE_DEPTH
, A.EPSG_CODE_TYPE AS EPSG_CODE_TYPE
, POINT_X
, POINT_Y
, coalesce(round(A.UNDISTURBED_SHEAR_STRENGTH :: numeric, 2) :: text, '') as UNDISTURBED_SHEAR_STRENGTH
, coalesce(round(A.DISTURBED_SHEAR_STRENGTH :: numeric, 2) :: text, '') as DISTURBED_SHEAR_STRENGTH
, coalesce(round(A.SENSITIVITY :: numeric, 2) :: text, '') as SENSITIVITY
, coalesce(A.SET_UNIT, '') as SET_UNIT
, coalesce(A.SET_UNIT2, '') as SET_UNIT2
, coalesce(A.SET_UNIT3, '') as SET_UNIT3
, coalesce(A.SET_UNIT4, '') as SET_UNIT4
, coalesce(A.SET_UNIT5, '') as SET_UNIT5
, coalesce(A.VANE_DESC, '') as VANE_DESC
FROM APPTB_VANE01 A
WHERE 1=1
]]>
<if test='businessCode != null and businessCode != ""'>
<![CDATA[
AND A.BUSINESS_CODE = #{businessCode}
]]>
</if>
<if test='holeCode != null and holeCode != ""'>
<![CDATA[
AND A.HOLE_CODE = #{holeCode}
]]>
</if>
<![CDATA[
ORDER BY A.VANE_DEPTH
]]>
</select>
<delete id="deleteFieldVaneInfo" parameterType="map">
DELETE FROM APPTB_VANE01
WHERE BUSINESS_CODE = #{businessCode}
AND HOLE_CODE = #{holeCode}
</delete>
<insert id="insertFieldVaneInfo" parameterType="map">
INSERT INTO APPTB_VANE01(
BUSINESS_CODE
, HOLE_CODE
, VANE_DEPTH
, EPSG_CODE_TYPE
, POINT_X
, POINT_Y
, UNDISTURBED_SHEAR_STRENGTH
, DISTURBED_SHEAR_STRENGTH
, SENSITIVITY
, SYS_REG_ID
, SYS_REG_DT
, SET_UNIT
, SET_UNIT2
, SET_UNIT3
, SET_UNIT4
, SET_UNIT5
, VANE_DESC
) VALUES (
#{businessCode}
, #{holeCode}
, #{vaneDepth}
, #{epsgCodeType}
, #{pointX}
, #{pointY}
, coalesce(#{undisturbedShearStrength} :: numeric, null)
, coalesce(#{disturbedShearStrength} :: numeric, null)
, coalesce(#{sensitivity} :: numeric, null)
, #{sysRegId}
, NOW()
, #{mUnit}
, #{setUnit2}
, #{mUnit3}
, #{setUnit4}
, #{mUnit5}
, COALESCE(#{vaneDesc}::text, '')
)
</insert>
<!-- 사업 간극수압소산정보 시험정보 -->
<select id="selectFieldPoreWaterPressureInfo" parameterType="map" resultType="egovMap">
<![CDATA[
SELECT
A.BUSINESS_CODE
, A.HOLE_CODE
, A.EPSG_CODE_TYPE AS EPSG_CODE_TYPE
, POINT_X
, POINT_Y
, round(A.PORE_DEPTH :: NUMERIC, 2) AS PORE_DEPTH
, coalesce(ROUND(A.PORE_TIME :: NUMERIC, 2)::text, '') AS PORE_TIME
, coalesce(round(A.CONSOLIDATION :: numeric, 5)::text, '') as CONSOLIDATION
, coalesce(round(A.PERMEABILITY :: numeric, 5)::text, '') as PERMEABILITY
, coalesce(A.SET_UNIT, '') as SET_UNIT
FROM APPTB_PORE01 A
WHERE 1=1
]]>
<if test='businessCode != null and businessCode != ""'>
<![CDATA[
AND A.BUSINESS_CODE = #{businessCode}
]]>
</if>
<if test='holeCode != null and holeCode != ""'>
<![CDATA[
AND A.HOLE_CODE = #{holeCode}
]]>
</if>
<![CDATA[
ORDER BY A.PORE_DEPTH
]]>
</select>
<delete id="deleteFieldPoreWaterPressureInfo" parameterType="map">
DELETE FROM APPTB_PORE01
WHERE BUSINESS_CODE = #{businessCode}
AND HOLE_CODE = #{holeCode}
</delete>
<insert id="insertFieldPoreWaterPressureInfo" parameterType="map">
INSERT INTO APPTB_PORE01(
BUSINESS_CODE
, HOLE_CODE
, EPSG_CODE_TYPE
, POINT_X
, POINT_Y
, PORE_DEPTH
, PORE_TIME
, CONSOLIDATION
, PERMEABILITY
, SYS_REG_ID
, SYS_REG_DT
, SET_UNIT
) VALUES (
#{businessCode}
, #{holeCode}
, #{epsgCodeType}
, #{pointX}
, #{pointY}
, #{poreDepth}
, coalesce(#{poreTime}::numeric, null)
, coalesce(#{consolidation}::numeric, null)
, coalesce(#{permeability}::numeric, null)
, #{sysRegId}
, NOW()
, #{mUnit}
)
</insert>
</mapper>