<?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="com.javaweb.platform.mapper.SampleInfoMapper"> 
 | 
     
 | 
    <resultMap type="SampleInfo" id="SampleInfoResult"> 
 | 
        <result property="id"    column="id"    /> 
 | 
        <result property="projNo"    column="proj_no"    /> 
 | 
        <result property="holeNo"    column="hole_no"    /> 
 | 
        <result property="sampleNo"    column="sample_no"    /> 
 | 
        <result property="sampleStartDepth"    column="sample_start_depth"    /> 
 | 
        <result property="sampleEndDepth"    column="sample_end_depth"    /> 
 | 
        <result property="soilSampleState"    column="soil_sample_state"    /> 
 | 
        <result property="qualityLevel"    column="quality_level"    /> 
 | 
        <result property="samplingTool"    column="sampling_tool"    /> 
 | 
        <result property="samplingTime"    column="sampling_time"    /> 
 | 
        <result property="samplingProportion"    column="sampling_proportion"    /> 
 | 
        <result property="lithologicalName"    column="lithological_name"    /> 
 | 
        <result property="testType"    column="test_type"    /> 
 | 
        <result property="fillerPercent"    column="filler_percent"    /> 
 | 
        <result property="coreShape"    column="core_shape"    /> 
 | 
        <result property="lengthRangeSmall"    column="length_range_small"    /> 
 | 
        <result property="lengthRangeBig"    column="length_range_big"    /> 
 | 
        <result property="longitude"    column="longitude"    /> 
 | 
        <result property="latitude"    column="latitude"    /> 
 | 
        <result property="locationTime"    column="location_time"    /> 
 | 
        <result property="createTime"    column="create_time"    /> 
 | 
        <result property="updateTime"    column="update_time"    /> 
 | 
        <result property="remarks"    column="remarks"    /> 
 | 
        <result property="descriptor"    column="descriptor"    /> 
 | 
        <result property="driller"    column="driller"    /> 
 | 
        <result property="sampleImg"    column="sample_img"    /> 
 | 
        <result property="sampleVideo"    column="sample_video"    /> 
 | 
        <result property="delFlag"    column="del_flag"    /> 
 | 
        <result property="lithologicaltype"    column="lithologicalType"    /> 
 | 
        <result property="ishistory"    column="isHistory"    /> 
 | 
        <result property="recordNo"    column="record_no"    /> 
 | 
        <result property="recordType"    column="record_type"    /> 
 | 
    </resultMap> 
 | 
  
 | 
    <sql id="selectSampleInfoVo"> 
 | 
        select id, proj_no, hole_no, sample_no, sample_start_depth, sample_end_depth, soil_sample_state, quality_level, sampling_tool, sampling_time, sampling_proportion, lithological_name, test_type, filler_percent, core_shape, length_range_small, length_range_big, longitude, latitude, location_time, create_time, update_time, remarks, descriptor, driller, sample_img, sample_video, del_flag, lithologicalType, isHistory, record_no, record_type from js_sample_info 
 | 
    </sql> 
 | 
  
 | 
    <select id="selectSampleInfoList" parameterType="SampleInfo" resultMap="SampleInfoResult"> 
 | 
        <include refid="selectSampleInfoVo"/> 
 | 
        <where>   
 | 
            <if test="projNo != null  and projNo != ''"> and proj_no = #{projNo}</if> 
 | 
            <if test="holeNo != null  and holeNo != ''"> and hole_no = #{holeNo}</if> 
 | 
            <if test="sampleNo != null  and sampleNo != ''"> and sample_no = #{sampleNo}</if> 
 | 
            <if test="sampleStartDepth != null "> and sample_start_depth = #{sampleStartDepth}</if> 
 | 
            <if test="sampleEndDepth != null "> and sample_end_depth = #{sampleEndDepth}</if> 
 | 
            <if test="soilSampleState != null  and soilSampleState != ''"> and soil_sample_state = #{soilSampleState}</if> 
 | 
            <if test="qualityLevel != null  and qualityLevel != ''"> and quality_level = #{qualityLevel}</if> 
 | 
            <if test="samplingTool != null  and samplingTool != ''"> and sampling_tool = #{samplingTool}</if> 
 | 
            <if test="samplingTime != null "> and sampling_time = #{samplingTime}</if> 
 | 
            <if test="samplingProportion != null  and samplingProportion != ''"> and sampling_proportion = #{samplingProportion}</if> 
 | 
            <if test="lithologicalName != null  and lithologicalName != ''"> and lithological_name like concat('%', #{lithologicalName}, '%')</if> 
 | 
            <if test="testType != null  and testType != ''"> and test_type = #{testType}</if> 
 | 
            <if test="fillerPercent != null "> and filler_percent = #{fillerPercent}</if> 
 | 
            <if test="coreShape != null  and coreShape != ''"> and core_shape = #{coreShape}</if> 
 | 
            <if test="lengthRangeSmall != null  and lengthRangeSmall != ''"> and length_range_small = #{lengthRangeSmall}</if> 
 | 
            <if test="lengthRangeBig != null  and lengthRangeBig != ''"> and length_range_big = #{lengthRangeBig}</if> 
 | 
            <if test="longitude != null "> and longitude = #{longitude}</if> 
 | 
            <if test="latitude != null "> and latitude = #{latitude}</if> 
 | 
            <if test="locationTime != null "> and location_time = #{locationTime}</if> 
 | 
            <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if> 
 | 
            <if test="descriptor != null  and descriptor != ''"> and descriptor = #{descriptor}</if> 
 | 
            <if test="driller != null  and driller != ''"> and driller = #{driller}</if> 
 | 
            <if test="sampleImg != null  and sampleImg != ''"> and sample_img = #{sampleImg}</if> 
 | 
            <if test="sampleVideo != null  and sampleVideo != ''"> and sample_video = #{sampleVideo}</if> 
 | 
            <if test="lithologicaltype != null  and lithologicaltype != ''"> and lithologicalType = #{lithologicaltype}</if> 
 | 
            <if test="ishistory != null  and ishistory != ''"> and isHistory = #{ishistory}</if> 
 | 
            <if test="recordNo != null  and recordNo != ''"> and record_no = #{recordNo}</if> 
 | 
            <if test="recordType != null  and recordType != ''"> and record_type = #{recordType}</if> 
 | 
        </where> 
 | 
    </select> 
 | 
     
 | 
    <select id="selectSampleInfoById" parameterType="String" resultMap="SampleInfoResult"> 
 | 
        <include refid="selectSampleInfoVo"/> 
 | 
        where id = #{id} 
 | 
    </select> 
 | 
         
 | 
    <insert id="insertSampleInfo" parameterType="SampleInfo"> 
 | 
        insert into js_sample_info 
 | 
        <trim prefix="(" suffix=")" suffixOverrides=","> 
 | 
            <if test="id != null  and id != ''">id,</if> 
 | 
            <if test="projNo != null  and projNo != ''">proj_no,</if> 
 | 
            <if test="holeNo != null  and holeNo != ''">hole_no,</if> 
 | 
            <if test="sampleNo != null  and sampleNo != ''">sample_no,</if> 
 | 
            <if test="sampleStartDepth != null ">sample_start_depth,</if> 
 | 
            <if test="sampleEndDepth != null ">sample_end_depth,</if> 
 | 
            <if test="soilSampleState != null  and soilSampleState != ''">soil_sample_state,</if> 
 | 
            <if test="qualityLevel != null  and qualityLevel != ''">quality_level,</if> 
 | 
            <if test="samplingTool != null  and samplingTool != ''">sampling_tool,</if> 
 | 
            <if test="samplingTime != null ">sampling_time,</if> 
 | 
            <if test="samplingProportion != null  and samplingProportion != ''">sampling_proportion,</if> 
 | 
            <if test="lithologicalName != null  and lithologicalName != ''">lithological_name,</if> 
 | 
            <if test="testType != null  and testType != ''">test_type,</if> 
 | 
            <if test="fillerPercent != null ">filler_percent,</if> 
 | 
            <if test="coreShape != null  and coreShape != ''">core_shape,</if> 
 | 
            <if test="lengthRangeSmall != null  and lengthRangeSmall != ''">length_range_small,</if> 
 | 
            <if test="lengthRangeBig != null  and lengthRangeBig != ''">length_range_big,</if> 
 | 
            <if test="longitude != null ">longitude,</if> 
 | 
            <if test="latitude != null ">latitude,</if> 
 | 
            <if test="locationTime != null ">location_time,</if> 
 | 
            <if test="createTime != null ">create_time,</if> 
 | 
            <if test="updateTime != null ">update_time,</if> 
 | 
            <if test="remarks != null  and remarks != ''">remarks,</if> 
 | 
            <if test="descriptor != null  and descriptor != ''">descriptor,</if> 
 | 
            <if test="driller != null  and driller != ''">driller,</if> 
 | 
            <if test="sampleImg != null  and sampleImg != ''">sample_img,</if> 
 | 
            <if test="sampleVideo != null  and sampleVideo != ''">sample_video,</if> 
 | 
            <if test="delFlag != null  and delFlag != ''">del_flag,</if> 
 | 
            <if test="lithologicaltype != null  and lithologicaltype != ''">lithologicalType,</if> 
 | 
            <if test="ishistory != null  and ishistory != ''">isHistory,</if> 
 | 
            <if test="recordNo != null  and recordNo != ''">record_no,</if> 
 | 
            <if test="recordType != null  and recordType != ''">record_type,</if> 
 | 
         </trim> 
 | 
        <trim prefix="values (" suffix=")" suffixOverrides=","> 
 | 
            <if test="id != null  and id != ''">#{id},</if> 
 | 
            <if test="projNo != null  and projNo != ''">#{projNo},</if> 
 | 
            <if test="holeNo != null  and holeNo != ''">#{holeNo},</if> 
 | 
            <if test="sampleNo != null  and sampleNo != ''">#{sampleNo},</if> 
 | 
            <if test="sampleStartDepth != null ">#{sampleStartDepth},</if> 
 | 
            <if test="sampleEndDepth != null ">#{sampleEndDepth},</if> 
 | 
            <if test="soilSampleState != null  and soilSampleState != ''">#{soilSampleState},</if> 
 | 
            <if test="qualityLevel != null  and qualityLevel != ''">#{qualityLevel},</if> 
 | 
            <if test="samplingTool != null  and samplingTool != ''">#{samplingTool},</if> 
 | 
            <if test="samplingTime != null ">#{samplingTime},</if> 
 | 
            <if test="samplingProportion != null  and samplingProportion != ''">#{samplingProportion},</if> 
 | 
            <if test="lithologicalName != null  and lithologicalName != ''">#{lithologicalName},</if> 
 | 
            <if test="testType != null  and testType != ''">#{testType},</if> 
 | 
            <if test="fillerPercent != null ">#{fillerPercent},</if> 
 | 
            <if test="coreShape != null  and coreShape != ''">#{coreShape},</if> 
 | 
            <if test="lengthRangeSmall != null  and lengthRangeSmall != ''">#{lengthRangeSmall},</if> 
 | 
            <if test="lengthRangeBig != null  and lengthRangeBig != ''">#{lengthRangeBig},</if> 
 | 
            <if test="longitude != null ">#{longitude},</if> 
 | 
            <if test="latitude != null ">#{latitude},</if> 
 | 
            <if test="locationTime != null ">#{locationTime},</if> 
 | 
            <if test="createTime != null ">#{createTime},</if> 
 | 
            <if test="updateTime != null ">#{updateTime},</if> 
 | 
            <if test="remarks != null  and remarks != ''">#{remarks},</if> 
 | 
            <if test="descriptor != null  and descriptor != ''">#{descriptor},</if> 
 | 
            <if test="driller != null  and driller != ''">#{driller},</if> 
 | 
            <if test="sampleImg != null  and sampleImg != ''">#{sampleImg},</if> 
 | 
            <if test="sampleVideo != null  and sampleVideo != ''">#{sampleVideo},</if> 
 | 
            <if test="delFlag != null  and delFlag != ''">#{delFlag},</if> 
 | 
            <if test="lithologicaltype != null  and lithologicaltype != ''">#{lithologicaltype},</if> 
 | 
            <if test="ishistory != null  and ishistory != ''">#{ishistory},</if> 
 | 
            <if test="recordNo != null  and recordNo != ''">#{recordNo},</if> 
 | 
            <if test="recordType != null  and recordType != ''">#{recordType},</if> 
 | 
         </trim> 
 | 
    </insert> 
 | 
  
 | 
    <update id="updateSampleInfo" parameterType="SampleInfo"> 
 | 
        update js_sample_info 
 | 
        <trim prefix="SET" suffixOverrides=","> 
 | 
            <if test="projNo != null  and projNo != ''">proj_no = #{projNo},</if> 
 | 
            <if test="holeNo != null  and holeNo != ''">hole_no = #{holeNo},</if> 
 | 
            <if test="sampleNo != null  and sampleNo != ''">sample_no = #{sampleNo},</if> 
 | 
            <if test="sampleStartDepth != null ">sample_start_depth = #{sampleStartDepth},</if> 
 | 
            <if test="sampleEndDepth != null ">sample_end_depth = #{sampleEndDepth},</if> 
 | 
            <if test="soilSampleState != null  and soilSampleState != ''">soil_sample_state = #{soilSampleState},</if> 
 | 
            <if test="qualityLevel != null  and qualityLevel != ''">quality_level = #{qualityLevel},</if> 
 | 
            <if test="samplingTool != null  and samplingTool != ''">sampling_tool = #{samplingTool},</if> 
 | 
            <if test="samplingTime != null ">sampling_time = #{samplingTime},</if> 
 | 
            <if test="samplingProportion != null  and samplingProportion != ''">sampling_proportion = #{samplingProportion},</if> 
 | 
            <if test="lithologicalName != null  and lithologicalName != ''">lithological_name = #{lithologicalName},</if> 
 | 
            <if test="testType != null  and testType != ''">test_type = #{testType},</if> 
 | 
            <if test="fillerPercent != null ">filler_percent = #{fillerPercent},</if> 
 | 
            <if test="coreShape != null  and coreShape != ''">core_shape = #{coreShape},</if> 
 | 
            <if test="lengthRangeSmall != null  and lengthRangeSmall != ''">length_range_small = #{lengthRangeSmall},</if> 
 | 
            <if test="lengthRangeBig != null  and lengthRangeBig != ''">length_range_big = #{lengthRangeBig},</if> 
 | 
            <if test="longitude != null ">longitude = #{longitude},</if> 
 | 
            <if test="latitude != null ">latitude = #{latitude},</if> 
 | 
            <if test="locationTime != null ">location_time = #{locationTime},</if> 
 | 
            <if test="createTime != null ">create_time = #{createTime},</if> 
 | 
            <if test="updateTime != null ">update_time = #{updateTime},</if> 
 | 
            <if test="remarks != null  and remarks != ''">remarks = #{remarks},</if> 
 | 
            <if test="descriptor != null  and descriptor != ''">descriptor = #{descriptor},</if> 
 | 
            <if test="driller != null  and driller != ''">driller = #{driller},</if> 
 | 
            <if test="sampleImg != null  and sampleImg != ''">sample_img = #{sampleImg},</if> 
 | 
            <if test="sampleVideo != null  and sampleVideo != ''">sample_video = #{sampleVideo},</if> 
 | 
            <if test="delFlag != null  and delFlag != ''">del_flag = #{delFlag},</if> 
 | 
            <if test="lithologicaltype != null  and lithologicaltype != ''">lithologicalType = #{lithologicaltype},</if> 
 | 
            <if test="ishistory != null  and ishistory != ''">isHistory = #{ishistory},</if> 
 | 
            <if test="recordNo != null  and recordNo != ''">record_no = #{recordNo},</if> 
 | 
            <if test="recordType != null  and recordType != ''">record_type = #{recordType},</if> 
 | 
        </trim> 
 | 
        where id = #{id} 
 | 
    </update> 
 | 
  
 | 
    <delete id="deleteSampleInfoById" parameterType="String"> 
 | 
        delete from js_sample_info where id = #{id} 
 | 
    </delete> 
 | 
  
 | 
    <delete id="deleteSampleInfoByIds" parameterType="String"> 
 | 
        delete from js_sample_info where id in  
 | 
        <foreach item="id" collection="array" open="(" separator="," close=")"> 
 | 
            #{id} 
 | 
        </foreach> 
 | 
    </delete> 
 | 
     
 | 
</mapper> 
 |