INSERT INTO APPTB_RUNI01( BUSINESS_CODE , HOLE_CODE , SAMPLE_CODE , RUNI_DEPTH_FROM , RUNI_DEPTH_TO , RUNI_DIA , RUNI_LENGTH , RUNI_GS , RUNI_WAVE_P , RUNI_WAVE_S , RUNI_ABS , RUNI_UNI_STRENGTH , RUNI_YOUNG , RUNI_POISSON , RUNI_REMARK , SYS_REG_ID , SYS_REG_DT , SET_UNIT , SET_UNIT2 , SET_UNIT3 , SET_UNIT4 , SET_UNIT5 , SET_UNIT6 ) VALUES ( #{businessCode} , #{holeCode} , #{sampleCode} , coalesce(#{runiDepthFrom}::numeric, null) , coalesce(#{runiDepthTo}::numeric, null) , coalesce(#{runiDia}::numeric, null) , coalesce(#{runiLength}::numeric, null) , coalesce(#{runiGs}::numeric, null) , coalesce(#{runiWaveP}::numeric, null) , coalesce(#{runiWaveS}::numeric, null) , coalesce(#{runiAbs}::numeric, null) , coalesce(#{runiUniStrength}::numeric, null) , coalesce(#{runiYoung}::numeric, null) , coalesce(#{runiPoisson}::numeric, null) , coalesce(#{runiRemark}, '') , #{sysRegId} , NOW() , #{mUnit} , #{mUnit2} , #{setUnit3} , #{mUnit4} , #{setUnit5} , #{mUnit6} ) DELETE FROM APPTB_RUNI01 WHERE BUSINESS_CODE = #{businessCode} AND HOLE_CODE = #{holeCode} INSERT INTO APPTB_RTRI01( BUSINESS_CODE , HOLE_CODE , SAMPLE_CODE , rtri_depth_from , rtri_depth_to , rtri_phi , rtri_c , rtri_tensilestrength , rtri_50_dia , rtri_50_length , rtri_50_confpres , rtri_50_maxstrength , rtri_100_dia , rtri_100_length , rtri_100_confpres , rtri_100_maxstrength , rtri_150_dia , rtri_150_length , rtri_150_confpres , rtri_150_maxstrength , RTRI_REMARK , 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 , SET_UNIT18 , SET_UNIT19 , SET_UNIT20 , SET_UNIT21 ) VALUES ( #{businessCode} , #{holeCode} , #{sampleCode} , coalesce(#{rtriDepthFrom}::numeric, null) , coalesce(#{rtriDepthTo}::numeric, null) , coalesce(#{rtriPhi}::numeric, null) , coalesce(#{rtriC}::numeric, null) , coalesce(#{rtriTensilestrength}::numeric, null) , coalesce(#{rtri50Dia}::numeric, null) , coalesce(#{rtri50Length}::numeric, null) , coalesce(#{rtri50Confpres}::numeric, null) , coalesce(#{rtri50Maxstrength}::numeric, null) , coalesce(#{rtri100Dia}::numeric, null) , coalesce(#{rtri100Length}::numeric, null) , coalesce(#{rtri100Confpres}::numeric, null) , coalesce(#{rtri100Maxstrength}::numeric, null) , coalesce(#{rtri150Dia}::numeric, null) , coalesce(#{rtri150Length}::numeric, null) , coalesce(#{rtri150Confpres}::numeric, null) , coalesce(#{rtri150Maxstrength}::numeric, null) , #{rtriRemark} , #{sysRegId} , NOW() , #{mUnit} , #{mUnit2} , #{setUnit3} , #{mUnit4} , #{setUnit5} , #{mUnit6} , #{mUnit7} , #{setUnit8} , #{mUnit9} , #{setUnit10} , #{mUnit11} , #{mUnit12} , #{setUnit13} , #{mUnit14} , #{setUnit15} , #{mUnit16} , #{mUnit17} , #{setUnit18} , #{mUnit19} , #{setUnit20} , #{mUnit21} ) DELETE FROM APPTB_RTRI01 WHERE BUSINESS_CODE = #{businessCode} AND HOLE_CODE = #{holeCode} DELETE FROM APPTB_POLO01 WHERE BUSINESS_CODE = #{businessCode} AND HOLE_CODE = #{holeCode} INSERT INTO APPTB_POLO01( BUSINESS_CODE , HOLE_CODE , SAMPLE_CODE , depth_from , depth_to , dia , length , tesilestrength , pointstrength , uniaxial , 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} , coalesce(#{depthFrom}::numeric, null) , coalesce(#{depthTo}::numeric, null) , coalesce(#{dia}::numeric, null) , coalesce(#{length}::numeric, null) , coalesce(#{tesilestrength}::numeric, null) , coalesce(#{pointstrength}::numeric, null) , coalesce(#{uniaxial}::numeric, null) , #{remark} , #{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') ) DELETE FROM APPTB_JOSH01 WHERE BUSINESS_CODE = #{businessCode} AND HOLE_CODE = #{holeCode} INSERT INTO APPTB_JOSH01( BUSINESS_CODE , HOLE_CODE , SAMPLE_CODE , RJOINT_DEPTH_FROM , RJOINT_DEPTH_TO , RJOINT_PHI , RJOINT_PHI_MAX , RJOINT_C , RJOINT_C_MAX , RJOINT_NORAML_STRESS , RJOINT_SHEAR_STRESS , RJOINT_JCS , RJOINT_REMARK , 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 ) VALUES ( #{businessCode} , #{holeCode} , #{sampleCode} , coalesce(#{rjointDepthFrom}::numeric, null) , coalesce(#{rjointDepthTo}::numeric, null) , coalesce(#{rjointPhi}::numeric, null) , coalesce(#{rjointPhiMax}::numeric, null) , coalesce(#{rjointC}::numeric, null) , coalesce(#{rjointCMax}::numeric, null) , coalesce(#{rjointNoramlStress}::numeric, null) , coalesce(#{rjointShearStress}::numeric, null) , coalesce(#{rjointJcs}::numeric, null) , #{rjointRemark} , #{sysRegId} , NOW() , #{mUnit} , #{mUnit2} , #{setUnit3} , #{mUnit4} , #{setUnit5} , #{mUnit6} , #{setUnit7} , #{mUnit8} , #{setUnit9} , #{mUnit10} , #{setUnit11} , #{mUnit12} ) INSERT INTO APPTB_RESO03( BUSINESS_CODE , HOLE_CODE , RC_SEQ , 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} , #{rcSeq} , 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_RESO03 WHERE BUSINESS_CODE = #{businessCode} AND HOLE_CODE = #{holeCode} UPDATE APPTB_RESO04 SET RC_SEQ = #{rcSeq} WHERE RC_SEQ = #{prevRcSeq} INSERT INTO APPTB_RESO04( BUSINESS_CODE , HOLE_CODE , RC_SEQ , RC_SHEAR_STRAIN , RC_SHEAR_FACTOR , RC_SHEAR_VELOCITY , RC_REGULAR_SHEAR_MODULUS , RC_DAMPED_RATIO , SYS_REG_ID , SYS_REG_DT , REMARK , SET_UNIT , SET_UNIT2 ) VALUES ( #{businessCode} , #{holeCode} , #{rcSeq} , coalesce(#{rcShearStrain}::numeric, null) , coalesce(#{rcShearFactor}::numeric, null) , coalesce(#{rcShearVelocity}::numeric, null) , coalesce(#{rcRegularShearModulus}::numeric, null) , coalesce(#{rcDampedRatio}::numeric, null) , #{sysRegId} , NOW() , #{remark} , #{setUnit} , #{mUnit2} ) DELETE FROM APPTB_RESO04 WHERE 1=1 INSERT INTO APPTB_RRTRI01( BUSINESS_CODE , HOLE_CODE , RT_SEQ , 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} , #{rtSeq} , 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_RRTRI01 WHERE BUSINESS_CODE = #{businessCode} AND HOLE_CODE = #{holeCode} UPDATE APPTB_RRTRI02 SET RT_SEQ = #{rtSeq} WHERE RT_SEQ = #{prevRtSeq} INSERT INTO APPTB_RRTRI02( BUSINESS_CODE , HOLE_CODE , RT_SEQ , TEST_ORDER , RT_RSPR , RT_ARSPR , RT_LNUM , SYS_REG_ID , SYS_REG_DT ) VALUES ( #{businessCode} , #{holeCode} , #{rtSeq} , #{testOrder} , coalesce(#{rtRspr}::numeric, null) , coalesce(#{rtArspr}::numeric, null) , coalesce(#{rtLnum}::numeric, null) , #{sysRegId} , NOW() ) DELETE FROM APPTB_RRTRI02 WHERE 1=1