INSERT INTO APPTB_WAVE01(
BUSINESS_CODE
, HOLE_CODE
, TEST_ORDER
, BH_DEPTH_FROM
, BH_DEPTH_TO
, BH_VP_VELOCITY
, BH_VS_VELOCITY
, BH_POISSONS_RATIO
, BH_SHEAR_MODULUS
, BH_YOUNGS_MODULUS
, BH_DENSITY
, BH_CHECKED_BY
, SYS_REG_ID
, SYS_REG_DT
, SET_UNIT
, SET_UNIT2
, SET_UNIT3
, SET_UNIT4
, SET_UNIT5
, SET_UNIT6
, SET_UNIT7
, SET_UNIT8
) VALUES (
#{businessCode}
, #{holeCode}
, #{testOrder}
, coalesce(#{bhDepthFrom}::numeric, null)
, coalesce(#{bhDepthTo}::numeric, null)
, coalesce(#{bhVpVelocity}::numeric, null)
, coalesce(#{bhVsVelocity}::numeric, null)
, coalesce(#{bhPoissonsRatio}::numeric, null)
, coalesce(#{bhShearModulus}::numeric, null)
, coalesce(#{bhYoungsModulus}::numeric, null)
, coalesce(#{bhDensity}::numeric, null)
, #{bhCheckedBy}
, #{sysRegId}
, NOW()
, #{mUnit}
, #{mUnit2}
, #{setUnit3}
, #{mUnit4}
, #{setUnit5}
, #{mUnit6}
, #{setUnit7}
, #{mUnit8}
)
DELETE FROM APPTB_WAVE01
WHERE BUSINESS_CODE = #{businessCode}
AND HOLE_CODE = #{holeCode}
INSERT INTO APPTB_DOWN01(
BUSINESS_CODE
, HOLE_CODE
, TEST_ORDER
, DH_DEPTH_FROM
, DH_DEPTH_TO
, DH_VP_VELOCITY
, DH_VS_VELOCITY
, DH_POISSONS_RATIO
, DH_SHEAR_MODULUS
, DH_YOUNGS_MODULUS
, DH_DENSITY
, DH_CHECKED_BY
, SYS_REG_ID
, SYS_REG_DT
, SET_UNIT
, SET_UNIT2
, SET_UNIT3
, SET_UNIT4
, SET_UNIT5
, SET_UNIT6
, SET_UNIT7
, SET_UNIT8
) VALUES (
#{businessCode}
, #{holeCode}
, #{testOrder}
, coalesce(#{dhDepthFrom}::numeric, null)
, coalesce(#{dhDepthTo}::numeric, null)
, coalesce(#{dhVpVelocity}::numeric, null)
, coalesce(#{dhVsVelocity}::numeric, null)
, coalesce(#{dhPoissonsRatio}::numeric, null)
, coalesce(#{dhShearModulus}::numeric, null)
, coalesce(#{dhYoungsModulus}::numeric, null)
, coalesce(#{dhDensity}::numeric, null)
, #{dhCheckedBy}
, #{sysRegId}
, NOW()
, #{mUnit}
, #{mUnit2}
, #{setUnit3}
, #{mUnit4}
, #{setUnit5}
, #{mUnit6}
, #{setUnit7}
, #{mUnit8}
)
DELETE FROM APPTB_DOWN01
WHERE BUSINESS_CODE = #{businessCode}
AND HOLE_CODE = #{holeCode}
INSERT INTO APPTB_DENS01(
BUSINESS_CODE
, HOLE_CODE
, TEST_ORDER
, RS_DEPTH_FROM
, RS_DEPTH_TO
, RS_LAYER
, RS_DENSITY
, RS_CHECKED_USER
, RS_CHECKED_BY
, RS_START_DATE
, RS_END_DATE
, RS_WATER_LEVEL
, SYS_REG_ID
, SYS_REG_DT
, REMARK
, SET_UNIT
, SET_UNIT2
, SET_UNIT3
) VALUES (
#{businessCode}
, #{holeCode}
, #{testOrder}
, coalesce(#{rsDepthFrom}::numeric, null)
, coalesce(#{rsDepthTo}::numeric, null)
, #{rsLayer}
, coalesce(#{rsDensity}::numeric, null)
, #{rsCheckedUser}
, #{rsCheckedBy}
, to_date(#{rsStartDate},'YYYY-MM-DD')
, to_date(#{rsEndDate},'YYYY-MM-DD')
, #{rsWaterLevel}
, #{sysRegId}
, NOW()
, #{remark}
, #{mUnit}
, #{mUnit2}
, #{mUnit3}
)
DELETE FROM APPTB_DENS01
WHERE BUSINESS_CODE = #{businessCode}
AND HOLE_CODE = #{holeCode}