INSERT INTO APPTB_CLAS01(
BUSINESS_CODE
, HOLE_CODE
, SAMPLE_CODE
, CLASSI_DEPTH
, CLASSI_D10
, CLASSI_D30
, CLASSI_D60
, CLASSI_CU
, CLASSI_CG
, CLASSI_NO4
, CLASSI_NO6
, CLASSI_NO8
, CLASSI_NO10
, CLASSI_NO16
, CLASSI_NO20
, CLASSI_NO30
, CLASSI_NO40
, CLASSI_NO50
, CLASSI_NO60
, CLASSI_NO70
, CLASSI_NO100
, CLASSI_NO140
, CLASSI_NO200
, CLASSI_NO0005
, CLASSI_NO0002
, CLASSI_REMARK
, SYS_REG_ID
, SYS_REG_DT
, SET_UNIT
) VALUES (
#{businessCode}
, #{holeCode}
, #{sampleCode}
, coalesce(#{classiDepth} :: numeric, null)
, coalesce(#{classiD10} :: numeric, null)
, coalesce(#{classiD30} :: numeric, null)
, coalesce(#{classiD60} :: numeric, null)
, coalesce(#{classiCu} :: numeric, null)
, coalesce(#{classiCg} :: numeric, null)
, coalesce(#{classiNo4} :: numeric, null)
, coalesce(#{classiNo6} :: numeric, null)
, coalesce(#{classiNo8} :: numeric, null)
, coalesce(#{classiNo10} :: numeric, null)
, coalesce(#{classiNo16} :: numeric, null)
, coalesce(#{classiNo20} :: numeric, null)
, coalesce(#{classiNo30} :: numeric, null)
, coalesce(#{classiNo40} :: numeric, null)
, coalesce(#{classiNo50} :: numeric, null)
, coalesce(#{classiNo60} :: numeric, null)
, coalesce(#{classiNo70} :: numeric, null)
, coalesce(#{classiNo100} :: numeric, null)
, coalesce(#{classiNo140} :: numeric, null)
, coalesce(#{classiNo200} :: numeric, null)
, coalesce(#{classiNo0005} :: numeric, null)
, coalesce(#{classiNo0002} :: numeric, null)
, #{classiRemark}
, #{sysRegId}
, NOW()
, #{mUnit}
)
DELETE FROM APPTB_CLAS01
WHERE BUSINESS_CODE = #{businessCode}
AND HOLE_CODE = #{holeCode}
INSERT INTO APPTB_CBR01(
BUSINESS_CODE
, HOLE_CODE
, SAMPLE_CODE
, CBR_DEPTH
, CBR_D_RD
, CBR_D_GS
, CBR_D_COMPACTION
, CBR_D_CMC
, CBR_A_RD
, CBR_A_GS
, CBR_A_COMPACTION
, CBR_A_CMC
, CBR_55_SWELLING
, CBR_55_SOAKING
, CBR_55_MOULDING
, CBR_25_SWELLING
, CBR_25_SOAKING
, CBR_25_MOULDING
, CBR_10_SWELLING
, CBR_10_SOAKING
, CBR_10_MOULDING
, CBR_REMARK
, SYS_REG_ID
, SYS_REG_DT
, SET_UNIT
, SET_UNIT2
, SET_UNIT3
, SET_UNIT4
, SET_UNIT5
) VALUES (
#{businessCode}
, #{holeCode}
, #{sampleCode}
, coalesce(#{cbrDepth}::numeric, null)
, coalesce(#{cbrDRd}::numeric, null)
, coalesce(#{cbrDGs}::numeric, null)
, coalesce(#{cbrDCompaction}::numeric, null)
, coalesce(#{cbrDCmc}::numeric, null)
, coalesce(#{cbrARd}::numeric, null)
, coalesce(#{cbrAGs}::numeric, null)
, coalesce(#{cbrACompaction}::numeric, null)
, coalesce(#{cbrACmc}::numeric, null)
, coalesce(#{cbr55Swelling}::numeric, null)
, coalesce(#{cbr55Soaking}::numeric, null)
, coalesce(#{cbr55Moulding}::numeric, null)
, coalesce(#{cbr25Swelling}::numeric, null)
, coalesce(#{cbr25Soaking}::numeric, null)
, coalesce(#{cbr25Moulding}::numeric, null)
, coalesce(#{cbr10Swelling}::numeric, null)
, coalesce(#{cbr10Soaking}::numeric, null)
, coalesce(#{cbr10Moulding}::numeric, null)
, #{cbrRemark}
, #{sysRegId}
, NOW()
, #{mUnit}
, #{setUnit2}
, #{mUnit3}
, #{setUnit4}
, #{mUnit5}
)
DELETE FROM APPTB_CBR01
WHERE BUSINESS_CODE = #{businessCode}
AND HOLE_CODE = #{holeCode}
INSERT INTO APPTB_CONS01(
BUSINESS_CODE
, HOLE_CODE
, SAMPLE_CODE
, CONSOL_SAMPLE_DIA
, CONSOL_SAMPLE_HEIGHT
, CONSOL_W0
, CONSOL_WF
, CONSOL_RF
, CONSOL_RD
, CONSOL_S0
, CONSOL_SF
, CONSOL_PC
, CONSOL_CC
, CONSOL_REMARK
, SYS_REG_ID
, SYS_REG_DT
, CONSOL_DEPTH
, SET_UNIT
, SET_UNIT2
, SET_UNIT3
, SET_UNIT4
, SET_UNIT5
, SET_UNIT6
, SET_UNIT7
, SET_UNIT8
, SET_UNIT9
) VALUES (
#{businessCode}
, #{holeCode}
, #{sampleCode}
, COALESCE(#{consolSampleDia}::numeric, null)
, COALESCE(#{consolSampleHeight}::numeric, null)
, COALESCE(#{consolW0}::numeric, null)
, COALESCE(#{consolWf}::numeric, null)
, COALESCE(#{consolRf}::numeric, null)
, COALESCE(#{consolRd}::numeric, null)
, COALESCE(#{consolS0}::numeric, null)
, COALESCE(#{consolSf}::numeric, null)
, COALESCE(#{consolPc}::numeric, null)
, COALESCE(#{consolCc}::numeric, null)
, #{consolRemark}
, #{sysRegId}
, NOW()
, COALESCE(#{consolDepth}::numeric, null)
, #{mUnit}
, #{mUnit2}
, #{mUnit3}
, #{setUnit4}
, #{mUnit5}
, #{setUnit6}
, #{mUnit7}
, #{setUnit8}
, #{mUnit9}
)
DELETE FROM APPTB_CONS01
WHERE BUSINESS_CODE = #{businessCode}
AND HOLE_CODE = #{holeCode}
DELETE FROM APPTB_CONS02
WHERE BUSINESS_CODE = #{businessCode}
AND HOLE_CODE = #{holeCode}
INSERT INTO APPTB_CONS02(
BUSINESS_CODE
, HOLE_CODE
, SAMPLE_CODE
, CONSOL_DEPTH
, CONSOL_P
, CONSOL_SETTLEMENT
, CONSOL_T90
, CONSOL_E
, CONSOL_TWOHA
, CONSOL_AV
, CONSOL_CV
, CONSOL_MV
, CONSOL_K
, CONSOL_RP
, SYS_REG_ID
, SYS_REG_DT
, SET_UNIT
, SET_UNIT2
, SET_UNIT3
, SET_UNIT4
, SET_UNIT5
, SET_UNIT6
, SET_UNIT7
, REMARK
) VALUES (
#{businessCode}
, #{holeCode}
, #{sampleCode}
, coalesce(#{consolDepth}::numeric, null)
, coalesce(#{consolP}::numeric, null)
, coalesce(#{consolSettlement}::numeric, null)
, coalesce(#{consolT90}::numeric, null)
, coalesce(#{consolE}::numeric, null)
, coalesce(#{consolTwoha}::numeric, null)
, coalesce(#{consolAv}::numeric, null)
, coalesce(#{consolCv}::numeric, null)
, coalesce(#{consolMv}::numeric, null)
, coalesce(#{consolK}::numeric, null)
, coalesce(#{consolRp}::numeric, null)
, #{sysRegId}
, NOW()
, #{mUnit}
, #{setUnit2}
, #{mUnit3}
, #{setUnit4}
, #{mUnit5}
, #{setUnit6}
, #{mUnit7}
, #{remark}
)
INSERT INTO APPTB_SUNI01(
BUSINESS_CODE
, HOLE_CODE
, SAMPLE_CODE
, UNCONF_RINGFACTOR
, UNCONF_LOAD_SCALE
, UNCONF_UNDISTURB_HEIGHT
, UNCONF_UNDISTURB_DIA
, UNCONF_UNDISTURB_W
, UNCONF_UNDISTURB_RT
, UNCONF_UNDISTURB_E
, UNCONF_UNDISTURB_S
, UNCONF_UNDISTURB_COMPSTRENGTH
, UNCONF_REMOULD_HEIGHT
, UNCONF_REMOULD_DIA
, UNCONF_REMOULD_W
, UNCONF_REMOULD_RT
, UNCONF_REMOULD_E
, UNCONF_REMOULD_S
, UNCONF_REMOULD_COMPSTRENGTH
, UNCONF_REMARK
, SYS_REG_ID
, SYS_REG_DT
, UNCONF_DEPTH
, SET_UNIT
, SET_UNIT2
, SET_UNIT3
, SET_UNIT4
, SET_UNIT5
, SET_UNIT6
, SET_UNIT7
, SET_UNIT8
, SET_UNIT9
, SET_UNIT10
, SET_UNIT11
, SET_UNIT12
, SET_UNIT13
) VALUES (
#{businessCode}
, #{holeCode}
, #{sampleCode}
, COALESCE(#{unconfRingfactor}::numeric, null)
, COALESCE(#{unconfLoadScale}::numeric, null)
, COALESCE(#{unconfUndisturbHeight}::numeric, null)
, COALESCE(#{unconfUndisturbDia}::numeric, null)
, COALESCE(#{unconfUndisturbW}::numeric, null)
, COALESCE(#{unconfUndisturbRt}::numeric, null)
, COALESCE(#{unconfUndisturbE}::numeric, null)
, COALESCE(#{unconfUndisturbS}::numeric, null)
, COALESCE(#{unconfUndisturbCompstrength}::numeric, null)
, COALESCE(#{unconfRemouldHeight}::numeric, null)
, COALESCE(#{unconfRemouldDia}::numeric, null)
, COALESCE(#{unconfRemouldW}::numeric, null)
, COALESCE(#{unconfRemouldRt}::numeric, null)
, COALESCE(#{unconfRemouldE}::numeric, null)
, COALESCE(#{unconfRemouldS}::numeric, null)
, COALESCE(#{unconfRemouldCompstrength}::numeric, null)
, #{unconfRemark}
, #{sysRegId}
, NOW()
, COALESCE(#{unconfDepth}::numeric, null)
, #{mUnit}
, #{mUnit2}
, #{mUnit3}
, #{setUnit4}
, #{mUnit5}
, #{setUnit6}
, #{mUnit7}
, #{mUnit8}
, #{mUnit9}
, #{setUnit10}
, #{mUnit11}
, #{setUnit12}
, #{mUnit13}
)
DELETE FROM APPTB_SUNI01
WHERE BUSINESS_CODE = #{businessCode}
AND HOLE_CODE = #{holeCode}
INSERT INTO APPTB_STRI01(
BUSINESS_CODE
, HOLE_CODE
, DEPTH
, SAMPLE_CODE
, TRI_TYPEOFTEST
, TRI_TYPEOFCONTROLLEDTEST
, TRI_NOSTRAIN
, TRI_PHI_U
, TRI_CU
, TRI_REMARK
, SYS_REG_ID
, SYS_REG_DT
, SET_UNIT
, SET_UNIT2
, SET_UNIT3
, SET_UNIT4
) VALUES (
#{businessCode}
, #{holeCode}
, coalesce(#{depth}::numeric, null)
, #{sampleCode}
, #{triTypeoftest}
, #{triTypeofcontrolledtest}
, coalesce(#{triNostrain}::numeric, null)
, coalesce(#{triPhiU}::numeric, null)
, coalesce(#{triCu}::numeric, null)
, #{triRemark}
, #{sysRegId}
, NOW()
, #{mUnit}
, #{mUnit2}
, #{setUnit3}
, #{mUnit4}
)
DELETE FROM APPTB_STRI01
WHERE BUSINESS_CODE = #{businessCode}
AND HOLE_CODE = #{holeCode}
DELETE FROM APPTB_STRI02
WHERE
APPTB_STRI02.BUSINESS_CODE = #{businessCode}
AND APPTB_STRI02.HOLE_CODE = #{holeCode}
INSERT INTO APPTB_STRI02(
BUSINESS_CODE
, HOLE_CODE
, SAMPLE_CODE
, TEST_ORDER
, TRI_DEPTH
, TRI_W0
, TRI_RD0
, TRI_S0
, TRI_E0
, TRI_WF
, TRI_RDF
, TRI_SF
, TRI_EF
, TRI_U0
, TRI_SIGMA
, TRI_MAXSIGMA
, TRI_ULTSIGMA
, TRI_D0
, TRI_H0
, TRI_UF
, 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
, SET_UNIT11
, SET_UNIT12
, SET_UNIT13
, SET_UNIT14
, SET_UNIT15
, SET_UNIT16
, SET_UNIT17
) VALUES (
#{businessCode}
, #{holeCode}
, #{sampleCode}
, #{testOrder}
, coalesce(#{triDepth}::numeric, null)
, coalesce(#{triW0}::numeric, null)
, coalesce(#{triRd0}::numeric, null)
, coalesce(#{triS0}::numeric, null)
, coalesce(#{triE0}::numeric, null)
, coalesce(#{triWf}::numeric, null)
, coalesce(#{triRdf}::numeric, null)
, coalesce(#{triSf}::numeric, null)
, coalesce(#{triEf}::numeric, null)
, coalesce(#{triU0}::numeric, null)
, coalesce(#{triSigma}::numeric, null)
, coalesce(#{triMaxsigma}::numeric, null)
, coalesce(#{triUltsigma}::numeric, null)
, coalesce(#{triD0}::numeric, null)
, coalesce(#{triH0}::numeric, null)
, coalesce(#{triUf}::numeric, null)
, #{sysRegId}
, NOW()
, #{mUnit}
, #{setUnit2}
, #{mUnit3}
, #{setUnit4}
, #{mUnit5}
, #{setUnit6}
, #{mUnit7}
, #{setUnit8}
, #{mUnit9}
, #{setUnit10}
, #{mUnit11}
, #{setUnit12}
, #{mUnit13}
, #{mUnit14}
, #{mUnit15}
, #{setUnit16}
, #{mUnit17}
)
INSERT INTO APPTB_RESO01(
BUSINESS_CODE
, HOLE_CODE
, SAMPLE_CODE
, SUB_ORDER
, RC_DEPTH_FROM
, RC_DEPTH_TO
, RC_DENSITY_IN_SITU
, RC_DRY_UNIT_WEIGHT
, RC_MOISTURE_CONTENT
, RC_RESTRAINED_PRESSURE
, RC_REMARK
, 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}
, #{sampleCode}
, #{subOrder}
, coalesce(#{rcDepthFrom}::numeric, null)
, coalesce(#{rcDepthTo}::numeric, null)
, coalesce(#{rcDensityInSitu}::numeric, null)
, coalesce(#{rcDryUnitWeight}::numeric, null)
, coalesce(#{rcMoistureContent}::numeric, null)
, coalesce(#{rcRestrainedPressure}::numeric, null)
, #{rcRemark}
, #{sysRegId}
, NOW()
, #{mUnit}
, #{mUnit2}
, #{setUnit3}
, #{mUnit4}
, #{setUnit5}
, #{mUnit6}
, #{setUnit7}
, #{mUnit8}
)
DELETE FROM APPTB_RESO01
WHERE BUSINESS_CODE = #{businessCode}
AND HOLE_CODE = #{holeCode}
DELETE FROM APPTB_RESO02
WHERE BUSINESS_CODE = #{businessCode}
AND HOLE_CODE = #{holeCode}
AND SAMPLE_CODE = #{sampleCode}
AND SUB_ORDER = #{subOrder}::INT
INSERT INTO APPTB_RESO02(
BUSINESS_CODE
, HOLE_CODE
, SAMPLE_CODE
, RC_SHEAR_STRAIN
, RC_SHEAR_FACTOR
, RC_SHEAR_VELOCITY
, RC_REGULAR_SHEAR_MODULUS
, RC_DAMPED_RATIO
, sys_reg_id
, sys_reg_dt
, sub_order
, DEPTH
, SET_UNIT
, SET_UNIT2
, SET_UNIT3
, REMARK
) VALUES (
#{businessCode}
, #{holeCode}
, #{sampleCode}
, COALESCE(#{rcShearStrain}::numeric, null)
, COALESCE(#{rcShearFactor}::numeric, null)
, COALESCE(#{rcShearVelocity}::numeric, null)
, COALESCE(#{rcRegularShearModulus}::numeric, null)
, COALESCE(#{rcDampedRatio}::numeric, null)
, #{sysRegId}
, NOW()
, #{subOrder}
, COALESCE(#{depth}::numeric, null)
, #{mUnit}
, #{setUnit2}
, #{mUnit3}
, COALESCE(#{remark}, '')
)
INSERT INTO APPTB_RSTRI01(
BUSINESS_CODE
, HOLE_CODE
, SAMPLE_CODE
, SUB_ORDER
, RT_DEPTH_FROM
, RT_DEPTH_TO
, RT_RELATIVE_DENSITY
, RT_DRYUNIT_WEIGHT
, RT_EFFECTIVE_PRESSURE
, RT_CORRECTION_FACTOR
, RT_ARSPRT
, SYS_REG_ID
, SYS_REG_DT
, SET_UNIT
, SET_UNIT2
, SET_UNIT3
, SET_UNIT4
, SET_UNIT5
, SET_UNIT6
) VALUES (
#{businessCode}
, #{holeCode}
, #{sampleCode}
, COALESCE(#{subOrder}::numeric, null)
, COALESCE(#{rtDepthFrom}::numeric, null)
, COALESCE(#{rtDepthTo}::numeric, null)
, COALESCE(#{rtRelativeDensity}::numeric, null)
, COALESCE(#{rtDryunitWeight}::numeric, null)
, COALESCE(#{rtEffectivePressure}::numeric, null)
, COALESCE(#{rtCorrectionFactor}::numeric, null)
, COALESCE(#{rtArsprt}::numeric, null)
, #{sysRegId}
, NOW()
, #{mUnit}
, #{mUnit2}
, #{setUnit3}
, #{mUnit4}
, #{setUnit5}
, #{mUnit6}
)
DELETE FROM APPTB_RSTRI01
WHERE BUSINESS_CODE = #{businessCode}
AND HOLE_CODE = #{holeCode}
AND SAMPLE_CODE = #{sampleCode}
AND SUB_ORDER = #{subOrder}::INT
DELETE FROM APPTB_RSTRI02
WHERE BUSINESS_CODE = #{businessCode}
AND HOLE_CODE = #{holeCode}
AND SAMPLE_CODE = #{sampleCode}
AND SUB_ORDER = #{subOrder}::INT
INSERT INTO APPTB_RSTRI02(
BUSINESS_CODE
, HOLE_CODE
, SAMPLE_CODE
, SUB_ORDER
, TEST_ORDER
, RT_RSPR
, RT_ARSPR
, RT_LNUM
, sys_reg_id
, sys_reg_dt
) VALUES (
#{businessCode}
, #{holeCode}
, #{sampleCode}
, coalesce(#{subOrder}::numeric, null)
, coalesce(#{testOrder}::numeric, null)
, coalesce(#{rtRspr}::numeric, null)
, coalesce(#{rtArspr}::numeric, null)
, coalesce(#{rtLnum}::numeric, null)
, #{sysRegId}
, NOW()
)