<?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.sundot.airport.item.mapper.ItemSeizureRecordMapper">

    <resultMap type="ItemSeizureRecord" id="ItemSeizureRecordResult">
        <result property="tenantId" column="tenant_id"/>
        <result property="revision" column="revision"/>
        <result property="createBy" column="create_by"/>
        <result property="createTime" column="create_time"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time"/>
        <result property="inspectUserId" column="inspect_user_id"/>
        <result property="channelCode" column="channel_code"/>
        <result property="seizureTime" column="seizure_time"/>
        <result property="checkMethod" column="check_method"/>
        <result property="remark" column="remark"/>
        <result property="attendanceId" column="attendance_id"/>
        <result property="id" column="id"/>
        <result property="attendanceTeamId" column="attendance_team_id"/>
        <result property="attendanceTeamName" column="attendance_team_name"/>
        <result property="attendanceDepartmentId" column="attendance_department_id"/>
        <result property="attendanceDepartmentName" column="attendance_department_name"/>
        <result property="attendanceStationId" column="attendance_station_id"/>
        <result property="attendanceStationName" column="attendance_station_name"/>
        <result property="channelName" column="channel_name"/>
        <result property="regionalCode" column="regional_code"/>
        <result property="regionalName" column="regional_name"/>
        <result property="terminlCode" column="terminl_code"/>
        <result property="terminlName" column="terminl_name"/>
        <result property="passengerName" column="passenger_name"/>
        <result property="passengerGender" column="passenger_gender"/>
        <result property="passengerCard" column="passenger_card"/>
        <result property="passengerFlight" column="passenger_flight"/>
        <result property="inspectTeamId" column="inspect_team_id"/>
        <result property="inspectTeamName" column="inspect_team_name"/>
        <result property="inspectDepartmentId" column="inspect_department_id"/>
        <result property="inspectDepartmentName" column="inspect_department_name"/>
        <result property="inspectStationId" column="inspect_station_id"/>
        <result property="inspectStationName" column="inspect_station_name"/>
        <result property="checkMethodDesc" column="check_method_desc"/>
        <result property="passengerGenderDesc" column="passenger_gender_desc"/>
        <result property="inspectUserName" column="inspect_user_name"/>
        <result property="processStatus" column="process_status"/>
        <result property="attendanceBrigadeId" column="attendance_brigade_id"/>
        <result property="attendanceBrigadeName" column="attendance_brigade_name"/>
        <result property="inspectBrigadeId" column="inspect_brigade_id"/>
        <result property="inspectBrigadeName" column="inspect_brigade_name"/>
    </resultMap>

    <resultMap type="ItemSeizureRecord" id="ItemSeizureRecordExportResult" extends="ItemSeizureRecordResult">
        <collection property="itemSeizureItemsList" ofType="com.sundot.airport.item.domain.ItemSeizureItems">
            <result property="id" column="items_id"/>
            <result property="recordId" column="record_id"/>
            <result property="itemCode" column="item_code"/>
            <result property="quantity" column="quantity"/>
            <result property="remark" column="items_remark"/>
            <result property="checkPositionCodeOne" column="check_position_code_one"/>
            <result property="isActiveConcealment" column="is_active_concealment"/>
            <result property="checkPositionCodeTwo" column="check_position_code_two"/>
            <result property="checkPositionSpecific" column="check_position_specific"/>
            <result property="itemName" column="item_name"/>
            <result property="categoryCodeOne" column="category_code_one"/>
            <result property="categoryNameOne" column="category_name_one"/>
            <result property="categoryCodeTwo" column="category_code_two"/>
            <result property="categoryNameTwo" column="category_name_two"/>
            <result property="unit" column="unit"/>
            <result property="checkPositionNameOne" column="check_position_name_one"/>
            <result property="checkPositionNameTwo" column="check_position_name_two"/>
            <result property="unitDesc" column="unit_desc"/>
            <result property="handlingMethod" column="handling_method"/>
            <result property="handlingMethodDesc" column="handling_method_desc"/>
            <result property="attachmentId" column="attachment_id"/>
            <result property="attachmentUrl" column="attachment_url"/>
            <result property="attachmentName" column="attachment_name"/>
            <result property="location" column="location"/>
            <result property="locationText" column="location_text"/>
        </collection>
    </resultMap>

    <sql id="selectItemSeizureRecordVo">
        select tenant_id,
               revision,
               create_by,
               create_time,
               update_by,
               update_time,
               inspect_user_id,
               channel_code,
               seizure_time,
               check_method,
               remark,
               attendance_id,
               id,
               attendance_team_id,
               attendance_team_name,
               attendance_department_id,
               attendance_department_name,
               attendance_station_id,
               attendance_station_name,
               channel_name,
               regional_code,
               regional_name,
               terminl_code,
               terminl_name,
               passenger_name,
               passenger_gender,
               passenger_card,
               passenger_flight,
               inspect_team_id,
               inspect_team_name,
               inspect_department_id,
               inspect_department_name,
               inspect_station_id,
               inspect_station_name,
               check_method_desc,
               passenger_gender_desc,
               inspect_user_name,
               process_status,
               attendance_brigade_id,
               attendance_brigade_name,
               inspect_brigade_id,
               inspect_brigade_name
        from item_seizure_record
    </sql>

    <select id="selectItemSeizureRecordList" resultMap="ItemSeizureRecordResult">
        <include refid="selectItemSeizureRecordVo"/>
        <where>
            <if test="tenantId != null  and tenantId != ''">and tenant_id = #{tenantId}</if>
            <if test="revision != null ">and revision = #{revision}</if>
            <if test="inspectUserId != null ">and inspect_user_id = #{inspectUserId}</if>
            <if test="channelCode != null  and channelCode != ''">and channel_code = #{channelCode}</if>
            <if test="seizureTime != null ">and seizure_time = #{seizureTime}</if>
            <if test="checkMethod != null  and checkMethod != ''">and check_method = #{checkMethod}</if>
            <if test="attendanceId != null ">and attendance_id = #{attendanceId}</if>
            <if test="attendanceTeamId != null ">and attendance_team_id = #{attendanceTeamId}</if>
            <if test="attendanceTeamName != null  and attendanceTeamName != ''">and attendance_team_name like
                concat('%', #{attendanceTeamName}, '%')
            </if>
            <if test="attendanceDepartmentId != null ">and attendance_department_id = #{attendanceDepartmentId}</if>
            <if test="attendanceDepartmentName != null  and attendanceDepartmentName != ''">and
                attendance_department_name like concat('%', #{attendanceDepartmentName}, '%')
            </if>
            <if test="attendanceStationId != null ">and attendance_station_id = #{attendanceStationId}</if>
            <if test="attendanceStationName != null  and attendanceStationName != ''">and attendance_station_name like
                concat('%', #{attendanceStationName}, '%')
            </if>
            <if test="channelName != null  and channelName != ''">and channel_name like
                concat('%', #{channelName}, '%')
            </if>
            <if test="regionalCode != null ">and regional_code = #{regionalCode}</if>
            <if test="regionalName != null  and regionalName != ''">and regional_name like
                concat('%', #{regionalName}, '%')
            </if>
            <if test="terminlCode != null ">and terminl_code = #{terminlCode}</if>
            <if test="terminlName != null  and terminlName != ''">and terminl_name like
                concat('%', #{terminlName}, '%')
            </if>
            <if test="passengerName != null  and passengerName != ''">and passenger_name like
                concat('%', #{passengerName}, '%')
            </if>
            <if test="passengerGender != null  and passengerGender != ''">and passenger_gender = #{passengerGender}</if>
            <if test="passengerCard != null  and passengerCard != ''">and passenger_card = #{passengerCard}</if>
            <if test="passengerFlight != null  and passengerFlight != ''">and passenger_flight = #{passengerFlight}</if>
            <if test="inspectTeamId != null ">and inspect_team_id = #{inspectTeamId}</if>
            <if test="inspectTeamName != null  and inspectTeamName != ''">and inspect_team_name like
                concat('%', #{inspectTeamName}, '%')
            </if>
            <if test="inspectDepartmentId != null ">and inspect_department_id = #{inspectDepartmentId}</if>
            <if test="inspectDepartmentName != null  and inspectDepartmentName != ''">and inspect_department_name like
                concat('%', #{inspectDepartmentName}, '%')
            </if>
            <if test="inspectStationId != null ">and inspect_station_id = #{inspectStationId}</if>
            <if test="inspectStationName != null  and inspectStationName != ''">and inspect_station_name like
                concat('%', #{inspectStationName}, '%')
            </if>
            <if test="checkMethodDesc != null  and checkMethodDesc != ''">and check_method_desc = #{checkMethodDesc}
            </if>
            <if test="passengerGenderDesc != null  and passengerGenderDesc != ''">and passenger_gender_desc =
                #{passengerGenderDesc}
            </if>
            <if test="inspectUserName != null  and inspectUserName != ''">and inspect_user_name like
                concat('%', #{inspectUserName}, '%')
            </if>
            <if test="processStatus != null  and processStatus != ''">and process_status = #{processStatus}</if>
            <if test="attendanceBrigadeId != null ">and attendance_brigade_id = #{attendanceBrigadeId}</if>
            <if test="attendanceBrigadeName != null  and attendanceBrigadeName != ''">and attendance_brigade_name like
                concat('%', #{attendanceBrigadeName}, '%')
            </if>
            <if test="inspectBrigadeId != null ">and inspect_brigade_id = #{inspectBrigadeId}</if>
            <if test="inspectBrigadeName != null  and inspectBrigadeName != ''">and inspect_brigade_name like
                concat('%', #{inspectBrigadeName}, '%')
            </if>
            <if test="beginTime !=null and endTime !=null ">
                and seizure_time >= #{beginTime}
                and seizure_time <![CDATA[ < ]]> date_add(#{endTime} , interval 1 day)
            </if>
        </where>
        order by create_time desc
    </select>

    <select id="selectItemSeizureRecordListForExport" resultMap="ItemSeizureRecordExportResult">
        SELECT
        isr.tenant_id,
        isr.revision,
        isr.create_by,
        isr.create_time,
        isr.update_by,
        isr.update_time,
        isr.inspect_user_id,
        isr.channel_code,
        isr.seizure_time,
        isr.check_method,
        isr.remark,
        isr.attendance_id,
        isr.id,
        isr.attendance_team_id,
        isr.attendance_team_name,
        isr.attendance_department_id,
        isr.attendance_department_name,
        isr.attendance_station_id,
        isr.attendance_station_name,
        isr.channel_name,
        isr.regional_code,
        isr.regional_name,
        isr.terminl_code,
        isr.terminl_name,
        isr.passenger_name,
        isr.passenger_gender,
        isr.passenger_card,
        isr.passenger_flight,
        isr.inspect_team_id,
        isr.inspect_team_name,
        isr.inspect_department_id,
        isr.inspect_department_name,
        isr.inspect_station_id,
        isr.inspect_station_name,
        isr.check_method_desc,
        isr.passenger_gender_desc,
        isr.inspect_user_name,
        isr.process_status,
        isi.id AS items_id,
        isi.record_id,
        isi.item_code,
        isi.quantity,
        isi.remark AS items_remark,
        isi.check_position_code_one,
        isi.is_active_concealment,
        isi.check_position_code_two,
        isi.check_position_specific,
        isi.item_name,
        isi.category_code_one,
        isi.category_name_one,
        isi.category_code_two,
        isi.category_name_two,
        isi.unit,
        isi.check_position_name_one,
        isi.check_position_name_two,
        isi.unit_desc,
        isi.handling_method,
        isi.handling_method_desc,
        isi.attachment_id,
        isi.attachment_url,
        isi.attachment_name,
        isi.location,
        isi.location_text
        FROM item_seizure_record isr
        LEFT JOIN item_seizure_items isi ON isi.record_id = isr.id
        <where>
            <if test="tenantId != null  and tenantId != ''">and isr.tenant_id = #{tenantId}</if>
            <if test="revision != null ">and isr.revision = #{revision}</if>
            <if test="inspectUserId != null ">and isr.inspect_user_id = #{inspectUserId}</if>
            <if test="channelCode != null  and channelCode != ''">and isr.channel_code = #{channelCode}</if>
            <if test="seizureTime != null ">and isr.seizure_time = #{seizureTime}</if>
            <if test="checkMethod != null  and checkMethod != ''">and isr.check_method = #{checkMethod}</if>
            <if test="attendanceId != null ">and isr.attendance_id = #{attendanceId}</if>
            <if test="attendanceTeamId != null ">and isr.attendance_team_id = #{attendanceTeamId}</if>
            <if test="attendanceTeamName != null  and attendanceTeamName != ''">and isr.attendance_team_name like
                concat('%', #{attendanceTeamName}, '%')
            </if>
            <if test="attendanceDepartmentId != null ">and isr.attendance_department_id = #{attendanceDepartmentId}</if>
            <if test="attendanceDepartmentName != null  and attendanceDepartmentName != ''">and
                isr.attendance_department_name like concat('%', #{attendanceDepartmentName}, '%')
            </if>
            <if test="attendanceStationId != null ">and isr.attendance_station_id = #{attendanceStationId}</if>
            <if test="attendanceStationName != null  and attendanceStationName != ''">and isr.attendance_station_name
                like concat('%', #{attendanceStationName}, '%')
            </if>
            <if test="channelName != null  and channelName != ''">and isr.channel_name like
                concat('%', #{channelName}, '%')
            </if>
            <if test="regionalCode != null ">and isr.regional_code = #{regionalCode}</if>
            <if test="regionalName != null  and regionalName != ''">and isr.regional_name like
                concat('%', #{regionalName}, '%')
            </if>
            <if test="terminlCode != null ">and isr.terminl_code = #{terminlCode}</if>
            <if test="terminlName != null  and terminlName != ''">and isr.terminl_name like
                concat('%', #{terminlName}, '%')
            </if>
            <if test="passengerName != null  and passengerName != ''">and isr.passenger_name like
                concat('%', #{passengerName}, '%')
            </if>
            <if test="passengerGender != null  and passengerGender != ''">and isr.passenger_gender =
                #{passengerGender}
            </if>
            <if test="passengerCard != null  and passengerCard != ''">and isr.passenger_card = #{passengerCard}</if>
            <if test="passengerFlight != null  and passengerFlight != ''">and isr.passenger_flight =
                #{passengerFlight}
            </if>
            <if test="inspectTeamId != null ">and isr.inspect_team_id = #{inspectTeamId}</if>
            <if test="inspectTeamName != null  and inspectTeamName != ''">and isr.inspect_team_name like
                concat('%', #{inspectTeamName}, '%')
            </if>
            <if test="inspectDepartmentId != null ">and isr.inspect_department_id = #{inspectDepartmentId}</if>
            <if test="inspectDepartmentName != null  and inspectDepartmentName != ''">and isr.inspect_department_name
                like concat('%', #{inspectDepartmentName}, '%')
            </if>
            <if test="inspectStationId != null ">and isr.inspect_station_id = #{inspectStationId}</if>
            <if test="inspectStationName != null  and inspectStationName != ''">and isr.inspect_station_name like
                concat('%', #{inspectStationName}, '%')
            </if>
            <if test="checkMethodDesc != null  and checkMethodDesc != ''">and isr.check_method_desc = #{checkMethodDesc}
            </if>
            <if test="passengerGenderDesc != null  and passengerGenderDesc != ''">and isr.passenger_gender_desc =
                #{passengerGenderDesc}
            </if>
            <if test="inspectUserName != null  and inspectUserName != ''">and isr.inspect_user_name like
                concat('%', #{inspectUserName}, '%')
            </if>
            <if test="processStatus != null  and processStatus != ''">and isr.process_status = #{processStatus}</if>
            <if test="beginTime !=null and endTime !=null ">
                and isr.seizure_time >= #{beginTime}
                and isr.seizure_time <![CDATA[ < ]]> date_add(#{endTime} , interval 1 day)
            </if>
        </where>
        ORDER BY isr.create_time DESC
    </select>

    <select id="selectItemSeizureRecordById" parameterType="Long" resultMap="ItemSeizureRecordResult">
        <include refid="selectItemSeizureRecordVo"/>
        where id = #{id}
    </select>

    <insert id="insertItemSeizureRecord" parameterType="ItemSeizureRecord" useGeneratedKeys="true" keyProperty="id">
        insert into item_seizure_record
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="tenantId != null">tenant_id,</if>
            <if test="revision != null">revision,</if>
            <if test="createBy != null">create_by,</if>
            <if test="createTime != null">create_time,</if>
            <if test="updateBy != null">update_by,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="inspectUserId != null">inspect_user_id,</if>
            <if test="channelCode != null and channelCode != ''">channel_code,</if>
            <if test="seizureTime != null">seizure_time,</if>
            <if test="checkMethod != null and checkMethod != ''">check_method,</if>
            <if test="remark != null">remark,</if>
            <if test="attendanceId != null">attendance_id,</if>
            <if test="attendanceTeamId != null">attendance_team_id,</if>
            <if test="attendanceTeamName != null and attendanceTeamName != ''">attendance_team_name,</if>
            <if test="attendanceDepartmentId != null">attendance_department_id,</if>
            <if test="attendanceDepartmentName != null and attendanceDepartmentName != ''">attendance_department_name,
            </if>
            <if test="attendanceStationId != null">attendance_station_id,</if>
            <if test="attendanceStationName != null and attendanceStationName != ''">attendance_station_name,</if>
            <if test="channelName != null and channelName != ''">channel_name,</if>
            <if test="regionalCode != null">regional_code,</if>
            <if test="regionalName != null and regionalName != ''">regional_name,</if>
            <if test="terminlCode != null">terminl_code,</if>
            <if test="terminlName != null and terminlName != ''">terminl_name,</if>
            <if test="passengerName != null">passenger_name,</if>
            <if test="passengerGender != null">passenger_gender,</if>
            <if test="passengerCard != null">passenger_card,</if>
            <if test="passengerFlight != null">passenger_flight,</if>
            <if test="inspectTeamId != null">inspect_team_id,</if>
            <if test="inspectTeamName != null and inspectTeamName != ''">inspect_team_name,</if>
            <if test="inspectDepartmentId != null">inspect_department_id,</if>
            <if test="inspectDepartmentName != null and inspectDepartmentName != ''">inspect_department_name,</if>
            <if test="inspectStationId != null">inspect_station_id,</if>
            <if test="inspectStationName != null and inspectStationName != ''">inspect_station_name,</if>
            <if test="checkMethodDesc != null and checkMethodDesc != ''">check_method_desc,</if>
            <if test="passengerGenderDesc != null and passengerGenderDesc != ''">passenger_gender_desc,</if>
            <if test="inspectUserName != null and inspectUserName != ''">inspect_user_name,</if>
            <if test="processStatus != null">process_status,</if>
            <if test="attendanceBrigadeId != null">attendance_brigade_id,</if>
            <if test="attendanceBrigadeName != null">attendance_brigade_name,</if>
            <if test="inspectBrigadeId != null">inspect_brigade_id,</if>
            <if test="inspectBrigadeName != null">inspect_brigade_name,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="tenantId != null">#{tenantId},</if>
            <if test="revision != null">#{revision},</if>
            <if test="createBy != null">#{createBy},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="inspectUserId != null">#{inspectUserId},</if>
            <if test="channelCode != null and channelCode != ''">#{channelCode},</if>
            <if test="seizureTime != null">#{seizureTime},</if>
            <if test="checkMethod != null and checkMethod != ''">#{checkMethod},</if>
            <if test="remark != null">#{remark},</if>
            <if test="attendanceId != null">#{attendanceId},</if>
            <if test="attendanceTeamId != null">#{attendanceTeamId},</if>
            <if test="attendanceTeamName != null and attendanceTeamName != ''">#{attendanceTeamName},</if>
            <if test="attendanceDepartmentId != null">#{attendanceDepartmentId},</if>
            <if test="attendanceDepartmentName != null and attendanceDepartmentName != ''">
                #{attendanceDepartmentName},
            </if>
            <if test="attendanceStationId != null">#{attendanceStationId},</if>
            <if test="attendanceStationName != null and attendanceStationName != ''">#{attendanceStationName},</if>
            <if test="channelName != null and channelName != ''">#{channelName},</if>
            <if test="regionalCode != null">#{regionalCode},</if>
            <if test="regionalName != null and regionalName != ''">#{regionalName},</if>
            <if test="terminlCode != null">#{terminlCode},</if>
            <if test="terminlName != null and terminlName != ''">#{terminlName},</if>
            <if test="passengerName != null">#{passengerName},</if>
            <if test="passengerGender != null">#{passengerGender},</if>
            <if test="passengerCard != null">#{passengerCard},</if>
            <if test="passengerFlight != null">#{passengerFlight},</if>
            <if test="inspectTeamId != null">#{inspectTeamId},</if>
            <if test="inspectTeamName != null and inspectTeamName != ''">#{inspectTeamName},</if>
            <if test="inspectDepartmentId != null">#{inspectDepartmentId},</if>
            <if test="inspectDepartmentName != null and inspectDepartmentName != ''">#{inspectDepartmentName},</if>
            <if test="inspectStationId != null">#{inspectStationId},</if>
            <if test="inspectStationName != null and inspectStationName != ''">#{inspectStationName},</if>
            <if test="checkMethodDesc != null and checkMethodDesc != ''">#{checkMethodDesc},</if>
            <if test="passengerGenderDesc != null and passengerGenderDesc != ''">#{passengerGenderDesc},</if>
            <if test="inspectUserName != null and inspectUserName != ''">#{inspectUserName},</if>
            <if test="processStatus != null">#{processStatus},</if>
            <if test="attendanceBrigadeId != null">#{attendanceBrigadeId},</if>
            <if test="attendanceBrigadeName != null">#{attendanceBrigadeName},</if>
            <if test="inspectBrigadeId != null">#{inspectBrigadeId},</if>
            <if test="inspectBrigadeName != null">#{inspectBrigadeName},</if>
        </trim>
    </insert>

    <update id="updateItemSeizureRecord" parameterType="ItemSeizureRecord">
        update item_seizure_record
        <trim prefix="SET" suffixOverrides=",">
            <if test="tenantId != null">tenant_id = #{tenantId},</if>
            <if test="revision != null">revision = #{revision},</if>
            <if test="createBy != null">create_by = #{createBy},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="inspectUserId != null">inspect_user_id = #{inspectUserId},</if>
            <if test="channelCode != null and channelCode != ''">channel_code = #{channelCode},</if>
            <if test="seizureTime != null">seizure_time = #{seizureTime},</if>
            <if test="checkMethod != null and checkMethod != ''">check_method = #{checkMethod},</if>
            <if test="remark != null">remark = #{remark},</if>
            <if test="attendanceId != null">attendance_id = #{attendanceId},</if>
            <if test="attendanceTeamId != null">attendance_team_id = #{attendanceTeamId},</if>
            <if test="attendanceTeamName != null and attendanceTeamName != ''">attendance_team_name =
                #{attendanceTeamName},
            </if>
            <if test="attendanceDepartmentId != null">attendance_department_id = #{attendanceDepartmentId},</if>
            <if test="attendanceDepartmentName != null and attendanceDepartmentName != ''">attendance_department_name =
                #{attendanceDepartmentName},
            </if>
            <if test="attendanceStationId != null">attendance_station_id = #{attendanceStationId},</if>
            <if test="attendanceStationName != null and attendanceStationName != ''">attendance_station_name =
                #{attendanceStationName},
            </if>
            <if test="channelName != null and channelName != ''">channel_name = #{channelName},</if>
            <if test="regionalCode != null">regional_code = #{regionalCode},</if>
            <if test="regionalName != null and regionalName != ''">regional_name = #{regionalName},</if>
            <if test="terminlCode != null">terminl_code = #{terminlCode},</if>
            <if test="terminlName != null and terminlName != ''">terminl_name = #{terminlName},</if>
            <if test="passengerName != null">passenger_name = #{passengerName},</if>
            <if test="passengerGender != null">passenger_gender = #{passengerGender},</if>
            <if test="passengerCard != null">passenger_card = #{passengerCard},</if>
            <if test="passengerFlight != null">passenger_flight = #{passengerFlight},</if>
            <if test="inspectTeamId != null">inspect_team_id = #{inspectTeamId},</if>
            <if test="inspectTeamName != null and inspectTeamName != ''">inspect_team_name = #{inspectTeamName},</if>
            <if test="inspectDepartmentId != null">inspect_department_id = #{inspectDepartmentId},</if>
            <if test="inspectDepartmentName != null and inspectDepartmentName != ''">inspect_department_name =
                #{inspectDepartmentName},
            </if>
            <if test="inspectStationId != null">inspect_station_id = #{inspectStationId},</if>
            <if test="inspectStationName != null and inspectStationName != ''">inspect_station_name =
                #{inspectStationName},
            </if>
            <if test="checkMethodDesc != null and checkMethodDesc != ''">check_method_desc = #{checkMethodDesc},</if>
            <if test="passengerGenderDesc != null and passengerGenderDesc != ''">passenger_gender_desc =
                #{passengerGenderDesc},
            </if>
            <if test="inspectUserName != null and inspectUserName != ''">inspect_user_name = #{inspectUserName},</if>
            <if test="processStatus != null">process_status = #{processStatus},</if>
            <if test="attendanceBrigadeId != null">attendance_brigade_id = #{attendanceBrigadeId},</if>
            <if test="attendanceBrigadeName != null">attendance_brigade_name = #{attendanceBrigadeName},</if>
            <if test="inspectBrigadeId != null">inspect_brigade_id = #{inspectBrigadeId},</if>
            <if test="inspectBrigadeName != null">inspect_brigade_name = #{inspectBrigadeName},</if>
        </trim>
        where id = #{id}
    </update>

    <delete id="deleteItemSeizureRecordById" parameterType="Long">
        delete
        from item_seizure_record
        where id = #{id}
    </delete>

    <delete id="deleteItemSeizureRecordByIds" parameterType="String">
        delete from item_seizure_record where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>