<?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.HoleRecordMapper">
|
|
<resultMap type="HoleRecord" id="HoleRecordResult">
|
<result property="id" column="id" />
|
<result property="recordNo" column="record_no" />
|
<result property="projectId" column="project_id" />
|
<result property="drillId" column="drill_id" />
|
<result property="recordType" column="record_type" />
|
<result property="startDepth" column="start_depth" />
|
<result property="endDepth" column="end_depth" />
|
<result property="drillMethod" column="drill_method" />
|
<result property="protectMethod" column="protect_method" />
|
<result property="drillAperture" column="drill_aperture" />
|
<result property="soilQuality" column="soil_quality" />
|
<result property="samplingMethod" column="sampling_method" />
|
<result property="rockType" column="rock_type" />
|
<result property="rockName" column="rock_name" />
|
<result property="color" column="color" />
|
<result property="particleShape" column="particle_shape" />
|
<result property="particleArrange" column="particle_arrange" />
|
<result property="particleGrade" column="particle_grade" />
|
<result property="humidity" column="humidity" />
|
<result property="density" column="density" />
|
<result property="uniformity" column="uniformity" />
|
<result property="state" column="state" />
|
<result property="inclusions" column="inclusions" />
|
<result property="generalSmallParticle" column="general_small_particle" />
|
<result property="generalBigParticle" column="general_big_particle" />
|
<result property="largerSmallParticle" column="larger_small_particle" />
|
<result property="largerBigParticle" column="larger_big_particle" />
|
<result property="biggestParticle" column="biggest_particle" />
|
<result property="mainIngredient" column="main_ingredient" />
|
<result property="secondIngredient" column="second_ingredient" />
|
<result property="hardDegree" column="hard_degree" />
|
<result property="completeDegree" column="complete_degree" />
|
<result property="digProperty" column="dig_property" />
|
<result property="drillLength" column="drill_length" />
|
<result property="advanceStartDepth" column="advance_start_depth" />
|
<result property="firstStartDepth" column="first_start_depth" />
|
<result property="secondStartDepth" column="second_start_depth" />
|
<result property="thirdStartDepth" column="third_start_depth" />
|
<result property="advanceEndDepth" column="advance_end_depth" />
|
<result property="firstEndDepth" column="first_end_depth" />
|
<result property="secondEndDepth" column="second_end_depth" />
|
<result property="thirdEndDepth" column="third_end_depth" />
|
<result property="advanceHammerNumber" column="advance_hammer_number" />
|
<result property="firstHammerNumber" column="first_hammer_number" />
|
<result property="secondHammerNumber" column="second_hammer_number" />
|
<result property="thirdHammerNumber" column="third_hammer_number" />
|
</resultMap>
|
|
<sql id="selectHoleRecordVo">
|
select id, record_no, project_id, drill_id, record_type, start_depth, end_depth, drill_method, protect_method, drill_aperture, soil_quality, sampling_method, rock_type, rock_name, color, particle_shape, particle_arrange, particle_grade, humidity, density, uniformity, state, inclusions, general_small_particle, general_big_particle, larger_small_particle, larger_big_particle, biggest_particle, main_ingredient, second_ingredient, hard_degree, complete_degree, dig_property, drill_length, advance_start_depth, first_start_depth, second_start_depth, third_start_depth, advance_end_depth, first_end_depth, second_end_depth, third_end_depth, advance_hammer_number, first_hammer_number, second_hammer_number, third_hammer_number from js_hole_record
|
</sql>
|
|
<select id="selectHoleRecordList" parameterType="HoleRecord" resultMap="HoleRecordResult">
|
<include refid="selectHoleRecordVo"/>
|
<where>
|
<if test="recordNo != null and recordNo != ''"> and record_no = #{recordNo}</if>
|
<if test="projectId != null and projectId != ''"> and project_id = #{projectId}</if>
|
<if test="drillId != null and drillId != ''"> and drill_id = #{drillId}</if>
|
<if test="recordType != null and recordType != ''"> and record_type = #{recordType}</if>
|
<if test="startDepth != null "> and start_depth = #{startDepth}</if>
|
<if test="endDepth != null "> and end_depth = #{endDepth}</if>
|
<if test="drillMethod != null and drillMethod != ''"> and drill_method = #{drillMethod}</if>
|
<if test="protectMethod != null and protectMethod != ''"> and protect_method = #{protectMethod}</if>
|
<if test="drillAperture != null "> and drill_aperture = #{drillAperture}</if>
|
<if test="soilQuality != null and soilQuality != ''"> and soil_quality = #{soilQuality}</if>
|
<if test="samplingMethod != null and samplingMethod != ''"> and sampling_method = #{samplingMethod}</if>
|
<if test="rockType != null and rockType != ''"> and rock_type = #{rockType}</if>
|
<if test="rockName != null and rockName != ''"> and rock_name like concat('%', #{rockName}, '%')</if>
|
<if test="color != null and color != ''"> and color = #{color}</if>
|
<if test="particleShape != null and particleShape != ''"> and particle_shape = #{particleShape}</if>
|
<if test="particleArrange != null and particleArrange != ''"> and particle_arrange = #{particleArrange}</if>
|
<if test="particleGrade != null and particleGrade != ''"> and particle_grade = #{particleGrade}</if>
|
<if test="humidity != null and humidity != ''"> and humidity = #{humidity}</if>
|
<if test="density != null and density != ''"> and density = #{density}</if>
|
<if test="uniformity != null and uniformity != ''"> and uniformity = #{uniformity}</if>
|
<if test="state != null and state != ''"> and state = #{state}</if>
|
<if test="inclusions != null and inclusions != ''"> and inclusions = #{inclusions}</if>
|
<if test="generalSmallParticle != null and generalSmallParticle != ''"> and general_small_particle = #{generalSmallParticle}</if>
|
<if test="generalBigParticle != null and generalBigParticle != ''"> and general_big_particle = #{generalBigParticle}</if>
|
<if test="largerSmallParticle != null and largerSmallParticle != ''"> and larger_small_particle = #{largerSmallParticle}</if>
|
<if test="largerBigParticle != null and largerBigParticle != ''"> and larger_big_particle = #{largerBigParticle}</if>
|
<if test="biggestParticle != null and biggestParticle != ''"> and biggest_particle = #{biggestParticle}</if>
|
<if test="mainIngredient != null and mainIngredient != ''"> and main_ingredient = #{mainIngredient}</if>
|
<if test="secondIngredient != null and secondIngredient != ''"> and second_ingredient = #{secondIngredient}</if>
|
<if test="hardDegree != null and hardDegree != ''"> and hard_degree = #{hardDegree}</if>
|
<if test="completeDegree != null and completeDegree != ''"> and complete_degree = #{completeDegree}</if>
|
<if test="digProperty != null and digProperty != ''"> and dig_property = #{digProperty}</if>
|
<if test="drillLength != null "> and drill_length = #{drillLength}</if>
|
<if test="advanceStartDepth != null "> and advance_start_depth = #{advanceStartDepth}</if>
|
<if test="firstStartDepth != null "> and first_start_depth = #{firstStartDepth}</if>
|
<if test="secondStartDepth != null "> and second_start_depth = #{secondStartDepth}</if>
|
<if test="thirdStartDepth != null "> and third_start_depth = #{thirdStartDepth}</if>
|
<if test="advanceEndDepth != null "> and advance_end_depth = #{advanceEndDepth}</if>
|
<if test="firstEndDepth != null "> and first_end_depth = #{firstEndDepth}</if>
|
<if test="secondEndDepth != null "> and second_end_depth = #{secondEndDepth}</if>
|
<if test="thirdEndDepth != null "> and third_end_depth = #{thirdEndDepth}</if>
|
<if test="advanceHammerNumber != null "> and advance_hammer_number = #{advanceHammerNumber}</if>
|
<if test="firstHammerNumber != null "> and first_hammer_number = #{firstHammerNumber}</if>
|
<if test="secondHammerNumber != null "> and second_hammer_number = #{secondHammerNumber}</if>
|
<if test="thirdHammerNumber != null "> and third_hammer_number = #{thirdHammerNumber}</if>
|
</where>
|
</select>
|
|
<select id="selectHoleRecordById" parameterType="String" resultMap="HoleRecordResult">
|
<include refid="selectHoleRecordVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertHoleRecord" parameterType="HoleRecord">
|
insert into js_hole_record
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null and id != ''">id,</if>
|
<if test="recordNo != null and recordNo != ''">record_no,</if>
|
<if test="projectId != null and projectId != ''">project_id,</if>
|
<if test="drillId != null and drillId != ''">drill_id,</if>
|
<if test="recordType != null and recordType != ''">record_type,</if>
|
<if test="startDepth != null ">start_depth,</if>
|
<if test="endDepth != null ">end_depth,</if>
|
<if test="drillMethod != null and drillMethod != ''">drill_method,</if>
|
<if test="protectMethod != null and protectMethod != ''">protect_method,</if>
|
<if test="drillAperture != null ">drill_aperture,</if>
|
<if test="soilQuality != null and soilQuality != ''">soil_quality,</if>
|
<if test="samplingMethod != null and samplingMethod != ''">sampling_method,</if>
|
<if test="rockType != null and rockType != ''">rock_type,</if>
|
<if test="rockName != null and rockName != ''">rock_name,</if>
|
<if test="color != null and color != ''">color,</if>
|
<if test="particleShape != null and particleShape != ''">particle_shape,</if>
|
<if test="particleArrange != null and particleArrange != ''">particle_arrange,</if>
|
<if test="particleGrade != null and particleGrade != ''">particle_grade,</if>
|
<if test="humidity != null and humidity != ''">humidity,</if>
|
<if test="density != null and density != ''">density,</if>
|
<if test="uniformity != null and uniformity != ''">uniformity,</if>
|
<if test="state != null and state != ''">state,</if>
|
<if test="inclusions != null and inclusions != ''">inclusions,</if>
|
<if test="generalSmallParticle != null and generalSmallParticle != ''">general_small_particle,</if>
|
<if test="generalBigParticle != null and generalBigParticle != ''">general_big_particle,</if>
|
<if test="largerSmallParticle != null and largerSmallParticle != ''">larger_small_particle,</if>
|
<if test="largerBigParticle != null and largerBigParticle != ''">larger_big_particle,</if>
|
<if test="biggestParticle != null and biggestParticle != ''">biggest_particle,</if>
|
<if test="mainIngredient != null and mainIngredient != ''">main_ingredient,</if>
|
<if test="secondIngredient != null and secondIngredient != ''">second_ingredient,</if>
|
<if test="hardDegree != null and hardDegree != ''">hard_degree,</if>
|
<if test="completeDegree != null and completeDegree != ''">complete_degree,</if>
|
<if test="digProperty != null and digProperty != ''">dig_property,</if>
|
<if test="drillLength != null ">drill_length,</if>
|
<if test="advanceStartDepth != null ">advance_start_depth,</if>
|
<if test="firstStartDepth != null ">first_start_depth,</if>
|
<if test="secondStartDepth != null ">second_start_depth,</if>
|
<if test="thirdStartDepth != null ">third_start_depth,</if>
|
<if test="advanceEndDepth != null ">advance_end_depth,</if>
|
<if test="firstEndDepth != null ">first_end_depth,</if>
|
<if test="secondEndDepth != null ">second_end_depth,</if>
|
<if test="thirdEndDepth != null ">third_end_depth,</if>
|
<if test="advanceHammerNumber != null ">advance_hammer_number,</if>
|
<if test="firstHammerNumber != null ">first_hammer_number,</if>
|
<if test="secondHammerNumber != null ">second_hammer_number,</if>
|
<if test="thirdHammerNumber != null ">third_hammer_number,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="id != null and id != ''">#{id},</if>
|
<if test="recordNo != null and recordNo != ''">#{recordNo},</if>
|
<if test="projectId != null and projectId != ''">#{projectId},</if>
|
<if test="drillId != null and drillId != ''">#{drillId},</if>
|
<if test="recordType != null and recordType != ''">#{recordType},</if>
|
<if test="startDepth != null ">#{startDepth},</if>
|
<if test="endDepth != null ">#{endDepth},</if>
|
<if test="drillMethod != null and drillMethod != ''">#{drillMethod},</if>
|
<if test="protectMethod != null and protectMethod != ''">#{protectMethod},</if>
|
<if test="drillAperture != null ">#{drillAperture},</if>
|
<if test="soilQuality != null and soilQuality != ''">#{soilQuality},</if>
|
<if test="samplingMethod != null and samplingMethod != ''">#{samplingMethod},</if>
|
<if test="rockType != null and rockType != ''">#{rockType},</if>
|
<if test="rockName != null and rockName != ''">#{rockName},</if>
|
<if test="color != null and color != ''">#{color},</if>
|
<if test="particleShape != null and particleShape != ''">#{particleShape},</if>
|
<if test="particleArrange != null and particleArrange != ''">#{particleArrange},</if>
|
<if test="particleGrade != null and particleGrade != ''">#{particleGrade},</if>
|
<if test="humidity != null and humidity != ''">#{humidity},</if>
|
<if test="density != null and density != ''">#{density},</if>
|
<if test="uniformity != null and uniformity != ''">#{uniformity},</if>
|
<if test="state != null and state != ''">#{state},</if>
|
<if test="inclusions != null and inclusions != ''">#{inclusions},</if>
|
<if test="generalSmallParticle != null and generalSmallParticle != ''">#{generalSmallParticle},</if>
|
<if test="generalBigParticle != null and generalBigParticle != ''">#{generalBigParticle},</if>
|
<if test="largerSmallParticle != null and largerSmallParticle != ''">#{largerSmallParticle},</if>
|
<if test="largerBigParticle != null and largerBigParticle != ''">#{largerBigParticle},</if>
|
<if test="biggestParticle != null and biggestParticle != ''">#{biggestParticle},</if>
|
<if test="mainIngredient != null and mainIngredient != ''">#{mainIngredient},</if>
|
<if test="secondIngredient != null and secondIngredient != ''">#{secondIngredient},</if>
|
<if test="hardDegree != null and hardDegree != ''">#{hardDegree},</if>
|
<if test="completeDegree != null and completeDegree != ''">#{completeDegree},</if>
|
<if test="digProperty != null and digProperty != ''">#{digProperty},</if>
|
<if test="drillLength != null ">#{drillLength},</if>
|
<if test="advanceStartDepth != null ">#{advanceStartDepth},</if>
|
<if test="firstStartDepth != null ">#{firstStartDepth},</if>
|
<if test="secondStartDepth != null ">#{secondStartDepth},</if>
|
<if test="thirdStartDepth != null ">#{thirdStartDepth},</if>
|
<if test="advanceEndDepth != null ">#{advanceEndDepth},</if>
|
<if test="firstEndDepth != null ">#{firstEndDepth},</if>
|
<if test="secondEndDepth != null ">#{secondEndDepth},</if>
|
<if test="thirdEndDepth != null ">#{thirdEndDepth},</if>
|
<if test="advanceHammerNumber != null ">#{advanceHammerNumber},</if>
|
<if test="firstHammerNumber != null ">#{firstHammerNumber},</if>
|
<if test="secondHammerNumber != null ">#{secondHammerNumber},</if>
|
<if test="thirdHammerNumber != null ">#{thirdHammerNumber},</if>
|
</trim>
|
</insert>
|
|
<update id="updateHoleRecord" parameterType="HoleRecord">
|
update js_hole_record
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="recordNo != null and recordNo != ''">record_no = #{recordNo},</if>
|
<if test="projectId != null and projectId != ''">project_id = #{projectId},</if>
|
<if test="drillId != null and drillId != ''">drill_id = #{drillId},</if>
|
<if test="recordType != null and recordType != ''">record_type = #{recordType},</if>
|
<if test="startDepth != null ">start_depth = #{startDepth},</if>
|
<if test="endDepth != null ">end_depth = #{endDepth},</if>
|
<if test="drillMethod != null and drillMethod != ''">drill_method = #{drillMethod},</if>
|
<if test="protectMethod != null and protectMethod != ''">protect_method = #{protectMethod},</if>
|
<if test="drillAperture != null ">drill_aperture = #{drillAperture},</if>
|
<if test="soilQuality != null and soilQuality != ''">soil_quality = #{soilQuality},</if>
|
<if test="samplingMethod != null and samplingMethod != ''">sampling_method = #{samplingMethod},</if>
|
<if test="rockType != null and rockType != ''">rock_type = #{rockType},</if>
|
<if test="rockName != null and rockName != ''">rock_name = #{rockName},</if>
|
<if test="color != null and color != ''">color = #{color},</if>
|
<if test="particleShape != null and particleShape != ''">particle_shape = #{particleShape},</if>
|
<if test="particleArrange != null and particleArrange != ''">particle_arrange = #{particleArrange},</if>
|
<if test="particleGrade != null and particleGrade != ''">particle_grade = #{particleGrade},</if>
|
<if test="humidity != null and humidity != ''">humidity = #{humidity},</if>
|
<if test="density != null and density != ''">density = #{density},</if>
|
<if test="uniformity != null and uniformity != ''">uniformity = #{uniformity},</if>
|
<if test="state != null and state != ''">state = #{state},</if>
|
<if test="inclusions != null and inclusions != ''">inclusions = #{inclusions},</if>
|
<if test="generalSmallParticle != null and generalSmallParticle != ''">general_small_particle = #{generalSmallParticle},</if>
|
<if test="generalBigParticle != null and generalBigParticle != ''">general_big_particle = #{generalBigParticle},</if>
|
<if test="largerSmallParticle != null and largerSmallParticle != ''">larger_small_particle = #{largerSmallParticle},</if>
|
<if test="largerBigParticle != null and largerBigParticle != ''">larger_big_particle = #{largerBigParticle},</if>
|
<if test="biggestParticle != null and biggestParticle != ''">biggest_particle = #{biggestParticle},</if>
|
<if test="mainIngredient != null and mainIngredient != ''">main_ingredient = #{mainIngredient},</if>
|
<if test="secondIngredient != null and secondIngredient != ''">second_ingredient = #{secondIngredient},</if>
|
<if test="hardDegree != null and hardDegree != ''">hard_degree = #{hardDegree},</if>
|
<if test="completeDegree != null and completeDegree != ''">complete_degree = #{completeDegree},</if>
|
<if test="digProperty != null and digProperty != ''">dig_property = #{digProperty},</if>
|
<if test="drillLength != null ">drill_length = #{drillLength},</if>
|
<if test="advanceStartDepth != null ">advance_start_depth = #{advanceStartDepth},</if>
|
<if test="firstStartDepth != null ">first_start_depth = #{firstStartDepth},</if>
|
<if test="secondStartDepth != null ">second_start_depth = #{secondStartDepth},</if>
|
<if test="thirdStartDepth != null ">third_start_depth = #{thirdStartDepth},</if>
|
<if test="advanceEndDepth != null ">advance_end_depth = #{advanceEndDepth},</if>
|
<if test="firstEndDepth != null ">first_end_depth = #{firstEndDepth},</if>
|
<if test="secondEndDepth != null ">second_end_depth = #{secondEndDepth},</if>
|
<if test="thirdEndDepth != null ">third_end_depth = #{thirdEndDepth},</if>
|
<if test="advanceHammerNumber != null ">advance_hammer_number = #{advanceHammerNumber},</if>
|
<if test="firstHammerNumber != null ">first_hammer_number = #{firstHammerNumber},</if>
|
<if test="secondHammerNumber != null ">second_hammer_number = #{secondHammerNumber},</if>
|
<if test="thirdHammerNumber != null ">third_hammer_number = #{thirdHammerNumber},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteHoleRecordById" parameterType="String">
|
delete from js_hole_record where id = #{id}
|
</delete>
|
|
<delete id="deleteHoleRecordByIds" parameterType="String">
|
delete from js_hole_record where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
|
</mapper>
|