<?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.huashe.park.core.mapper.MachineProcessResultMapper">
    <resultMap type="MachineProcessResult" id="MachineProcessResultResult">
        <result property="id" column="id"/>
        <result property="consType" column="cons_type"/>
        <result property="dataVersion" column="data_version"/>
        <result property="dataTime" column="data_time"/>
        <result property="pileId" column="pile_id"/>
        <result property="designId" column="design_id"/>
        <result property="machineId" column="machine_id"/>
        <result property="designX" column="design_x"/>
        <result property="designY" column="design_y"/>
        <result property="realX" column="real_x"/>
        <result property="realY" column="real_y"/>
        <result property="latitude" column="latitude"/>
        <result property="longitude" column="longitude"/>
        <result property="pileLength" column="pile_length"/>
        <result property="avgSpeed" column="avg_speed"/>
        <result property="avgCurrent" column="avg_current"/>
        <result property="holdCurrent" column="hold_current"/>
        <result property="verticalDeviation" column="vertical_deviation"/>
        <result property="sprayVolume" column="spray_volume"/>
        <result property="startTime" column="start_time"/>
        <result property="endTime" column="end_time"/>
        <result property="resultEvaluation" column="result_evaluation"/>
        <result property="startHeight" column="start_height"/>
        <result property="inDepth" column="in_depth"/>
        <result property="effectiveDown" column="effective_down"/>
        <result property="effectiveLength" column="effective_length"/>
        <result property="pileNumber" column="pile_number"/>
        <result property="avgSprayPressure" column="avg_spray_pressure"/>
        <result property="avgSpraySpeed" column="avg_spray_speed"/>
        <result property="designLength" column="design_length"/>
        <result property="avgUpSpeed" column="avg_up_speed"/>
        <result property="drillTotalNumber" column="drill_total_number"/>
        <result property="currentMechanicalType" column="current_mechanical_type"/>
        <result property="sendTotalNumber" column="send_total_number"/>
        <result property="sendTotalTime" column="send_total_time"/>
        <result property="totalHammerNumber" column="total_hammer_number"/>
        <result property="uuid" column="uuid"/>
        <result property="dt" column="dt"/>
        <result property="createTime" column="create_time"/>
        <result property="recordTime" column="record_time"/>
        <result property="sendStartTime" column="send_start_time"/>
        <result property="sendEndTime" column="send_end_time"/>
        <result property="pullingStartTime" column="pulling_start_time"/>
        <result property="pullingEndTime" column="pulling_end_time"/>
        <result property="tenantId" column="tenant_id"/>
    </resultMap>
    <sql id="selectMachineProcessResultVo">
        select id,
               cons_type,
               data_version,
               data_time,
               pile_id,
               design_id,
               machine_id,
               design_x,
               design_y,
               real_x,
               real_y,
               latitude,
               longitude,
               pile_length,
               avg_speed,
               avg_current,
               hold_current,
               vertical_deviation,
               spray_volume,
               start_time,
               end_time,
               result_evaluation,
               start_height,
               in_depth,
               effective_down,
               effective_length,
               pile_number,
               avg_spray_pressure,
               avg_spray_speed,
               design_length,
               avg_up_speed,
               drill_total_number,
               current_mechanical_type,
               send_total_number,
               send_total_time,
               send_start_time,
               send_end_time,
               pulling_start_time,
               pulling_end_time,
               total_hammer_number,
               uuid,
               dt,
               create_time,
               record_time,
               tenant_id
        from cons_machine_process_result
    </sql>

    <select id="selectMachineProcessResultList" parameterType="MachineProcessResult"
            resultMap="MachineProcessResultResult">
        <include refid="selectMachineProcessResultVo"/>
        <where>
            <if test="designY != null ">and design_y = #{designY}</if>
            <if test="realX != null ">and real_x = #{realX}</if>
            <if test="realY != null ">and real_y = #{realY}</if>
            <if test="latitude != null ">and latitude = #{latitude}</if>
            <if test="longitude != null ">and longitude = #{longitude}</if>
            <if test="pileLength != null ">and pile_length = #{pileLength}</if>
            <if test="avgSpeed != null ">and avg_speed = #{avgSpeed}</if>
            <if test="avgCurrent != null ">and avg_current = #{avgCurrent}</if>
            <if test="holdCurrent != null ">and hold_current = #{holdCurrent}</if>
            <if test="verticalDeviation != null ">and vertical_deviation = #{verticalDeviation}</if>
            <if test="sprayVolume != null ">and spray_volume = #{sprayVolume}</if>
            <if test="startTime != null ">and start_time = #{startTime}</if>
            <if test="endTime != null ">and end_time = #{endTime}</if>
            <if test="resultEvaluation != null ">and result_evaluation = #{resultEvaluation}</if>
            <if test="startHeight != null ">and start_height = #{startHeight}</if>
            <if test="inDepth != null ">and in_depth = #{inDepth}</if>
            <if test="effectiveDown != null ">and effective_down = #{effectiveDown}</if>
            <if test="effectiveLength != null ">and effective_length = #{effectiveLength}</if>
            <if test="pileNumber != null ">and pile_number = #{pileNumber}</if>
            <if test="avgSprayPressure != null ">and avg_spray_pressure = #{avgSprayPressure}</if>
            <if test="avgSpraySpeed != null ">and avg_spray_speed = #{avgSpraySpeed}</if>
            <if test="designLength != null ">and design_length = #{designLength}</if>
            <if test="avgUpSpeed != null ">and avg_up_speed = #{avgUpSpeed}</if>
            <if test="drillTotalNumber != null ">and drill_total_number = #{drillTotalNumber}</if>
            <if test="currentMechanicalType != null ">and current_mechanical_type = #{currentMechanicalType}</if>
            <if test="sendTotalNumber != null ">and send_total_number = #{sendTotalNumber}</if>
            <if test="sendTotalTime != null ">and send_total_time = #{sendTotalTime}</if>
            <if test="totalHammerNumber != null ">and total_hammer_number = #{totalHammerNumber}</if>
            <if test="uuid != null  and uuid != ''">and uuid = #{uuid}</if>
            <if test="dt != null  and dt != ''">and dt = #{dt}</if>
            <if test="recordTime != null">and record_time = #{recordTime}</if>
            <if test="createTime != null">and create_time #{createTime}</if>
            <if test="sendStartTime != null">and send_start_time = #{sendStartTime}</if>
            <if test="sendEndTime != null">and send_end_time = #{sendEndTime}</if>
            <if test="pullingStartTime != null">and pulling_start_time = #{pullingStartTime}</if>
            <if test="pullingEndTime != null">and pulling_end_time = #{pullingEndTime}</if>
            <if test="pileId !=null">and pile_id = #{pileId}</if>
        </where>
    </select>

    <select id="selectMachineProcessResultById" parameterType="Long" resultMap="MachineProcessResultResult">
        <include refid="selectMachineProcessResultVo"/>
        where id = #{id}
    </select>

    <insert id="insertMachineProcessResult" parameterType="MachineProcessResult" useGeneratedKeys="true"
            keyProperty="id">
        insert into cons_machine_process_result
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="consType != null">cons_type,</if>
            <if test="dataVersion != null">data_version,</if>
            <if test="dataTime != null">data_time,</if>
            <if test="pileId != null">pile_id,</if>
            <if test="designId != null">design_id,</if>
            <if test="machineId != null">machine_id,</if>
            <if test="designX != null">design_x,</if>
            <if test="designY != null">design_y,</if>
            <if test="realX != null">real_x,</if>
            <if test="realY != null">real_y,</if>
            <if test="latitude != null">latitude,</if>
            <if test="longitude != null">longitude,</if>
            <if test="pileLength != null">pile_length,</if>
            <if test="avgSpeed != null">avg_speed,</if>
            <if test="avgCurrent != null">avg_current,</if>
            <if test="holdCurrent != null">hold_current,</if>
            <if test="verticalDeviation != null">vertical_deviation,</if>
            <if test="sprayVolume != null">spray_volume,</if>
            <if test="startTime != null">start_time,</if>
            <if test="endTime != null">end_time,</if>
            <if test="resultEvaluation != null">result_evaluation,</if>
            <if test="startHeight != null">start_height,</if>
            <if test="inDepth != null">in_depth,</if>
            <if test="effectiveDown != null">effective_down,</if>
            <if test="effectiveLength != null">effective_length,</if>
            <if test="pileNumber != null">pile_number,</if>
            <if test="avgSprayPressure != null">avg_spray_pressure,</if>
            <if test="avgSpraySpeed != null">avg_spray_speed,</if>
            <if test="designLength != null">design_length,</if>
            <if test="avgUpSpeed != null">avg_up_speed,</if>
            <if test="drillTotalNumber != null">drill_total_number,</if>
            <if test="currentMechanicalType != null">current_mechanical_type,</if>
            <if test="sendTotalNumber != null">send_total_number,</if>
            <if test="sendTotalTime != null">send_total_time,</if>
            <if test="totalHammerNumber != null">total_hammer_number,</if>
            <if test="uuid != null">uuid,</if>
            <if test="dt != null">dt,</if>
            <if test="recordTime != null">record_time,</if>
            <if test="createTime != null">create_time,</if>
            <if test="sendStartTime != null">send_start_time,</if>
            <if test="sendEndTime != null">send_end_time,</if>
            <if test="pullingStartTime != null">pulling_start_time,</if>
            <if test="pullingEndTime != null">pulling_end_time,</if>
            <if test="tenantId != null">tenant_id,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="consType != null">#{consType},</if>
            <if test="dataVersion != null">#{dataVersion},</if>
            <if test="dataTime != null">#{dataTime},</if>
            <if test="pileId != null">#{pileId},</if>
            <if test="designId != null">#{designId},</if>
            <if test="machineId != null">#{machineId},</if>
            <if test="designX != null">#{designX},</if>
            <if test="designY != null">#{designY},</if>
            <if test="realX != null">#{realX},</if>
            <if test="realY != null">#{realY},</if>
            <if test="latitude != null">#{latitude},</if>
            <if test="longitude != null">#{longitude},</if>
            <if test="pileLength != null">#{pileLength},</if>
            <if test="avgSpeed != null">#{avgSpeed},</if>
            <if test="avgCurrent != null">#{avgCurrent},</if>
            <if test="holdCurrent != null">#{holdCurrent},</if>
            <if test="verticalDeviation != null">#{verticalDeviation},</if>
            <if test="sprayVolume != null">#{sprayVolume},</if>
            <if test="startTime != null">#{startTime},</if>
            <if test="endTime != null">#{endTime},</if>
            <if test="resultEvaluation != null">#{resultEvaluation},</if>
            <if test="startHeight != null">#{startHeight},</if>
            <if test="inDepth != null">#{inDepth},</if>
            <if test="effectiveDown != null">#{effectiveDown},</if>
            <if test="effectiveLength != null">#{effectiveLength},</if>
            <if test="pileNumber != null">#{pileNumber},</if>
            <if test="avgSprayPressure != null">#{avgSprayPressure},</if>
            <if test="avgSpraySpeed != null">#{avgSpraySpeed},</if>
            <if test="designLength != null">#{designLength},</if>
            <if test="avgUpSpeed != null">#{avgUpSpeed},</if>
            <if test="drillTotalNumber != null">#{drillTotalNumber},</if>
            <if test="currentMechanicalType != null">#{currentMechanicalType},</if>
            <if test="sendTotalNumber != null">#{sendTotalNumber},</if>
            <if test="sendTotalTime != null">#{sendTotalTime},</if>
            <if test="totalHammerNumber != null">#{totalHammerNumber},</if>
            <if test="uuid != null">#{uuid},</if>
            <if test="dt != null">#{dt},</if>
            <if test="recordTime != null">#{recordTime},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="sendStartTime != null">#{sendStartTime},</if>
            <if test="sendEndTime != null">#{sendEndTime},</if>
            <if test="pullingStartTime != null">#{pullingStartTime},</if>
            <if test="pullingEndTime != null">#{pullingEndTime},</if>
            <if test="tenantId != null">#{tenantId},</if>
        </trim>
    </insert>
    <insert id="insertMachineProcessResultOnUpdate" parameterType="MachineProcessResult" useGeneratedKeys="true"
            keyProperty="id">
        insert into cons_machine_process_result
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="consType != null">cons_type,</if>
            <if test="dataVersion != null">data_version,</if>
            <if test="dataTime != null">data_time,</if>
            <if test="pileId != null">pile_id,</if>
            <if test="designId != null">design_id,</if>
            <if test="machineId != null">machine_id,</if>
            <if test="designX != null">design_x,</if>
            <if test="designY != null">design_y,</if>
            <if test="realX != null">real_x,</if>
            <if test="realY != null">real_y,</if>
            <if test="latitude != null">latitude,</if>
            <if test="longitude != null">longitude,</if>
            <if test="pileLength != null">pile_length,</if>
            <if test="avgSpeed != null">avg_speed,</if>
            <if test="avgCurrent != null">avg_current,</if>
            <if test="holdCurrent != null">hold_current,</if>
            <if test="verticalDeviation != null">vertical_deviation,</if>
            <if test="sprayVolume != null">spray_volume,</if>
            <if test="startTime != null">start_time,</if>
            <if test="endTime != null">end_time,</if>
            <if test="resultEvaluation != null">result_evaluation,</if>
            <if test="startHeight != null">start_height,</if>
            <if test="inDepth != null">in_depth,</if>
            <if test="effectiveDown != null">effective_down,</if>
            <if test="effectiveLength != null">effective_length,</if>
            <if test="pileNumber != null">pile_number,</if>
            <if test="avgSprayPressure != null">avg_spray_pressure,</if>
            <if test="avgSpraySpeed != null">avg_spray_speed,</if>
            <if test="designLength != null">design_length,</if>
            <if test="avgUpSpeed != null">avg_up_speed,</if>
            <if test="drillTotalNumber != null">drill_total_number,</if>
            <if test="currentMechanicalType != null">current_mechanical_type,</if>
            <if test="sendTotalNumber != null">send_total_number,</if>
            <if test="sendTotalTime != null">send_total_time,</if>
            <if test="totalHammerNumber != null">total_hammer_number,</if>
            <if test="uuid != null">uuid,</if>
            <if test="dt != null">dt,</if>
            <if test="recordTime != null">record_time,</if>
            <if test="createTime != null">create_time,</if>
            <if test="sendStartTime != null">send_start_time,</if>
            <if test="sendEndTime != null">send_end_time,</if>
            <if test="pullingStartTime != null">pulling_start_time,</if>
            <if test="pullingEndTime != null">pulling_end_time,</if>
            <if test="tenantId != null">tenant_id,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="consType != null">#{consType},</if>
            <if test="dataVersion != null">#{dataVersion},</if>
            <if test="dataTime != null">#{dataTime},</if>
            <if test="pileId != null">#{pileId},</if>
            <if test="designId != null">#{designId},</if>
            <if test="machineId != null">#{machineId},</if>
            <if test="designX != null">#{designX},</if>
            <if test="designY != null">#{designY},</if>
            <if test="realX != null">#{realX},</if>
            <if test="realY != null">#{realY},</if>
            <if test="latitude != null">#{latitude},</if>
            <if test="longitude != null">#{longitude},</if>
            <if test="pileLength != null">#{pileLength},</if>
            <if test="avgSpeed != null">#{avgSpeed},</if>
            <if test="avgCurrent != null">#{avgCurrent},</if>
            <if test="holdCurrent != null">#{holdCurrent},</if>
            <if test="verticalDeviation != null">#{verticalDeviation},</if>
            <if test="sprayVolume != null">#{sprayVolume},</if>
            <if test="startTime != null">#{startTime},</if>
            <if test="endTime != null">#{endTime},</if>
            <if test="resultEvaluation != null">#{resultEvaluation},</if>
            <if test="startHeight != null">#{startHeight},</if>
            <if test="inDepth != null">#{inDepth},</if>
            <if test="effectiveDown != null">#{effectiveDown},</if>
            <if test="effectiveLength != null">#{effectiveLength},</if>
            <if test="pileNumber != null">#{pileNumber},</if>
            <if test="avgSprayPressure != null">#{avgSprayPressure},</if>
            <if test="avgSpraySpeed != null">#{avgSpraySpeed},</if>
            <if test="designLength != null">#{designLength},</if>
            <if test="avgUpSpeed != null">#{avgUpSpeed},</if>
            <if test="drillTotalNumber != null">#{drillTotalNumber},</if>
            <if test="currentMechanicalType != null">#{currentMechanicalType},</if>
            <if test="sendTotalNumber != null">#{sendTotalNumber},</if>
            <if test="sendTotalTime != null">#{sendTotalTime},</if>
            <if test="totalHammerNumber != null">#{totalHammerNumber},</if>
            <if test="uuid != null">#{uuid},</if>
            <if test="dt != null">#{dt},</if>
            <if test="recordTime != null">#{recordTime},</if>
            <if test="createTime != null">now(),</if>
            <if test="sendStartTime != null">#{sendStartTime},</if>
            <if test="sendEndTime != null">#{sendEndTime},</if>
            <if test="pullingStartTime != null">#{pullingStartTime},</if>
            <if test="pullingEndTime!= null">#{pullingEndTime},</if>
            <if test="tenantId != null">#{tenantId},</if>
        </trim>
        ON DUPLICATE KEY UPDATE
        <trim suffixOverrides=",">
            <if test="consType != null">cons_type = VALUES(cons_type),</if>
            <if test="dataVersion != null">data_version = VALUES(data_version),</if>
            <if test="dataTime != null">data_time = VALUES(data_time),</if>
            <if test="pileId != null">pile_id = VALUES(pile_id),</if>
            <if test="designId != null">design_id = VALUES(design_id),</if>
            <if test="machineId != null">machine_id = VALUES(machine_id),</if>
            <if test="designX != null">design_x = VALUES(design_x),</if>
            <if test="designY != null">design_y = VALUES(design_y),</if>
            <if test="realX != null">real_x = VALUES(real_x),</if>
            <if test="realY != null">real_y = VALUES(real_y),</if>
            <if test="latitude != null">latitude = VALUES(latitude),</if>
            <if test="longitude != null">longitude = VALUES(longitude),</if>
            <if test="pileLength != null">pile_length = VALUES(pile_length),</if>
            <if test="avgSpeed != null">avg_speed = VALUES(avg_speed),</if>
            <if test="avgCurrent != null">avg_current = VALUES(avg_current),</if>
            <if test="holdCurrent != null">hold_current = VALUES(hold_current),</if>
            <if test="verticalDeviation != null">vertical_deviation = VALUES(vertical_deviation),</if>
            <if test="sprayVolume != null">spray_volume = VALUES(spray_volume),</if>
            <if test="startTime != null">start_time = VALUES(start_time),</if>
            <if test="endTime != null">end_time = VALUES(end_time),</if>
            <if test="resultEvaluation != null">result_evaluation = VALUES(result_evaluation),</if>
            <if test="startHeight != null">start_height = VALUES(start_height),</if>
            <if test="inDepth != null">in_depth = VALUES(in_depth),</if>
            <if test="effectiveDown != null">effective_down = VALUES(effective_down),</if>
            <if test="effectiveLength != null">effective_length = VALUES(effective_length),</if>
            <if test="pileNumber != null">pile_number = VALUES(pile_number),</if>
            <if test="avgSprayPressure != null">avg_spray_pressure = VALUES(avg_spray_pressure),</if>
            <if test="avgSpraySpeed != null">avg_spray_speed = VALUES(avg_spray_speed),</if>
            <if test="designLength != null">design_length = VALUES(design_length),</if>
            <if test="avgUpSpeed != null">avg_up_speed = VALUES(avg_up_speed),</if>
            <if test="drillTotalNumber != null">drill_total_number = VALUES(drill_total_number),</if>
            <if test="currentMechanicalType != null">current_mechanical_type = VALUES(current_mechanical_type),</if>
            <if test="sendTotalNumber != null">send_total_number = VALUES(send_total_number),</if>
            <if test="sendTotalTime != null">send_total_time = VALUES(send_total_time),</if>
            <if test="totalHammerNumber != null">total_hammer_number = VALUES(total_hammer_number),</if>
            <if test="dt != null">dt = VALUES(dt),</if>
            <if test="recordTime != null">record_time = VALUES(record_time),</if>
            <if test="createTime != null">create_time = NOW(),</if>
            <if test="sendStartTime != null">send_start_time = VALUES(send_start_time),</if>
            <if test="sendEndTime != null">send_end_time = VALUES(send_end_time),</if>
            <if test="pullingStartTime != null">pulling_start_time = VALUES(pulling_start_time),</if>
            <if test="pullingEndTime != null">pulling_end_time = VALUES(pulling_end_time),</if>
            <if test="tenantId != null">tenant_id = VALUES(tenant_id),</if>
        </trim>

    </insert>

    <update id="updateMachineProcessResult" parameterType="MachineProcessResult">
        update cons_machine_process_result
        <trim prefix="SET" suffixOverrides=",">
            <if test="consType != null">cons_type = #{consType},</if>
            <if test="dataVersion != null">data_version = #{dataVersion},</if>
            <if test="dataTime != null">data_time = #{dataTime},</if>
            <if test="pileId != null">pile_id = #{pileId},</if>
            <if test="designId != null">design_id = #{designId},</if>
            <if test="machineId != null">machine_id = #{machineId},</if>
            <if test="designX != null">design_x = #{designX},</if>
            <if test="designY != null">design_y = #{designY},</if>
            <if test="realX != null">real_x = #{realX},</if>
            <if test="realY != null">real_y = #{realY},</if>
            <if test="latitude != null">latitude = #{latitude},</if>
            <if test="longitude != null">longitude = #{longitude},</if>
            <if test="pileLength != null">pile_length = #{pileLength},</if>
            <if test="avgSpeed != null">avg_speed = #{avgSpeed},</if>
            <if test="avgCurrent != null">avg_current = #{avgCurrent},</if>
            <if test="holdCurrent != null">hold_current = #{holdCurrent},</if>
            <if test="verticalDeviation != null">vertical_deviation = #{verticalDeviation},</if>
            <if test="sprayVolume != null">spray_volume = #{sprayVolume},</if>
            <if test="startTime != null">start_time = #{startTime},</if>
            <if test="endTime != null">end_time = #{endTime},</if>
            <if test="resultEvaluation != null">result_evaluation = #{resultEvaluation},</if>
            <if test="startHeight != null">start_height = #{startHeight},</if>
            <if test="inDepth != null">in_depth = #{inDepth},</if>
            <if test="effectiveDown != null">effective_down = #{effectiveDown},</if>
            <if test="effectiveLength != null">effective_length = #{effectiveLength},</if>
            <if test="pileNumber != null">pile_number = #{pileNumber},</if>
            <if test="avgSprayPressure != null">avg_spray_pressure = #{avgSprayPressure},</if>
            <if test="avgSpraySpeed != null">avg_spray_speed = #{avgSpraySpeed},</if>
            <if test="designLength != null">design_length = #{designLength},</if>
            <if test="avgUpSpeed != null">avg_up_speed = #{avgUpSpeed},</if>
            <if test="drillTotalNumber != null">drill_total_number = #{drillTotalNumber},</if>
            <if test="currentMechanicalType != null">current_mechanical_type = #{currentMechanicalType},</if>
            <if test="sendTotalNumber != null">send_total_number = #{sendTotalNumber},</if>
            <if test="sendTotalTime != null">send_total_time = #{sendTotalTime},</if>
            <if test="totalHammerNumber != null">total_hammer_number = #{totalHammerNumber},</if>
            <if test="uuid != null">uuid = #{uuid},</if>
            <if test="dt != null">dt = #{dt},</if>
            <if test="recordTime != null">record_time = #{recordTime},</if>
            <if test="createTime != null">create_time = NOW(),</if>
            <if test="sendStartTime != null">send_start_time = #{sendStartTime},</if>
            <if test="sendEndTime != null">send_end_time = #{sendEndTime},</if>
            <if test="pullingStartTime != null">pulling_start_time = #{pullingStartTime},</if>
            <if test="pullingEndTime != null">pulling_end_time = #{pullingEndTime},</if>
            <if test="tenantId != null">tenant_id = #{tenantId},</if>
        </trim>
        where id = #{id}
    </update>

    <delete id="deleteMachineProcessResultById" parameterType="Long">
        delete
        from cons_machine_process_result
        where id = #{id}
    </delete>

    <delete id="deleteMachineProcessResultByIds" parameterType="String">
        delete from cons_machine_process_result where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
    <select id="qeyConsUnitResult" parameterType="Long" resultType="com.huashe.park.domain.dto.cons.ConsUnitResult">
        select cmpr.*,
               cphir.forward_tilt_angle,
               cphir.tilt_angle,
               cphir.hole_num,
               cphir.spray_pressure pressure,
               cphir.end_press,
               cphir.depth_press    depth_press
        from cons_machine_process_result cmpr
                 inner join cons_pile_hole_index_realtime cphir on
            cmpr.pile_id = cphir.hole_byte_key
        where cphir.cons_unit_id = #{consUnitId}
          and cphir.status = '00'
    </select>

</mapper>