<?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.ruoyi.project.ticket.mapper.TFireWorkPermitMapper">

    <resultMap type="TFireWorkPermit" id="TFireWorkPermitResult">
        <result property="hId"    column="h_id"    />
        <result property="aEquipmentName"    column="a_equipment_name"    />
        <result property="aEquipmentLeader"    column="a_equipment_leader"    />
        <result property="aEquipmentTel"    column="a_equipment_tel"    />
        <result property="aEquipmentOffice"    column="a_equipment_office"    />
        <result property="aConstructionName"    column="a_construction_name"    />
        <result property="aConstructionLeader"    column="a_construction_leader"    />
        <result property="aConstructionTel"    column="a_construction_tel"    />
        <result property="aConstructionOffice"    column="a_construction_office"    />
        <result property="aContractorName"    column="a_contractor_name"    />
        <result property="aContractorLeader"    column="a_contractor_leader"    />
        <result property="aContractorTel"    column="a_contractor_tel"    />
        <result property="aContractorOffice"    column="a_contractor_office"    />
        <result property="aIsNeedSafeLiaison"    column="a_is_need_safe_liaison"    />
        <result property="aSafeLiaisonName"    column="a_safe_liaison_name"    />
        <result property="aSafeLiaisonSign"    column="a_safe_liaison_sign"    />
        <result property="aSafeLiaisonTel"    column="a_safe_liaison_tel"    />
        <result property="aSafeLiaisonOffice"    column="a_safe_liaison_office"    />
        <result property="bDeviceName"    column="b_device_name"    />
        <result property="bWorkContent"    column="b_work_content"    />
        <result property="bValidityStartTime"    column="b_validity_start_time"    />
        <result property="bValidityEndTime"    column="b_validity_end_time"    />
        <result property="bFireWorkGrade"    column="b_fire_work_grade"    />
        <result property="cIsWorkToFire"    column="c_is_work_to_fire"    />
        <result property="cIsWorkToBlast"    column="c_is_work_to_blast"    />
        <result property="cIsWorkToEnvir"    column="c_is_work_to_envir"    />
        <result property="cIsDeviceToBlast"    column="c_is_device_to_blast"    />
        <result property="cIsOtherA"    column="c_is_other_a"    />
        <result property="bAreaNo" column="b_area_no"/>
        <result property="aId"    column="a_id"    />
        <result property="cIsOtherFire"    column="c_is_other_fire"    />
        <result property="cOtherFireContent"    column="c_other_fire_content"    />
        <result property="dIsSiteDemarcation"    column="d_is_site_demarcation"    />
        <result property="dSiteDemarcationContent"    column="d_site_demarcation_content"    />
        <result property="dSafeImplSign11"    column="d_safe_impl_sign11"    />
        <result property="dSafeImplDate11"    column="d_safe_impl_date11"    />
        <result property="dSafeLiftedSign11"    column="d_safe_lifted_sign11"    />
        <result property="dSafeLiftedDate11"    column="d_safe_lifted_date11"    />
        <result property="dIsCloseTrucks"    column="d_is_close_trucks"    />
        <result property="dSafeImplSign12"    column="d_safe_impl_sign12"    />
        <result property="dSafeImplDate12"    column="d_safe_impl_date12"    />
        <result property="dSafeLiftedSign12"    column="d_safe_lifted_sign12"    />
        <result property="dSafeLiftedDate12"    column="d_safe_lifted_date12"    />
        <result property="dIsTrucksDistance"    column="d_is_trucks_distance"    />
        <result property="dLowTrucksDistance"    column="d_low_trucks_distance"    />
        <result property="dSafeImplSign13"    column="d_safe_impl_sign13"    />
        <result property="dSafeImplDate13"    column="d_safe_impl_date13"    />
        <result property="dSafeLiftedSign13"    column="d_safe_lifted_sign13"    />
        <result property="dSafeLiftedDate13"    column="d_safe_lifted_date13"    />
        <result property="dIsLeakFlanges"    column="d_is_leak_flanges"    />
        <result property="dSafeImplSign14"    column="d_safe_impl_sign14"    />
        <result property="dSafeImplDate14"    column="d_safe_impl_date14"    />
        <result property="dIsOverlayPipe"    column="d_is_overlay_pipe"    />
        <result property="dSafeImplSign15"    column="d_safe_impl_sign15"    />
        <result property="dSafeImplDate15"    column="d_safe_impl_date15"    />
        <result property="dSafeLiftedSign15"    column="d_safe_lifted_sign15"    />
        <result property="dSafeLiftedDate15"    column="d_safe_lifted_date15"    />
        <result property="dIsRemoveCombustibles"    column="d_is_remove_combustibles"    />
        <result property="dSafeImplSign16"    column="d_safe_impl_sign16"    />
        <result property="dSafeImplDate16"    column="d_safe_impl_date16"    />
        <result property="dIsProvideFireExt"    column="d_is_provide_fire_ext"    />
        <result property="dSafeImplSign17"    column="d_safe_impl_sign17"    />
        <result property="dSafeImplDate17"    column="d_safe_impl_date17"    />
        <result property="dSafeLiftedSign17"    column="d_safe_lifted_sign17"    />
        <result property="dSafeLiftedDate17"    column="d_safe_lifted_date17"    />
        <result property="dIsFireConfirmForm"    column="d_is_fire_confirm_form"    />
        <result property="dSafeImplSign18"    column="d_safe_impl_sign18"    />
        <result property="dSafeImplDate18"    column="d_safe_impl_date18"    />
        <result property="dIsNaturalVen"    column="d_is_natural_ven"    />
        <result property="dNaturalVenContent"    column="d_natural_ven_content"    />
        <result property="dSafeImplSign21"    column="d_safe_impl_sign21"    />
        <result property="dSafeImplDate21"    column="d_safe_impl_date21"    />
        <result property="dSafeLiftedSign21"    column="d_safe_lifted_sign21"    />
        <result property="dSafeLiftedDate21"    column="d_safe_lifted_date21"    />
        <result property="dIsMecVen"    column="d_is_mec_ven"    />
        <result property="dMecVenContent"    column="d_mec_ven_content"    />
        <result property="dSafeImplSign22"    column="d_safe_impl_sign22"    />
        <result property="dSafeImplDate22"    column="d_safe_impl_date22"    />
        <result property="dSafeLiftedSign22"    column="d_safe_lifted_sign22"    />
        <result property="dSafeLiftedDate22"    column="d_safe_lifted_date22"    />
        <result property="dIsAnalyzeAir"    column="d_is_analyze_air"    />
        <result property="dAnalyzeAirContent"    column="d_analyze_air_content"    />
        <result property="dIsFloodWater"    column="d_is_flood_water"    />
        <result property="dSafeImplSign31"    column="d_safe_impl_sign31"    />
        <result property="dSafeImplDate31"    column="d_safe_impl_date31"    />
        <result property="dSafeLiftedSign31"    column="d_safe_lifted_sign31"    />
        <result property="dSafeLiftedDate31"    column="d_safe_lifted_date31"    />
        <result property="dIsProInertGas"    column="d_is_pro_inert_gas"    />
        <result property="dProInertGasContent"    column="d_pro_inert_gas_content"    />
        <result property="dSafeImplSign32"    column="d_safe_impl_sign32"    />
        <result property="dSafeImplDate32"    column="d_safe_impl_date32"    />
        <result property="dSafeLiftedSign32"    column="d_safe_lifted_sign32"    />
        <result property="dSafeLiftedDate32"    column="d_safe_lifted_date32"    />
        <result property="dIsCleanFlush"    column="d_is_clean_flush"    />
        <result property="dCleanFlushContent"    column="d_clean_flush_content"    />
        <result property="dSafeImplSign33"    column="d_safe_impl_sign33"    />
        <result property="dSafeImplDate33"    column="d_safe_impl_date33"    />
        <result property="dIsGasAnalysis"    column="d_is_gas_analysis"    />
        <result property="dGasAnalysisContent"    column="d_gas_analysis_content"    />
        <result property="dSafeImplSign34"    column="d_safe_impl_sign34"    />
        <result property="dSafeImplDate34"    column="d_safe_impl_date34"    />
        <result property="dIsCloseFireControl"    column="d_is_close_fire_control"    />
        <result property="dSafeImplSign41"    column="d_safe_impl_sign41"    />
        <result property="dSafeImplDate41"    column="d_safe_impl_date41"    />
        <result property="dSafeLiftedSign41"    column="d_safe_lifted_sign41"    />
        <result property="dSafeLiftedDate41"    column="d_safe_lifted_date41"    />
        <result property="dIsOtherMeasure"    column="d_is_other_measure"    />
        <result property="dOtherMeasureContent"    column="d_other_measure_content"    />
        <result property="dSafeImplSign42"    column="d_safe_impl_sign42"    />
        <result property="dSafeImplDate42"    column="d_safe_impl_date42"    />
        <result property="dSafeLiftedSign42"    column="d_safe_lifted_sign42"    />
        <result property="dSafeLiftedDate42"    column="d_safe_lifted_date42"    />
        <result property="dDangerSpaceOne"    column="d_danger_space_one"    />
        <result property="dDangerSpaceOneLeader"    column="d_danger_space_one_leader"    />
        <result property="dDangerSpaceOneOffice"    column="d_danger_space_one_office"    />
        <result property="dDangerSpaceOneTel"    column="d_danger_space_one_tel"    />
        <result property="dDangerSpaceOneItem"    column="d_danger_space_one_item"    />
        <result property="dDangerSpaceTwo"    column="d_danger_space_two"    />
        <result property="dDangerSpaceTwoLeader"    column="d_danger_space_two_leader"    />
        <result property="dDangerSpaceTwoOffice"    column="d_danger_space_two_office"    />
        <result property="dDangerSpaceTwoTel"    column="d_danger_space_two_tel"    />
        <result property="dDangerSpaceTwoItem"    column="d_danger_space_two_item"    />
        <result property="dDangerSpaceThree"    column="d_danger_space_three"    />
        <result property="dDangerSpaceThreeLeader"    column="d_danger_space_three_leader"    />
        <result property="dDangerSpaceThreeOffice"    column="d_danger_space_three_office"    />
        <result property="dDangerSpaceThreeTel"    column="d_danger_space_three_tel"    />
        <result property="dDangerSpaceThreeItem"    column="d_danger_space_three_item"    />
        <result property="dDangerSpaceFour"    column="d_danger_space_four"    />
        <result property="dDangerSpaceFourLeader"    column="d_danger_space_four_leader"    />
        <result property="dDangerSpaceFourOffice"    column="d_danger_space_four_office"    />
        <result property="dDangerSpaceFourTel"    column="d_danger_space_four_tel"    />
        <result property="dDangerSpaceFourItem"    column="d_danger_space_four_item"    />
        <result property="dDangerApproveSignOne"    column="d_danger_approve_sign_one"    />
        <result property="dDangerApproveDateOne"    column="d_danger_approve_date_one"    />
        <result property="dDangerApproveSignTwo"    column="d_danger_approve_sign_two"    />
        <result property="dDangerApproveDateTwo"    column="d_danger_approve_date_two"    />
        <result property="dDangerApproveSignThree"    column="d_danger_approve_sign_three"    />
        <result property="dDangerApproveDateThree"    column="d_danger_approve_date_three"    />
        <result property="dDangerApproveSignFour"    column="d_danger_approve_sign_four"    />
        <result property="dDangerApproveDateFour"    column="d_danger_approve_date_four"    />
        <result property="dIsSafeBriefing"    column="d_is_safe_briefing"    />
        <result property="dPartakeBriefingSign"    column="d_partake_briefing_sign"    />
        <result property="dPartakeBriefingDate"    column="d_partake_briefing_date"    />
        <result property="dNoReasonContent"    column="d_no_reason_content"    />
        <result property="eIsContineCheckAir"    column="e_is_contine_check_air"    />
        <result property="eIsKeepWet"    column="e_is_keep_wet"    />
        <result property="eIsCheckInertGasPro"    column="e_is_check_inert_gas_pro"    />
        <result property="eIsWaterPro"    column="e_is_water_pro"    />
        <result property="eIsFireWaterPipe"    column="e_is_fire_water_pipe"    />
        <result property="eIsProFireExt"    column="e_is_pro_fire_ext"    />
        <result property="eFireExtType"    column="e_fire_ext_type"    />
        <result property="eFireExtNum"    column="e_fire_ext_num"    />
        <result property="eIsFallArrest"    column="e_is_fall_arrest"    />
        <result property="eFallArrestContent"    column="e_fall_arrest_content"    />
        <result property="eIsWeldingMachine"    column="e_is_welding_machine"    />
        <result property="eIsOtherMeasure"    column="e_is_other_measure"    />
        <result property="eOtherMeasureContent"    column="e_other_measure_content"    />
        <result property="eIsContinueMonitoring"    column="e_is_continue_monitoring"    />
        <result property="eSafeAttendant"    column="e_safe_attendant"    />
        <result property="eSafeAttendantSign"    column="e_safe_attendant_sign"    />
        <result property="eIsNaturalVen"    column="e_is_natural_ven"    />
        <result property="eNaturalVenContent"    column="e_natural_ven_content"    />
        <result property="eIsMecVen"    column="e_is_mec_ven"    />
        <result property="eMecVenContent"    column="e_mec_ven_content"    />
        <result property="eIsExxtractDust"    column="e_is_exxtract_dust"    />
        <result property="eIsAnalyzeAir"    column="e_is_analyze_air"    />
        <result property="eAnalyzeAirContent"    column="e_analyze_air_content"    />
        <result property="eAnalyzeAirInterval"    column="e_analyze_air_interval"    />
        <result property="eIsOtherVen"    column="e_is_other_ven"    />
        <result property="eOtherVenContent"    column="e_other_ven_content"    />
        <result property="fIsFireEndCheck"    column="f_is_fire_end_check"    />
        <result property="fProfessional"    column="f_professional"    />
        <result property="fIsNoticeD"    column="f_is_notice_d"    />
        <result property="fNoticeOne"    column="f_notice_one"    />
        <result property="fNoticeTwo"    column="f_notice_two"    />
        <result property="fNoticeThree"    column="f_notice_three"    />
        <result property="fNoticeFour"    column="f_notice_four"    />
        <result property="fIsOtherSafeMeasures"    column="f_is_other_safe_measures"    />
        <result property="fOtherSafeMeasuresContent"    column="f_other_safe_measures_content"    />
        <result property="gFirstSign"    column="g_first_sign"    />
        <result property="gFirstDate"    column="g_first_date"    />
        <result property="gSecondSign"    column="g_second_sign"    />
        <result property="gSecondDate"    column="g_second_date"    />
        <result property="gThirdSign"    column="g_third_sign"    />
        <result property="gThirdDate"    column="g_third_date"    />
        <result property="gIsSpecialAssessment"    column="g_is_special_assessment"    />
        <result property="gSpecialAssessment"    column="g_special_assessment"    />
        <result property="hSafeMesSign"    column="h_safe_mes_sign"    />
        <result property="hSafeMesDate"    column="h_safe_mes_date"    />
        <result property="hVNoOne"    column="h_v_no_one"    />
        <result property="hVNoTwo"    column="h_v_no_two"    />
        <result property="hVNoThree"    column="h_v_no_three"    />
        <result property="iOneASign"    column="i_one_a_sign"    />
        <result property="iOneADate"    column="i_one_a_date"    />
        <result property="iOneBSign"    column="i_one_b_sign"    />
        <result property="iOneBDate"    column="i_one_b_date"    />
        <result property="kConfirmSign"    column="k_confirm_sign"    />
        <result property="kConfirmDate"    column="k_confirm_date"    />
        <result property="lNoticeSign"    column="l_notice_sign"    />
        <result property="lNoticeDate"    column="l_notice_date"    />
        <result property="mAssessDContent"    column="m_assess_d_content"    />
        <result property="mAssessDSign"    column="m_assess_d_sign"    />
        <result property="mAssessDDate"    column="m_assess_d_date"    />
        <result property="mOtherLicenceOne"    column="m_other_licence_one"    />
        <result property="mOtherLicenceTwo"    column="m_other_licence_two"    />
        <result property="mOtherLicenceThree"    column="m_other_licence_three"    />
        <result property="wordUrl"    column="word_url"    />
        <result property="pdfUrl"    column="pdf_url"    />
        <result property="deptName" column="dept_name" />
    </resultMap>

    <sql id="selectTFireWorkPermitVo">
        select d.h_id, d.a_equipment_name, d.a_equipment_leader, d.a_equipment_tel, d.a_equipment_office, d.a_construction_name, d.a_construction_leader, d.a_construction_tel, d.a_construction_office, d.a_contractor_name, d.a_contractor_leader, d.a_contractor_tel, d.a_contractor_office, d.a_is_need_safe_liaison, d.a_safe_liaison_name, d.a_safe_liaison_sign, d.a_safe_liaison_tel, d.a_safe_liaison_office, d.b_device_name, d.b_work_content, d.b_validity_start_time, d.b_validity_end_time,d.b_area_no, d.b_fire_work_grade, d.c_is_work_to_fire, d.c_is_work_to_blast, d.c_is_work_to_envir, d.c_is_device_to_blast, d.c_is_other_a, d.a_id, d.c_is_other_fire, d.c_other_fire_content, d.d_is_site_demarcation, d.d_site_demarcation_content, d.d_safe_impl_sign11, d.d_safe_impl_date11, d.d_safe_lifted_sign11, d.d_safe_lifted_date11, d.d_is_close_trucks, d.d_safe_impl_sign12, d.d_safe_impl_date12, d.d_safe_lifted_sign12, d.d_safe_lifted_date12, d.d_is_trucks_distance, d.d_low_trucks_distance, d.d_safe_impl_sign13, d.d_safe_impl_date13, d.d_safe_lifted_sign13, d.d_safe_lifted_date13, d.d_is_leak_flanges, d.d_safe_impl_sign14, d.d_safe_impl_date14, d.d_is_overlay_pipe, d.d_safe_impl_sign15, d.d_safe_impl_date15, d.d_safe_lifted_sign15
               , d.d_safe_lifted_date15, d.d_is_remove_combustibles, d.d_safe_impl_sign16, d.d_safe_impl_date16, d.d_is_provide_fire_ext, d.d_safe_impl_sign17, d.d_safe_impl_date17, d.d_safe_lifted_sign17, d.d_safe_lifted_date17, d.d_is_fire_confirm_form, d.d_safe_impl_sign18, d.d_safe_impl_date18, d.d_is_natural_ven, d.d_natural_ven_content, d.d_safe_impl_sign21, d.d_safe_impl_date21, d.d_safe_lifted_sign21, d.d_safe_lifted_date21, d.d_is_mec_ven, d.d_mec_ven_content, d.d_safe_impl_sign22, d.d_safe_impl_date22, d.d_safe_lifted_sign22, d.d_safe_lifted_date22, d.d_is_analyze_air, d.d_analyze_air_content, d.d_is_flood_water, d.d_safe_impl_sign31, d.d_safe_impl_date31, d.d_safe_lifted_sign31, d.d_safe_lifted_date31, d.d_is_pro_inert_gas, d.d_pro_inert_gas_content, d.d_safe_impl_sign32, d.d_safe_impl_date32, d.d_safe_lifted_sign32, d.d_safe_lifted_date32, d.d_is_clean_flush, d.d_clean_flush_content, d.d_safe_impl_sign33, d.d_safe_impl_date33, d.d_is_gas_analysis, d.d_gas_analysis_content, d.d_safe_impl_sign34, d.d_safe_impl_date34, d.d_is_close_fire_control, d.d_safe_impl_sign41, d.d_safe_impl_date41, d.d_safe_lifted_sign41, d.d_safe_lifted_date41, d.d_is_other_measure, d.d_other_measure_content, d.d_safe_impl_sign42, d.d_safe_impl_date42, d.d_safe_lifted_sign42, d.d_safe_lifted_date42, d.d_danger_space_one, d.d_danger_space_one_leader, d.d_danger_space_one_office, d.d_danger_space_one_tel, d.d_danger_space_one_item, d.d_danger_space_two, d.d_danger_space_two_leader, d.d_danger_space_two_office, d.d_danger_space_two_tel, d.d_danger_space_two_item, d.d_danger_space_three, d.d_danger_space_three_leader, d.d_danger_space_three_office, d.d_danger_space_three_tel, d.d_danger_space_three_item, d.d_danger_space_four, d.d_danger_space_four_leader, d.d_danger_space_four_office, d.d_danger_space_four_tel, d.d_danger_space_four_item, d.d_danger_approve_sign_one, d.d_danger_approve_date_one, d.d_danger_approve_sign_two, d.d_danger_approve_date_two, d.d_danger_approve_sign_three, d.d_danger_approve_date_three, d.d_danger_approve_sign_four, d.d_danger_approve_date_four, d.d_is_safe_briefing, d.d_partake_briefing_sign, d.d_partake_briefing_date, d.d_no_reason_content, d.e_is_contine_check_air, d.e_is_keep_wet, d.e_is_check_inert_gas_pro, d.e_is_water_pro
             , d.e_is_fire_water_pipe, d.e_is_pro_fire_ext, d.e_fire_ext_type, d.e_fire_ext_num, d.e_is_fall_arrest, d.e_fall_arrest_content, d.e_is_welding_machine, d.e_is_other_measure, d.e_other_measure_content, d.e_is_continue_monitoring, d.e_safe_attendant, d.e_safe_attendant_sign, d.e_is_natural_ven, d.e_natural_ven_content, d.e_is_mec_ven, d.e_mec_ven_content, d.e_is_exxtract_dust, d.e_is_analyze_air, d.e_analyze_air_content, d.e_analyze_air_interval, d.e_is_other_ven, d.e_other_ven_content, d.f_is_fire_end_check, d.f_professional, d.f_is_notice_d, d.f_notice_one, d.f_notice_two, d.f_notice_three, d.f_notice_four, d.f_is_other_safe_measures, d.f_other_safe_measures_content, d.g_first_sign, d.g_first_date, d.g_second_sign, d.g_second_date, d.g_third_sign, d.g_third_date, d.g_is_special_assessment, d.g_special_assessment, d.h_safe_mes_sign, d.h_safe_mes_date, d.h_v_no_one, d.h_v_no_two, d.h_v_no_three, d.i_one_a_sign, d.i_one_a_date, d.i_one_b_sign, d.i_one_b_date, d.k_confirm_sign, d.k_confirm_date, d.l_notice_sign, d.l_notice_date, d.m_assess_d_content, d.m_assess_d_sign, d.m_assess_d_date, d.m_other_licence_one, d.m_other_licence_two, d.m_other_licence_three, d.word_url, d.pdf_url from t_fire_work_permit d
    </sql>

    <select id="selectTFireWorkPermitList" parameterType="TFireWorkPermit" resultMap="TFireWorkPermitResult">
        <include refid="selectTFireWorkPermitVo"/>
        <where>
            <if test="aEquipmentName != null  and aEquipmentName != ''"> and a_equipment_name like concat(concat('%', #{aEquipmentName}), '%')</if>
            <if test="aEquipmentLeader != null  and aEquipmentLeader != ''"> and a_equipment_leader = #{aEquipmentLeader}</if>
            <if test="aEquipmentTel != null  and aEquipmentTel != ''"> and a_equipment_tel = #{aEquipmentTel}</if>
            <if test="aEquipmentOffice != null  and aEquipmentOffice != ''"> and a_equipment_office = #{aEquipmentOffice}</if>
            <if test="aConstructionName != null  and aConstructionName != ''"> and a_construction_name like concat(concat('%', #{aConstructionName}), '%')</if>
            <if test="aConstructionLeader != null  and aConstructionLeader != ''"> and a_construction_leader = #{aConstructionLeader}</if>
            <if test="aConstructionTel != null  and aConstructionTel != ''"> and a_construction_tel = #{aConstructionTel}</if>
            <if test="aConstructionOffice != null  and aConstructionOffice != ''"> and a_construction_office = #{aConstructionOffice}</if>
            <if test="aContractorName != null  and aContractorName != ''"> and a_contractor_name like concat(concat('%', #{aContractorName}), '%')</if>
            <if test="aContractorLeader != null  and aContractorLeader != ''"> and a_contractor_leader = #{aContractorLeader}</if>
            <if test="aContractorTel != null  and aContractorTel != ''"> and a_contractor_tel = #{aContractorTel}</if>
            <if test="aContractorOffice != null  and aContractorOffice != ''"> and a_contractor_office = #{aContractorOffice}</if>
            <if test="aIsNeedSafeLiaison != null "> and a_is_need_safe_liaison = #{aIsNeedSafeLiaison}</if>
            <if test="aSafeLiaisonName != null  and aSafeLiaisonName != ''"> and a_safe_liaison_name like concat(concat('%', #{aSafeLiaisonName}), '%')</if>
            <if test="aSafeLiaisonSign != null  and aSafeLiaisonSign != ''"> and a_safe_liaison_sign = #{aSafeLiaisonSign}</if>
            <if test="aSafeLiaisonTel != null  and aSafeLiaisonTel != ''"> and a_safe_liaison_tel = #{aSafeLiaisonTel}</if>
            <if test="aSafeLiaisonOffice != null  and aSafeLiaisonOffice != ''"> and a_safe_liaison_office = #{aSafeLiaisonOffice}</if>
            <if test="bDeviceName != null  and bDeviceName != ''"> and b_device_name like concat(concat('%', #{bDeviceName}), '%')</if>
            <if test="bWorkContent != null  and bWorkContent != ''"> and b_work_content = #{bWorkContent}</if>
            <if test="bValidityStartTime != null "> and b_validity_start_time = #{bValidityStartTime}</if>
            <if test="bValidityEndTime != null "> and b_validity_end_time = #{bValidityEndTime}</if>
            <if test="bFireWorkGrade != null "> and b_fire_work_grade = #{bFireWorkGrade}</if>
            <if test="cIsWorkToFire != null "> and c_is_work_to_fire = #{cIsWorkToFire}</if>
            <if test="cIsWorkToBlast != null "> and c_is_work_to_blast = #{cIsWorkToBlast}</if>
            <if test="cIsWorkToEnvir != null "> and c_is_work_to_envir = #{cIsWorkToEnvir}</if>
            <if test="cIsDeviceToBlast != null "> and c_is_device_to_blast = #{cIsDeviceToBlast}</if>
            <if test="cIsOtherA != null "> and c_is_other_a = #{cIsOtherA}</if>
            <if test="aId != null "> and a_id = #{aId}</if>
            <if test="cIsOtherFire != null "> and c_is_other_fire = #{cIsOtherFire}</if>
            <if test="cOtherFireContent != null  and cOtherFireContent != ''"> and c_other_fire_content = #{cOtherFireContent}</if>
            <if test="dIsSiteDemarcation != null "> and d_is_site_demarcation = #{dIsSiteDemarcation}</if>
            <if test="dSiteDemarcationContent != null  and dSiteDemarcationContent != ''"> and d_site_demarcation_content = #{dSiteDemarcationContent}</if>
            <if test="dSafeImplSign11 != null  and dSafeImplSign11 != ''"> and d_safe_impl_sign11 = #{dSafeImplSign11}</if>
            <if test="dSafeImplDate11 != null "> and d_safe_impl_date11 = #{dSafeImplDate11}</if>
            <if test="dSafeLiftedSign11 != null  and dSafeLiftedSign11 != ''"> and d_safe_lifted_sign11 = #{dSafeLiftedSign11}</if>
            <if test="dSafeLiftedDate11 != null "> and d_safe_lifted_date11 = #{dSafeLiftedDate11}</if>
            <if test="dIsCloseTrucks != null "> and d_is_close_trucks = #{dIsCloseTrucks}</if>
            <if test="dSafeImplSign12 != null  and dSafeImplSign12 != ''"> and d_safe_impl_sign12 = #{dSafeImplSign12}</if>
            <if test="dSafeImplDate12 != null "> and d_safe_impl_date12 = #{dSafeImplDate12}</if>
            <if test="dSafeLiftedSign12 != null  and dSafeLiftedSign12 != ''"> and d_safe_lifted_sign12 = #{dSafeLiftedSign12}</if>
            <if test="dSafeLiftedDate12 != null "> and d_safe_lifted_date12 = #{dSafeLiftedDate12}</if>
            <if test="dIsTrucksDistance != null "> and d_is_trucks_distance = #{dIsTrucksDistance}</if>
            <if test="dLowTrucksDistance != null  and dLowTrucksDistance != ''"> and d_low_trucks_distance = #{dLowTrucksDistance}</if>
            <if test="dSafeImplSign13 != null  and dSafeImplSign13 != ''"> and d_safe_impl_sign13 = #{dSafeImplSign13}</if>
            <if test="dSafeImplDate13 != null "> and d_safe_impl_date13 = #{dSafeImplDate13}</if>
            <if test="dSafeLiftedSign13 != null  and dSafeLiftedSign13 != ''"> and d_safe_lifted_sign13 = #{dSafeLiftedSign13}</if>
            <if test="dSafeLiftedDate13 != null "> and d_safe_lifted_date13 = #{dSafeLiftedDate13}</if>
            <if test="dIsLeakFlanges != null  and dIsLeakFlanges != ''"> and d_is_leak_flanges = #{dIsLeakFlanges}</if>
            <if test="dSafeImplSign14 != null  and dSafeImplSign14 != ''"> and d_safe_impl_sign14 = #{dSafeImplSign14}</if>
            <if test="dSafeImplDate14 != null "> and d_safe_impl_date14 = #{dSafeImplDate14}</if>
            <if test="dIsOverlayPipe != null "> and d_is_overlay_pipe = #{dIsOverlayPipe}</if>
            <if test="dSafeImplSign15 != null  and dSafeImplSign15 != ''"> and d_safe_impl_sign15 = #{dSafeImplSign15}</if>
            <if test="dSafeImplDate15 != null "> and d_safe_impl_date15 = #{dSafeImplDate15}</if>
            <if test="dSafeLiftedSign15 != null  and dSafeLiftedSign15 != ''"> and d_safe_lifted_sign15 = #{dSafeLiftedSign15}</if>
            <if test="dSafeLiftedDate15 != null "> and d_safe_lifted_date15 = #{dSafeLiftedDate15}</if>
            <if test="dIsRemoveCombustibles != null "> and d_is_remove_combustibles = #{dIsRemoveCombustibles}</if>
            <if test="dSafeImplSign16 != null  and dSafeImplSign16 != ''"> and d_safe_impl_sign16 = #{dSafeImplSign16}</if>
            <if test="dSafeImplDate16 != null "> and d_safe_impl_date16 = #{dSafeImplDate16}</if>
            <if test="dIsProvideFireExt != null "> and d_is_provide_fire_ext = #{dIsProvideFireExt}</if>
            <if test="dSafeImplSign17 != null  and dSafeImplSign17 != ''"> and d_safe_impl_sign17 = #{dSafeImplSign17}</if>
            <if test="dSafeImplDate17 != null "> and d_safe_impl_date17 = #{dSafeImplDate17}</if>
            <if test="dSafeLiftedSign17 != null  and dSafeLiftedSign17 != ''"> and d_safe_lifted_sign17 = #{dSafeLiftedSign17}</if>
            <if test="dSafeLiftedDate17 != null "> and d_safe_lifted_date17 = #{dSafeLiftedDate17}</if>
            <if test="dIsFireConfirmForm != null "> and d_is_fire_confirm_form = #{dIsFireConfirmForm}</if>
            <if test="dSafeImplSign18 != null  and dSafeImplSign18 != ''"> and d_safe_impl_sign18 = #{dSafeImplSign18}</if>
            <if test="dSafeImplDate18 != null "> and d_safe_impl_date18 = #{dSafeImplDate18}</if>
            <if test="dIsNaturalVen != null "> and d_is_natural_ven = #{dIsNaturalVen}</if>
            <if test="dNaturalVenContent != null  and dNaturalVenContent != ''"> and d_natural_ven_content = #{dNaturalVenContent}</if>
            <if test="dSafeImplSign21 != null  and dSafeImplSign21 != ''"> and d_safe_impl_sign21 = #{dSafeImplSign21}</if>
            <if test="dSafeImplDate21 != null "> and d_safe_impl_date21 = #{dSafeImplDate21}</if>
            <if test="dSafeLiftedSign21 != null  and dSafeLiftedSign21 != ''"> and d_safe_lifted_sign21 = #{dSafeLiftedSign21}</if>
            <if test="dSafeLiftedDate21 != null "> and d_safe_lifted_date21 = #{dSafeLiftedDate21}</if>
            <if test="dIsMecVen != null "> and d_is_mec_ven = #{dIsMecVen}</if>
            <if test="dMecVenContent != null  and dMecVenContent != ''"> and d_mec_ven_content = #{dMecVenContent}</if>
            <if test="dSafeImplSign22 != null  and dSafeImplSign22 != ''"> and d_safe_impl_sign22 = #{dSafeImplSign22}</if>
            <if test="dSafeImplDate22 != null "> and d_safe_impl_date22 = #{dSafeImplDate22}</if>
            <if test="dSafeLiftedSign22 != null  and dSafeLiftedSign22 != ''"> and d_safe_lifted_sign22 = #{dSafeLiftedSign22}</if>
            <if test="dSafeLiftedDate22 != null "> and d_safe_lifted_date22 = #{dSafeLiftedDate22}</if>
            <if test="dIsAnalyzeAir != null "> and d_is_analyze_air = #{dIsAnalyzeAir}</if>
            <if test="dAnalyzeAirContent != null  and dAnalyzeAirContent != ''"> and d_analyze_air_content = #{dAnalyzeAirContent}</if>
            <if test="dIsFloodWater != null "> and d_is_flood_water = #{dIsFloodWater}</if>
            <if test="dSafeImplSign31 != null  and dSafeImplSign31 != ''"> and d_safe_impl_sign31 = #{dSafeImplSign31}</if>
            <if test="dSafeImplDate31 != null "> and d_safe_impl_date31 = #{dSafeImplDate31}</if>
            <if test="dSafeLiftedSign31 != null  and dSafeLiftedSign31 != ''"> and d_safe_lifted_sign31 = #{dSafeLiftedSign31}</if>
            <if test="dSafeLiftedDate31 != null "> and d_safe_lifted_date31 = #{dSafeLiftedDate31}</if>
            <if test="dIsProInertGas != null "> and d_is_pro_inert_gas = #{dIsProInertGas}</if>
            <if test="dProInertGasContent != null  and dProInertGasContent != ''"> and d_pro_inert_gas_content = #{dProInertGasContent}</if>
            <if test="dSafeImplSign32 != null  and dSafeImplSign32 != ''"> and d_safe_impl_sign32 = #{dSafeImplSign32}</if>
            <if test="dSafeImplDate32 != null "> and d_safe_impl_date32 = #{dSafeImplDate32}</if>
            <if test="dSafeLiftedSign32 != null  and dSafeLiftedSign32 != ''"> and d_safe_lifted_sign32 = #{dSafeLiftedSign32}</if>
            <if test="dSafeLiftedDate32 != null "> and d_safe_lifted_date32 = #{dSafeLiftedDate32}</if>
            <if test="dIsCleanFlush != null "> and d_is_clean_flush = #{dIsCleanFlush}</if>
            <if test="dCleanFlushContent != null  and dCleanFlushContent != ''"> and d_clean_flush_content = #{dCleanFlushContent}</if>
            <if test="dSafeImplSign33 != null  and dSafeImplSign33 != ''"> and d_safe_impl_sign33 = #{dSafeImplSign33}</if>
            <if test="dSafeImplDate33 != null "> and d_safe_impl_date33 = #{dSafeImplDate33}</if>
            <if test="dIsGasAnalysis != null "> and d_is_gas_analysis = #{dIsGasAnalysis}</if>
            <if test="dGasAnalysisContent != null  and dGasAnalysisContent != ''"> and d_gas_analysis_content = #{dGasAnalysisContent}</if>
            <if test="dSafeImplSign34 != null  and dSafeImplSign34 != ''"> and d_safe_impl_sign34 = #{dSafeImplSign34}</if>
            <if test="dSafeImplDate34 != null "> and d_safe_impl_date34 = #{dSafeImplDate34}</if>
            <if test="dIsCloseFireControl!= null "> and d_is_close_fire_control= #{dIsCloseFireControl}</if>
            <if test="dSafeImplSign41 != null  and dSafeImplSign41 != ''"> and d_safe_impl_sign41 = #{dSafeImplSign41}</if>
            <if test="dSafeImplDate41 != null "> and d_safe_impl_date41 = #{dSafeImplDate41}</if>
            <if test="dSafeLiftedSign41 != null  and dSafeLiftedSign41 != ''"> and d_safe_lifted_sign41 = #{dSafeLiftedSign41}</if>
            <if test="dSafeLiftedDate41 != null "> and d_safe_lifted_date41 = #{dSafeLiftedDate41}</if>
            <if test="dIsOtherMeasure != null "> and d_is_other_measure = #{dIsOtherMeasure}</if>
            <if test="dOtherMeasureContent != null  and dOtherMeasureContent != ''"> and d_other_measure_content = #{dOtherMeasureContent}</if>
            <if test="dSafeImplSign42 != null  and dSafeImplSign42 != ''"> and d_safe_impl_sign42 = #{dSafeImplSign42}</if>
            <if test="dSafeImplDate42 != null "> and d_safe_impl_date42 = #{dSafeImplDate42}</if>
            <if test="dSafeLiftedSign42 != null  and dSafeLiftedSign42 != ''"> and d_safe_lifted_sign42 = #{dSafeLiftedSign42}</if>
            <if test="dSafeLiftedDate42 != null "> and d_safe_lifted_date42 = #{dSafeLiftedDate42}</if>
            <if test="dDangerSpaceOne != null  and dDangerSpaceOne != ''"> and d_danger_space_one = #{dDangerSpaceOne}</if>
            <if test="dDangerSpaceOneLeader != null  and dDangerSpaceOneLeader != ''"> and d_danger_space_one_leader = #{dDangerSpaceOneLeader}</if>
            <if test="dDangerSpaceOneOffice != null  and dDangerSpaceOneOffice != ''"> and d_danger_space_one_office = #{dDangerSpaceOneOffice}</if>
            <if test="dDangerSpaceOneTel != null  and dDangerSpaceOneTel != ''"> and d_danger_space_one_tel = #{dDangerSpaceOneTel}</if>
            <if test="dDangerSpaceOneItem != null  and dDangerSpaceOneItem != ''"> and d_danger_space_one_item = #{dDangerSpaceOneItem}</if>
            <if test="dDangerSpaceTwo != null  and dDangerSpaceTwo != ''"> and d_danger_space_two = #{dDangerSpaceTwo}</if>
            <if test="dDangerSpaceTwoLeader != null  and dDangerSpaceTwoLeader != ''"> and d_danger_space_two_leader = #{dDangerSpaceTwoLeader}</if>
            <if test="dDangerSpaceTwoOffice != null  and dDangerSpaceTwoOffice != ''"> and d_danger_space_two_office = #{dDangerSpaceTwoOffice}</if>
            <if test="dDangerSpaceTwoTel != null  and dDangerSpaceTwoTel != ''"> and d_danger_space_two_tel = #{dDangerSpaceTwoTel}</if>
            <if test="dDangerSpaceTwoItem != null  and dDangerSpaceTwoItem != ''"> and d_danger_space_two_item = #{dDangerSpaceTwoItem}</if>
            <if test="dDangerSpaceThree != null  and dDangerSpaceThree != ''"> and d_danger_space_three = #{dDangerSpaceThree}</if>
            <if test="dDangerSpaceThreeLeader != null  and dDangerSpaceThreeLeader != ''"> and d_danger_space_three_leader = #{dDangerSpaceThreeLeader}</if>
            <if test="dDangerSpaceThreeOffice != null  and dDangerSpaceThreeOffice != ''"> and d_danger_space_three_office = #{dDangerSpaceThreeOffice}</if>
            <if test="dDangerSpaceThreeTel != null  and dDangerSpaceThreeTel != ''"> and d_danger_space_three_tel = #{dDangerSpaceThreeTel}</if>
            <if test="dDangerSpaceThreeItem != null  and dDangerSpaceThreeItem != ''"> and d_danger_space_three_item = #{dDangerSpaceThreeItem}</if>
            <if test="dDangerSpaceFour != null  and dDangerSpaceFour != ''"> and d_danger_space_four = #{dDangerSpaceFour}</if>
            <if test="dDangerSpaceFourLeader != null  and dDangerSpaceFourLeader != ''"> and d_danger_space_four_leader = #{dDangerSpaceFourLeader}</if>
            <if test="dDangerSpaceFourOffice != null  and dDangerSpaceFourOffice != ''"> and d_danger_space_four_office = #{dDangerSpaceFourOffice}</if>
            <if test="dDangerSpaceFourTel != null  and dDangerSpaceFourTel != ''"> and d_danger_space_four_tel = #{dDangerSpaceFourTel}</if>
            <if test="dDangerSpaceFourItem != null  and dDangerSpaceFourItem != ''"> and d_danger_space_four_item = #{dDangerSpaceFourItem}</if>
            <if test="dDangerApproveSignOne != null  and dDangerApproveSignOne != ''"> and d_danger_approve_sign_one = #{dDangerApproveSignOne}</if>
            <if test="dDangerApproveDateOne != null "> and d_danger_approve_date_one = #{dDangerApproveDateOne}</if>
            <if test="dDangerApproveSignTwo != null  and dDangerApproveSignTwo != ''"> and d_danger_approve_sign_two = #{dDangerApproveSignTwo}</if>
            <if test="dDangerApproveDateTwo != null "> and d_danger_approve_date_two = #{dDangerApproveDateTwo}</if>
            <if test="dDangerApproveSignThree != null  and dDangerApproveSignThree != ''"> and d_danger_approve_sign_three = #{dDangerApproveSignThree}</if>
            <if test="dDangerApproveDateThree != null "> and d_danger_approve_date_three = #{dDangerApproveDateThree}</if>
            <if test="dDangerApproveSignFour != null  and dDangerApproveSignFour != ''"> and d_danger_approve_sign_four = #{dDangerApproveSignFour}</if>
            <if test="dDangerApproveDateFour != null "> and d_danger_approve_date_four = #{dDangerApproveDateFour}</if>
            <if test="dIsSafeBriefing != null "> and d_is_safe_briefing = #{dIsSafeBriefing}</if>
            <if test="dPartakeBriefingSign != null  and dPartakeBriefingSign != ''"> and d_partake_briefing_sign = #{dPartakeBriefingSign}</if>
            <if test="dPartakeBriefingDate != null "> and d_partake_briefing_date = #{dPartakeBriefingDate}</if>
            <if test="dNoReasonContent != null  and dNoReasonContent != ''"> and d_no_reason_content = #{dNoReasonContent}</if>
            <if test="eIsContineCheckAir != null "> and e_is_contine_check_air = #{eIsContineCheckAir}</if>
            <if test="eIsKeepWet != null "> and e_is_keep_wet = #{eIsKeepWet}</if>
            <if test="eIsCheckInertGasPro != null "> and e_is_check_inert_gas_pro = #{eIsCheckInertGasPro}</if>
            <if test="eIsWaterPro != null "> and e_is_water_pro = #{eIsWaterPro}</if>
            <if test="eIsFireWaterPipe!= null "> and e_is_fire_water_pipe= #{eIsFireWaterPipe}</if>
            <if test="eIsProFireExt != null "> and e_is_pro_fire_ext = #{eIsProFireExt}</if>
            <if test="eFireExtType != null  and eFireExtType != ''"> and e_fire_ext_type = #{eFireExtType}</if>
            <if test="eFireExtNum != null "> and e_fire_ext_num = #{eFireExtNum}</if>
            <if test="eIsFallArrest != null "> and e_is_fall_arrest = #{eIsFallArrest}</if>
            <if test="eFallArrestContent != null  and eFallArrestContent != ''"> and e_fall_arrest_content = #{eFallArrestContent}</if>
            <if test="eIsWeldingMachine != null "> and e_is_welding_machine = #{eIsWeldingMachine}</if>
            <if test="eIsOtherMeasure != null "> and e_is_other_measure = #{eIsOtherMeasure}</if>
            <if test="eOtherMeasureContent != null  and eOtherMeasureContent != ''"> and e_other_measure_content = #{eOtherMeasureContent}</if>
            <if test="eIsContinueMonitoring != null "> and e_is_continue_monitoring = #{eIsContinueMonitoring}</if>
            <if test="eSafeAttendant != null  and eSafeAttendant != ''"> and e_safe_attendant = #{eSafeAttendant}</if>
            <if test="eSafeAttendantSign != null  and eSafeAttendantSign != ''"> and e_safe_attendant_sign = #{eSafeAttendantSign}</if>
            <if test="eIsNaturalVen != null "> and e_is_natural_ven = #{eIsNaturalVen}</if>
            <if test="eNaturalVenContent != null  and eNaturalVenContent != ''"> and e_natural_ven_content = #{eNaturalVenContent}</if>
            <if test="eIsMecVen != null "> and e_is_mec_ven = #{eIsMecVen}</if>
            <if test="eMecVenContent != null  and eMecVenContent != ''"> and e_mec_ven_content = #{eMecVenContent}</if>
            <if test="eIsExxtractDust != null "> and e_is_exxtract_dust = #{eIsExxtractDust}</if>
            <if test="eIsAnalyzeAir != null "> and e_is_analyze_air = #{eIsAnalyzeAir}</if>
            <if test="eAnalyzeAirContent != null  and eAnalyzeAirContent != ''"> and e_analyze_air_content = #{eAnalyzeAirContent}</if>
            <if test="eAnalyzeAirInterval != null  and eAnalyzeAirInterval != ''"> and e_analyze_air_interval = #{eAnalyzeAirInterval}</if>
            <if test="eIsOtherVen != null "> and e_is_other_ven = #{eIsOtherVen}</if>
            <if test="eOtherVenContent != null  and eOtherVenContent != ''"> and e_other_ven_content = #{eOtherVenContent}</if>
            <if test="fIsFireEndCheck != null "> and f_is_fire_end_check = #{fIsFireEndCheck}</if>
            <if test="fProfessional != null  and fProfessional != ''"> and f_professional = #{fProfessional}</if>
            <if test="fIsNoticeD != null "> and f_is_notice_d = #{fIsNoticeD}</if>
            <if test="fNoticeOne != null  and fNoticeOne != ''"> and f_notice_one = #{fNoticeOne}</if>
            <if test="fNoticeTwo != null  and fNoticeTwo != ''"> and f_notice_two = #{fNoticeTwo}</if>
            <if test="fNoticeThree != null  and fNoticeThree != ''"> and f_notice_three = #{fNoticeThree}</if>
            <if test="fNoticeFour != null  and fNoticeFour != ''"> and f_notice_four = #{fNoticeFour}</if>
            <if test="fIsOtherSafeMeasures != null "> and f_is_other_safe_measures = #{fIsOtherSafeMeasures}</if>
            <if test="fOtherSafeMeasuresContent != null  and fOtherSafeMeasuresContent != ''"> and f_other_safe_measures_content = #{fOtherSafeMeasuresContent}</if>
            <if test="gFirstSign != null  and gFirstSign != ''"> and g_first_sign = #{gFirstSign}</if>
            <if test="gFirstDate != null "> and g_first_date = #{gFirstDate}</if>
            <if test="gSecondSign != null  and gSecondSign != ''"> and g_second_sign = #{gSecondSign}</if>
            <if test="gSecondDate != null "> and g_second_date = #{gSecondDate}</if>
            <if test="gThirdSign != null  and gThirdSign != ''"> and g_third_sign = #{gThirdSign}</if>
            <if test="gThirdDate != null "> and g_third_date = #{gThirdDate}</if>
            <if test="gIsSpecialAssessment != null "> and g_is_special_assessment = #{gIsSpecialAssessment}</if>
            <if test="gSpecialAssessment != null  and gSpecialAssessment != ''"> and g_special_assessment = #{gSpecialAssessment}</if>
            <if test="hSafeMesSign != null  and hSafeMesSign != ''"> and h_safe_mes_sign = #{hSafeMesSign}</if>
            <if test="hSafeMesDate != null "> and h_safe_mes_date = #{hSafeMesDate}</if>
            <if test="hVNoOne != null "> and h_v_no_one = #{hVNoOne}</if>
            <if test="hVNoTwo != null "> and h_v_no_two = #{hVNoTwo}</if>
            <if test="hVNoThree != null "> and h_v_no_three = #{hVNoThree}</if>
            <if test="iOneASign != null  and iOneASign != ''"> and i_one_a_sign = #{iOneASign}</if>
            <if test="iOneADate != null "> and i_one_a_date = #{iOneADate}</if>
            <if test="iOneBSign != null  and iOneBSign != ''"> and i_one_b_sign = #{iOneBSign}</if>
            <if test="iOneBDate != null "> and i_one_b_date = #{iOneBDate}</if>
            <if test="kConfirmSign != null  and kConfirmSign != ''"> and k_confirm_sign = #{kConfirmSign}</if>
            <if test="kConfirmDate != null "> and k_confirm_date = #{kConfirmDate}</if>
            <if test="lNoticeSign != null  and lNoticeSign != ''"> and l_notice_sign = #{lNoticeSign}</if>
            <if test="lNoticeDate != null "> and l_notice_date = #{lNoticeDate}</if>
            <if test="mAssessDContent != null  and mAssessDContent != ''"> and m_assess_d_content = #{mAssessDContent}</if>
            <if test="mAssessDSign != null  and mAssessDSign != ''"> and m_assess_d_sign = #{mAssessDSign}</if>
            <if test="mAssessDDate != null "> and m_assess_d_date = #{mAssessDDate}</if>
            <if test="mOtherLicenceOne != null  and mOtherLicenceOne != ''"> and m_other_licence_one = #{mOtherLicenceOne}</if>
            <if test="mOtherLicenceTwo != null  and mOtherLicenceTwo != ''"> and m_other_licence_two = #{mOtherLicenceTwo}</if>
            <if test="mOtherLicenceThree != null  and mOtherLicenceThree != ''"> and m_other_licence_three = #{mOtherLicenceThree}</if>
            <if test="wordUrl != null  and wordUrl != ''"> and word_url = #{wordUrl}</if>
            <if test="pdfUrl != null  and pdfUrl != ''"> and pdf_url = #{pdfUrl}</if>
            and d.del_flag = 0
        </where>
        <!-- 数据范围过滤 -->
        ${params.dataScope}
    </select>

    <select id="selectTFireWorkPermitById" parameterType="Long" resultMap="TFireWorkPermitResult">
        <include refid="selectTFireWorkPermitVo"/>
        where h_id = #{hId}
    </select>

    <insert id="insertTFireWorkPermit" parameterType="TFireWorkPermit">
     <!--<selectKey keyProperty="hId" resultType="long" order="BEFORE">
            SELECT seq_t_fire_work_permit.NEXTVAL as hId FROM DUAL
        </selectKey>-->
        insert into t_fire_work_permit
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="hId != null">h_id,</if>
            <if test="aEquipmentName != null">a_equipment_name,</if>
            <if test="aEquipmentLeader != null">a_equipment_leader,</if>
            <if test="aEquipmentTel != null">a_equipment_tel,</if>
            <if test="aEquipmentOffice != null">a_equipment_office,</if>
            <if test="aConstructionName != null">a_construction_name,</if>
            <if test="aConstructionLeader != null">a_construction_leader,</if>
            <if test="aConstructionTel != null">a_construction_tel,</if>
            <if test="aConstructionOffice != null">a_construction_office,</if>
            <if test="aContractorName != null">a_contractor_name,</if>
            <if test="aContractorLeader != null">a_contractor_leader,</if>
            <if test="aContractorTel != null">a_contractor_tel,</if>
            <if test="aContractorOffice != null">a_contractor_office,</if>
            <if test="aIsNeedSafeLiaison != null">a_is_need_safe_liaison,</if>
            <if test="aSafeLiaisonName != null">a_safe_liaison_name,</if>
            <if test="aSafeLiaisonSign != null">a_safe_liaison_sign,</if>
            <if test="aSafeLiaisonTel != null">a_safe_liaison_tel,</if>
            <if test="aSafeLiaisonOffice != null">a_safe_liaison_office,</if>
            <if test="bAreaNo != null">b_area_no,</if>
            <if test="bDeviceName != null">b_device_name,</if>
            <if test="bWorkContent != null">b_work_content,</if>
            <if test="bValidityStartTime != null">b_validity_start_time,</if>
            <if test="bValidityEndTime != null">b_validity_end_time,</if>
            <if test="bFireWorkGrade != null">b_fire_work_grade,</if>
            <if test="cIsWorkToFire != null">c_is_work_to_fire,</if>
            <if test="cIsWorkToBlast != null">c_is_work_to_blast,</if>
            <if test="cIsWorkToEnvir != null">c_is_work_to_envir,</if>
            <if test="cIsDeviceToBlast != null">c_is_device_to_blast,</if>
            <if test="cIsOtherA != null">c_is_other_a,</if>
            <if test="aId != null">a_id,</if>
            <if test="cIsOtherFire != null">c_is_other_fire,</if>
            <if test="cOtherFireContent != null">c_other_fire_content,</if>
            <if test="dIsSiteDemarcation != null">d_is_site_demarcation,</if>
            <if test="dSiteDemarcationContent != null">d_site_demarcation_content,</if>
            <if test="dSafeImplSign11 != null">d_safe_impl_sign11,</if>
            <if test="dSafeImplDate11 != null">d_safe_impl_date11,</if>
            <if test="dSafeLiftedSign11 != null">d_safe_lifted_sign11,</if>
            <if test="dSafeLiftedDate11 != null">d_safe_lifted_date11,</if>
            <if test="dIsCloseTrucks != null">d_is_close_trucks,</if>
            <if test="dSafeImplSign12 != null">d_safe_impl_sign12,</if>
            <if test="dSafeImplDate12 != null">d_safe_impl_date12,</if>
            <if test="dSafeLiftedSign12 != null">d_safe_lifted_sign12,</if>
            <if test="dSafeLiftedDate12 != null">d_safe_lifted_date12,</if>
            <if test="dIsTrucksDistance != null">d_is_trucks_distance,</if>
            <if test="dLowTrucksDistance != null">d_low_trucks_distance,</if>
            <if test="dSafeImplSign13 != null">d_safe_impl_sign13,</if>
            <if test="dSafeImplDate13 != null">d_safe_impl_date13,</if>
            <if test="dSafeLiftedSign13 != null">d_safe_lifted_sign13,</if>
            <if test="dSafeLiftedDate13 != null">d_safe_lifted_date13,</if>
            <if test="dIsLeakFlanges != null">d_is_leak_flanges,</if>
            <if test="dSafeImplSign14 != null">d_safe_impl_sign14,</if>
            <if test="dSafeImplDate14 != null">d_safe_impl_date14,</if>
            <if test="dIsOverlayPipe != null">d_is_overlay_pipe,</if>
            <if test="dSafeImplSign15 != null">d_safe_impl_sign15,</if>
            <if test="dSafeImplDate15 != null">d_safe_impl_date15,</if>
            <if test="dSafeLiftedSign15 != null">d_safe_lifted_sign15,</if>
            <if test="dSafeLiftedDate15 != null">d_safe_lifted_date15,</if>
            <if test="dIsRemoveCombustibles != null">d_is_remove_combustibles,</if>
            <if test="dSafeImplSign16 != null">d_safe_impl_sign16,</if>
            <if test="dSafeImplDate16 != null">d_safe_impl_date16,</if>
            <if test="dIsProvideFireExt != null">d_is_provide_fire_ext,</if>
            <if test="dSafeImplSign17 != null">d_safe_impl_sign17,</if>
            <if test="dSafeImplDate17 != null">d_safe_impl_date17,</if>
            <if test="dSafeLiftedSign17 != null">d_safe_lifted_sign17,</if>
            <if test="dSafeLiftedDate17 != null">d_safe_lifted_date17,</if>
            <if test="dIsFireConfirmForm != null">d_is_fire_confirm_form,</if>
            <if test="dSafeImplSign18 != null">d_safe_impl_sign18,</if>
            <if test="dSafeImplDate18 != null">d_safe_impl_date18,</if>
            <if test="dIsNaturalVen != null">d_is_natural_ven,</if>
            <if test="dNaturalVenContent != null">d_natural_ven_content,</if>
            <if test="dSafeImplSign21 != null">d_safe_impl_sign21,</if>
            <if test="dSafeImplDate21 != null">d_safe_impl_date21,</if>
            <if test="dSafeLiftedSign21 != null">d_safe_lifted_sign21,</if>
            <if test="dSafeLiftedDate21 != null">d_safe_lifted_date21,</if>
            <if test="dIsMecVen != null">d_is_mec_ven,</if>
            <if test="dMecVenContent != null">d_mec_ven_content,</if>
            <if test="dSafeImplSign22 != null">d_safe_impl_sign22,</if>
            <if test="dSafeImplDate22 != null">d_safe_impl_date22,</if>
            <if test="dSafeLiftedSign22 != null">d_safe_lifted_sign22,</if>
            <if test="dSafeLiftedDate22 != null">d_safe_lifted_date22,</if>
            <if test="dIsAnalyzeAir != null">d_is_analyze_air,</if>
            <if test="dAnalyzeAirContent != null">d_analyze_air_content,</if>
            <if test="dIsFloodWater != null">d_is_flood_water,</if>
            <if test="dSafeImplSign31 != null">d_safe_impl_sign31,</if>
            <if test="dSafeImplDate31 != null">d_safe_impl_date31,</if>
            <if test="dSafeLiftedSign31 != null">d_safe_lifted_sign31,</if>
            <if test="dSafeLiftedDate31 != null">d_safe_lifted_date31,</if>
            <if test="dIsProInertGas != null">d_is_pro_inert_gas,</if>
            <if test="dProInertGasContent != null">d_pro_inert_gas_content,</if>
            <if test="dSafeImplSign32 != null">d_safe_impl_sign32,</if>
            <if test="dSafeImplDate32 != null">d_safe_impl_date32,</if>
            <if test="dSafeLiftedSign32 != null">d_safe_lifted_sign32,</if>
            <if test="dSafeLiftedDate32 != null">d_safe_lifted_date32,</if>
            <if test="dIsCleanFlush != null">d_is_clean_flush,</if>
            <if test="dCleanFlushContent != null">d_clean_flush_content,</if>
            <if test="dSafeImplSign33 != null">d_safe_impl_sign33,</if>
            <if test="dSafeImplDate33 != null">d_safe_impl_date33,</if>
            <if test="dIsGasAnalysis != null">d_is_gas_analysis,</if>
            <if test="dGasAnalysisContent != null">d_gas_analysis_content,</if>
            <if test="dSafeImplSign34 != null">d_safe_impl_sign34,</if>
            <if test="dSafeImplDate34 != null">d_safe_impl_date34,</if>
            <if test="dIsCloseFireControl!= null">d_is_close_fire_control,</if>
            <if test="dSafeImplSign41 != null">d_safe_impl_sign41,</if>
            <if test="dSafeImplDate41 != null">d_safe_impl_date41,</if>
            <if test="dSafeLiftedSign41 != null">d_safe_lifted_sign41,</if>
            <if test="dSafeLiftedDate41 != null">d_safe_lifted_date41,</if>
            <if test="dIsOtherMeasure != null">d_is_other_measure,</if>
            <if test="dOtherMeasureContent != null">d_other_measure_content,</if>
            <if test="dSafeImplSign42 != null">d_safe_impl_sign42,</if>
            <if test="dSafeImplDate42 != null">d_safe_impl_date42,</if>
            <if test="dSafeLiftedSign42 != null">d_safe_lifted_sign42,</if>
            <if test="dSafeLiftedDate42 != null">d_safe_lifted_date42,</if>
            <if test="dDangerSpaceOne != null">d_danger_space_one,</if>
            <if test="dDangerSpaceOneLeader != null">d_danger_space_one_leader,</if>
            <if test="dDangerSpaceOneOffice != null">d_danger_space_one_office,</if>
            <if test="dDangerSpaceOneTel != null">d_danger_space_one_tel,</if>
            <if test="dDangerSpaceOneItem != null">d_danger_space_one_item,</if>
            <if test="dDangerSpaceTwo != null">d_danger_space_two,</if>
            <if test="dDangerSpaceTwoLeader != null">d_danger_space_two_leader,</if>
            <if test="dDangerSpaceTwoOffice != null">d_danger_space_two_office,</if>
            <if test="dDangerSpaceTwoTel != null">d_danger_space_two_tel,</if>
            <if test="dDangerSpaceTwoItem != null">d_danger_space_two_item,</if>
            <if test="dDangerSpaceThree != null">d_danger_space_three,</if>
            <if test="dDangerSpaceThreeLeader != null">d_danger_space_three_leader,</if>
            <if test="dDangerSpaceThreeOffice != null">d_danger_space_three_office,</if>
            <if test="dDangerSpaceThreeTel != null">d_danger_space_three_tel,</if>
            <if test="dDangerSpaceThreeItem != null">d_danger_space_three_item,</if>
            <if test="dDangerSpaceFour != null">d_danger_space_four,</if>
            <if test="dDangerSpaceFourLeader != null">d_danger_space_four_leader,</if>
            <if test="dDangerSpaceFourOffice != null">d_danger_space_four_office,</if>
            <if test="dDangerSpaceFourTel != null">d_danger_space_four_tel,</if>
            <if test="dDangerSpaceFourItem != null">d_danger_space_four_item,</if>
            <if test="dDangerApproveSignOne != null">d_danger_approve_sign_one,</if>
            <if test="dDangerApproveDateOne != null">d_danger_approve_date_one,</if>
            <if test="dDangerApproveSignTwo != null">d_danger_approve_sign_two,</if>
            <if test="dDangerApproveDateTwo != null">d_danger_approve_date_two,</if>
            <if test="dDangerApproveSignThree != null">d_danger_approve_sign_three,</if>
            <if test="dDangerApproveDateThree != null">d_danger_approve_date_three,</if>
            <if test="dDangerApproveSignFour != null">d_danger_approve_sign_four,</if>
            <if test="dDangerApproveDateFour != null">d_danger_approve_date_four,</if>
            <if test="dIsSafeBriefing != null">d_is_safe_briefing,</if>
            <if test="dPartakeBriefingSign != null">d_partake_briefing_sign,</if>
            <if test="dPartakeBriefingDate != null">d_partake_briefing_date,</if>
            <if test="dNoReasonContent != null">d_no_reason_content,</if>
            <if test="eIsContineCheckAir != null">e_is_contine_check_air,</if>
            <if test="eIsKeepWet != null">e_is_keep_wet,</if>
            <if test="eIsCheckInertGasPro != null">e_is_check_inert_gas_pro,</if>
            <if test="eIsWaterPro != null">e_is_water_pro,</if>
            <if test="eIsFireWaterPipe!= null">e_is_fire_water_pipe,</if>
            <if test="eIsProFireExt != null">e_is_pro_fire_ext,</if>
            <if test="eFireExtType != null">e_fire_ext_type,</if>
            <if test="eFireExtNum != null">e_fire_ext_num,</if>
            <if test="eIsFallArrest != null">e_is_fall_arrest,</if>
            <if test="eFallArrestContent != null">e_fall_arrest_content,</if>
            <if test="eIsWeldingMachine != null">e_is_welding_machine,</if>
            <if test="eIsOtherMeasure != null">e_is_other_measure,</if>
            <if test="eOtherMeasureContent != null">e_other_measure_content,</if>
            <if test="eIsContinueMonitoring != null">e_is_continue_monitoring,</if>
            <if test="eSafeAttendant != null">e_safe_attendant,</if>
            <if test="eSafeAttendantSign != null">e_safe_attendant_sign,</if>
            <if test="eIsNaturalVen != null">e_is_natural_ven,</if>
            <if test="eNaturalVenContent != null">e_natural_ven_content,</if>
            <if test="eIsMecVen != null">e_is_mec_ven,</if>
            <if test="eMecVenContent != null">e_mec_ven_content,</if>
            <if test="eIsExxtractDust != null">e_is_exxtract_dust,</if>
            <if test="eIsAnalyzeAir != null">e_is_analyze_air,</if>
            <if test="eAnalyzeAirContent != null">e_analyze_air_content,</if>
            <if test="eAnalyzeAirInterval != null">e_analyze_air_interval,</if>
            <if test="eIsOtherVen != null">e_is_other_ven,</if>
            <if test="eOtherVenContent != null">e_other_ven_content,</if>
            <if test="fIsFireEndCheck != null">f_is_fire_end_check,</if>
            <if test="fProfessional != null">f_professional,</if>
            <if test="fIsNoticeD != null">f_is_notice_d,</if>
            <if test="fNoticeOne != null">f_notice_one,</if>
            <if test="fNoticeTwo != null">f_notice_two,</if>
            <if test="fNoticeThree != null">f_notice_three,</if>
            <if test="fNoticeFour != null">f_notice_four,</if>
            <if test="fIsOtherSafeMeasures != null">f_is_other_safe_measures,</if>
            <if test="fOtherSafeMeasuresContent != null">f_other_safe_measures_content,</if>
            <if test="gFirstSign != null">g_first_sign,</if>
            <if test="gFirstDate != null">g_first_date,</if>
            <if test="gSecondSign != null">g_second_sign,</if>
            <if test="gSecondDate != null">g_second_date,</if>
            <if test="gThirdSign != null">g_third_sign,</if>
            <if test="gThirdDate != null">g_third_date,</if>
            <if test="gIsSpecialAssessment != null">g_is_special_assessment,</if>
            <if test="gSpecialAssessment != null">g_special_assessment,</if>
            <if test="hSafeMesSign != null">h_safe_mes_sign,</if>
            <if test="hSafeMesDate != null">h_safe_mes_date,</if>
            <if test="hVNoOne != null">h_v_no_one,</if>
            <if test="hVNoTwo != null">h_v_no_two,</if>
            <if test="hVNoThree != null">h_v_no_three,</if>
            <if test="iOneASign != null">i_one_a_sign,</if>
            <if test="iOneADate != null">i_one_a_date,</if>
            <if test="iOneBSign != null">i_one_b_sign,</if>
            <if test="iOneBDate != null">i_one_b_date,</if>
            <if test="kConfirmSign != null">k_confirm_sign,</if>
            <if test="kConfirmDate != null">k_confirm_date,</if>
            <if test="lNoticeSign != null">l_notice_sign,</if>
            <if test="lNoticeDate != null">l_notice_date,</if>
            <if test="mAssessDContent != null">m_assess_d_content,</if>
            <if test="mAssessDSign != null">m_assess_d_sign,</if>
            <if test="mAssessDDate != null">m_assess_d_date,</if>
            <if test="mOtherLicenceOne != null">m_other_licence_one,</if>
            <if test="mOtherLicenceTwo != null">m_other_licence_two,</if>
            <if test="mOtherLicenceThree != null">m_other_licence_three,</if>
            <if test="wordUrl != null">word_url,</if>
            <if test="pdfUrl != null">pdf_url,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="hId != null">#{hId},</if>
            <if test="aEquipmentName != null">#{aEquipmentName},</if>
            <if test="aEquipmentLeader != null">#{aEquipmentLeader},</if>
            <if test="aEquipmentTel != null">#{aEquipmentTel},</if>
            <if test="aEquipmentOffice != null">#{aEquipmentOffice},</if>
            <if test="aConstructionName != null">#{aConstructionName},</if>
            <if test="aConstructionLeader != null">#{aConstructionLeader},</if>
            <if test="aConstructionTel != null">#{aConstructionTel},</if>
            <if test="aConstructionOffice != null">#{aConstructionOffice},</if>
            <if test="aContractorName != null">#{aContractorName},</if>
            <if test="aContractorLeader != null">#{aContractorLeader},</if>
            <if test="aContractorTel != null">#{aContractorTel},</if>
            <if test="aContractorOffice != null">#{aContractorOffice},</if>
            <if test="aIsNeedSafeLiaison != null">#{aIsNeedSafeLiaison},</if>
            <if test="aSafeLiaisonName != null">#{aSafeLiaisonName},</if>
            <if test="aSafeLiaisonSign != null">#{aSafeLiaisonSign},</if>
            <if test="aSafeLiaisonTel != null">#{aSafeLiaisonTel},</if>
            <if test="aSafeLiaisonOffice != null">#{aSafeLiaisonOffice},</if>
            <if test="bAreaNo != null">#{bAreaNo},</if>
            <if test="bDeviceName != null">#{bDeviceName},</if>
            <if test="bWorkContent != null">#{bWorkContent},</if>
            <if test="bValidityStartTime != null">#{bValidityStartTime},</if>
            <if test="bValidityEndTime != null">#{bValidityEndTime},</if>
            <if test="bFireWorkGrade != null">#{bFireWorkGrade},</if>
            <if test="cIsWorkToFire != null">#{cIsWorkToFire},</if>
            <if test="cIsWorkToBlast != null">#{cIsWorkToBlast},</if>
            <if test="cIsWorkToEnvir != null">#{cIsWorkToEnvir},</if>
            <if test="cIsDeviceToBlast != null">#{cIsDeviceToBlast},</if>
            <if test="cIsOtherA != null">#{cIsOtherA},</if>
            <if test="aId != null">#{aId},</if>
            <if test="cIsOtherFire != null">#{cIsOtherFire},</if>
            <if test="cOtherFireContent != null">#{cOtherFireContent},</if>
            <if test="dIsSiteDemarcation != null">#{dIsSiteDemarcation},</if>
            <if test="dSiteDemarcationContent != null">#{dSiteDemarcationContent},</if>
            <if test="dSafeImplSign11 != null">#{dSafeImplSign11},</if>
            <if test="dSafeImplDate11 != null">#{dSafeImplDate11},</if>
            <if test="dSafeLiftedSign11 != null">#{dSafeLiftedSign11},</if>
            <if test="dSafeLiftedDate11 != null">#{dSafeLiftedDate11},</if>
            <if test="dIsCloseTrucks != null">#{dIsCloseTrucks},</if>
            <if test="dSafeImplSign12 != null">#{dSafeImplSign12},</if>
            <if test="dSafeImplDate12 != null">#{dSafeImplDate12},</if>
            <if test="dSafeLiftedSign12 != null">#{dSafeLiftedSign12},</if>
            <if test="dSafeLiftedDate12 != null">#{dSafeLiftedDate12},</if>
            <if test="dIsTrucksDistance != null">#{dIsTrucksDistance},</if>
            <if test="dLowTrucksDistance != null">#{dLowTrucksDistance},</if>
            <if test="dSafeImplSign13 != null">#{dSafeImplSign13},</if>
            <if test="dSafeImplDate13 != null">#{dSafeImplDate13},</if>
            <if test="dSafeLiftedSign13 != null">#{dSafeLiftedSign13},</if>
            <if test="dSafeLiftedDate13 != null">#{dSafeLiftedDate13},</if>
            <if test="dIsLeakFlanges != null">#{dIsLeakFlanges},</if>
            <if test="dSafeImplSign14 != null">#{dSafeImplSign14},</if>
            <if test="dSafeImplDate14 != null">#{dSafeImplDate14},</if>
            <if test="dIsOverlayPipe != null">#{dIsOverlayPipe},</if>
            <if test="dSafeImplSign15 != null">#{dSafeImplSign15},</if>
            <if test="dSafeImplDate15 != null">#{dSafeImplDate15},</if>
            <if test="dSafeLiftedSign15 != null">#{dSafeLiftedSign15},</if>
            <if test="dSafeLiftedDate15 != null">#{dSafeLiftedDate15},</if>
            <if test="dIsRemoveCombustibles != null">#{dIsRemoveCombustibles},</if>
            <if test="dSafeImplSign16 != null">#{dSafeImplSign16},</if>
            <if test="dSafeImplDate16 != null">#{dSafeImplDate16},</if>
            <if test="dIsProvideFireExt != null">#{dIsProvideFireExt},</if>
            <if test="dSafeImplSign17 != null">#{dSafeImplSign17},</if>
            <if test="dSafeImplDate17 != null">#{dSafeImplDate17},</if>
            <if test="dSafeLiftedSign17 != null">#{dSafeLiftedSign17},</if>
            <if test="dSafeLiftedDate17 != null">#{dSafeLiftedDate17},</if>
            <if test="dIsFireConfirmForm != null">#{dIsFireConfirmForm},</if>
            <if test="dSafeImplSign18 != null">#{dSafeImplSign18},</if>
            <if test="dSafeImplDate18 != null">#{dSafeImplDate18},</if>
            <if test="dIsNaturalVen != null">#{dIsNaturalVen},</if>
            <if test="dNaturalVenContent != null">#{dNaturalVenContent},</if>
            <if test="dSafeImplSign21 != null">#{dSafeImplSign21},</if>
            <if test="dSafeImplDate21 != null">#{dSafeImplDate21},</if>
            <if test="dSafeLiftedSign21 != null">#{dSafeLiftedSign21},</if>
            <if test="dSafeLiftedDate21 != null">#{dSafeLiftedDate21},</if>
            <if test="dIsMecVen != null">#{dIsMecVen},</if>
            <if test="dMecVenContent != null">#{dMecVenContent},</if>
            <if test="dSafeImplSign22 != null">#{dSafeImplSign22},</if>
            <if test="dSafeImplDate22 != null">#{dSafeImplDate22},</if>
            <if test="dSafeLiftedSign22 != null">#{dSafeLiftedSign22},</if>
            <if test="dSafeLiftedDate22 != null">#{dSafeLiftedDate22},</if>
            <if test="dIsAnalyzeAir != null">#{dIsAnalyzeAir},</if>
            <if test="dAnalyzeAirContent != null">#{dAnalyzeAirContent},</if>
            <if test="dIsFloodWater != null">#{dIsFloodWater},</if>
            <if test="dSafeImplSign31 != null">#{dSafeImplSign31},</if>
            <if test="dSafeImplDate31 != null">#{dSafeImplDate31},</if>
            <if test="dSafeLiftedSign31 != null">#{dSafeLiftedSign31},</if>
            <if test="dSafeLiftedDate31 != null">#{dSafeLiftedDate31},</if>
            <if test="dIsProInertGas != null">#{dIsProInertGas},</if>
            <if test="dProInertGasContent != null">#{dProInertGasContent},</if>
            <if test="dSafeImplSign32 != null">#{dSafeImplSign32},</if>
            <if test="dSafeImplDate32 != null">#{dSafeImplDate32},</if>
            <if test="dSafeLiftedSign32 != null">#{dSafeLiftedSign32},</if>
            <if test="dSafeLiftedDate32 != null">#{dSafeLiftedDate32},</if>
            <if test="dIsCleanFlush != null">#{dIsCleanFlush},</if>
            <if test="dCleanFlushContent != null">#{dCleanFlushContent},</if>
            <if test="dSafeImplSign33 != null">#{dSafeImplSign33},</if>
            <if test="dSafeImplDate33 != null">#{dSafeImplDate33},</if>
            <if test="dIsGasAnalysis != null">#{dIsGasAnalysis},</if>
            <if test="dGasAnalysisContent != null">#{dGasAnalysisContent},</if>
            <if test="dSafeImplSign34 != null">#{dSafeImplSign34},</if>
            <if test="dSafeImplDate34 != null">#{dSafeImplDate34},</if>
            <if test="dIsCloseFireControl!= null">#{dIsCloseFireControl},</if>
            <if test="dSafeImplSign41 != null">#{dSafeImplSign41},</if>
            <if test="dSafeImplDate41 != null">#{dSafeImplDate41},</if>
            <if test="dSafeLiftedSign41 != null">#{dSafeLiftedSign41},</if>
            <if test="dSafeLiftedDate41 != null">#{dSafeLiftedDate41},</if>
            <if test="dIsOtherMeasure != null">#{dIsOtherMeasure},</if>
            <if test="dOtherMeasureContent != null">#{dOtherMeasureContent},</if>
            <if test="dSafeImplSign42 != null">#{dSafeImplSign42},</if>
            <if test="dSafeImplDate42 != null">#{dSafeImplDate42},</if>
            <if test="dSafeLiftedSign42 != null">#{dSafeLiftedSign42},</if>
            <if test="dSafeLiftedDate42 != null">#{dSafeLiftedDate42},</if>
            <if test="dDangerSpaceOne != null">#{dDangerSpaceOne},</if>
            <if test="dDangerSpaceOneLeader != null">#{dDangerSpaceOneLeader},</if>
            <if test="dDangerSpaceOneOffice != null">#{dDangerSpaceOneOffice},</if>
            <if test="dDangerSpaceOneTel != null">#{dDangerSpaceOneTel},</if>
            <if test="dDangerSpaceOneItem != null">#{dDangerSpaceOneItem},</if>
            <if test="dDangerSpaceTwo != null">#{dDangerSpaceTwo},</if>
            <if test="dDangerSpaceTwoLeader != null">#{dDangerSpaceTwoLeader},</if>
            <if test="dDangerSpaceTwoOffice != null">#{dDangerSpaceTwoOffice},</if>
            <if test="dDangerSpaceTwoTel != null">#{dDangerSpaceTwoTel},</if>
            <if test="dDangerSpaceTwoItem != null">#{dDangerSpaceTwoItem},</if>
            <if test="dDangerSpaceThree != null">#{dDangerSpaceThree},</if>
            <if test="dDangerSpaceThreeLeader != null">#{dDangerSpaceThreeLeader},</if>
            <if test="dDangerSpaceThreeOffice != null">#{dDangerSpaceThreeOffice},</if>
            <if test="dDangerSpaceThreeTel != null">#{dDangerSpaceThreeTel},</if>
            <if test="dDangerSpaceThreeItem != null">#{dDangerSpaceThreeItem},</if>
            <if test="dDangerSpaceFour != null">#{dDangerSpaceFour},</if>
            <if test="dDangerSpaceFourLeader != null">#{dDangerSpaceFourLeader},</if>
            <if test="dDangerSpaceFourOffice != null">#{dDangerSpaceFourOffice},</if>
            <if test="dDangerSpaceFourTel != null">#{dDangerSpaceFourTel},</if>
            <if test="dDangerSpaceFourItem != null">#{dDangerSpaceFourItem},</if>
            <if test="dDangerApproveSignOne != null">#{dDangerApproveSignOne},</if>
            <if test="dDangerApproveDateOne != null">#{dDangerApproveDateOne},</if>
            <if test="dDangerApproveSignTwo != null">#{dDangerApproveSignTwo},</if>
            <if test="dDangerApproveDateTwo != null">#{dDangerApproveDateTwo},</if>
            <if test="dDangerApproveSignThree != null">#{dDangerApproveSignThree},</if>
            <if test="dDangerApproveDateThree != null">#{dDangerApproveDateThree},</if>
            <if test="dDangerApproveSignFour != null">#{dDangerApproveSignFour},</if>
            <if test="dDangerApproveDateFour != null">#{dDangerApproveDateFour},</if>
            <if test="dIsSafeBriefing != null">#{dIsSafeBriefing},</if>
            <if test="dPartakeBriefingSign != null">#{dPartakeBriefingSign},</if>
            <if test="dPartakeBriefingDate != null">#{dPartakeBriefingDate},</if>
            <if test="dNoReasonContent != null">#{dNoReasonContent},</if>
            <if test="eIsContineCheckAir != null">#{eIsContineCheckAir},</if>
            <if test="eIsKeepWet != null">#{eIsKeepWet},</if>
            <if test="eIsCheckInertGasPro != null">#{eIsCheckInertGasPro},</if>
            <if test="eIsWaterPro != null">#{eIsWaterPro},</if>
            <if test="eIsFireWaterPipe!= null">#{eIsFireWaterPipe},</if>
            <if test="eIsProFireExt != null">#{eIsProFireExt},</if>
            <if test="eFireExtType != null">#{eFireExtType},</if>
            <if test="eFireExtNum != null">#{eFireExtNum},</if>
            <if test="eIsFallArrest != null">#{eIsFallArrest},</if>
            <if test="eFallArrestContent != null">#{eFallArrestContent},</if>
            <if test="eIsWeldingMachine != null">#{eIsWeldingMachine},</if>
            <if test="eIsOtherMeasure != null">#{eIsOtherMeasure},</if>
            <if test="eOtherMeasureContent != null">#{eOtherMeasureContent},</if>
            <if test="eIsContinueMonitoring != null">#{eIsContinueMonitoring},</if>
            <if test="eSafeAttendant != null">#{eSafeAttendant},</if>
            <if test="eSafeAttendantSign != null">#{eSafeAttendantSign},</if>
            <if test="eIsNaturalVen != null">#{eIsNaturalVen},</if>
            <if test="eNaturalVenContent != null">#{eNaturalVenContent},</if>
            <if test="eIsMecVen != null">#{eIsMecVen},</if>
            <if test="eMecVenContent != null">#{eMecVenContent},</if>
            <if test="eIsExxtractDust != null">#{eIsExxtractDust},</if>
            <if test="eIsAnalyzeAir != null">#{eIsAnalyzeAir},</if>
            <if test="eAnalyzeAirContent != null">#{eAnalyzeAirContent},</if>
            <if test="eAnalyzeAirInterval != null">#{eAnalyzeAirInterval},</if>
            <if test="eIsOtherVen != null">#{eIsOtherVen},</if>
            <if test="eOtherVenContent != null">#{eOtherVenContent},</if>
            <if test="fIsFireEndCheck != null">#{fIsFireEndCheck},</if>
            <if test="fProfessional != null">#{fProfessional},</if>
            <if test="fIsNoticeD != null">#{fIsNoticeD},</if>
            <if test="fNoticeOne != null">#{fNoticeOne},</if>
            <if test="fNoticeTwo != null">#{fNoticeTwo},</if>
            <if test="fNoticeThree != null">#{fNoticeThree},</if>
            <if test="fNoticeFour != null">#{fNoticeFour},</if>
            <if test="fIsOtherSafeMeasures != null">#{fIsOtherSafeMeasures},</if>
            <if test="fOtherSafeMeasuresContent != null">#{fOtherSafeMeasuresContent},</if>
            <if test="gFirstSign != null">#{gFirstSign},</if>
            <if test="gFirstDate != null">#{gFirstDate},</if>
            <if test="gSecondSign != null">#{gSecondSign},</if>
            <if test="gSecondDate != null">#{gSecondDate},</if>
            <if test="gThirdSign != null">#{gThirdSign},</if>
            <if test="gThirdDate != null">#{gThirdDate},</if>
            <if test="gIsSpecialAssessment != null">#{gIsSpecialAssessment},</if>
            <if test="gSpecialAssessment != null">#{gSpecialAssessment},</if>
            <if test="hSafeMesSign != null">#{hSafeMesSign},</if>
            <if test="hSafeMesDate != null">#{hSafeMesDate},</if>
            <if test="hVNoOne != null">#{hVNoOne},</if>
            <if test="hVNoTwo != null">#{hVNoTwo},</if>
            <if test="hVNoThree != null">#{hVNoThree},</if>
            <if test="iOneASign != null">#{iOneASign},</if>
            <if test="iOneADate != null">#{iOneADate},</if>
            <if test="iOneBSign != null">#{iOneBSign},</if>
            <if test="iOneBDate != null">#{iOneBDate},</if>
            <if test="kConfirmSign != null">#{kConfirmSign},</if>
            <if test="kConfirmDate != null">#{kConfirmDate},</if>
            <if test="lNoticeSign != null">#{lNoticeSign},</if>
            <if test="lNoticeDate != null">#{lNoticeDate},</if>
            <if test="mAssessDContent != null">#{mAssessDContent},</if>
            <if test="mAssessDSign != null">#{mAssessDSign},</if>
            <if test="mAssessDDate != null">#{mAssessDDate},</if>
            <if test="mOtherLicenceOne != null">#{mOtherLicenceOne},</if>
            <if test="mOtherLicenceTwo != null">#{mOtherLicenceTwo},</if>
            <if test="mOtherLicenceThree != null">#{mOtherLicenceThree},</if>
            <if test="wordUrl != null">#{wordUrl},</if>
            <if test="pdfUrl != null">#{pdfUrl},</if>
         </trim>
    </insert>

    <update id="updateTFireWorkPermit" parameterType="TFireWorkPermit">
        update t_fire_work_permit
        <trim prefix="SET" suffixOverrides=",">
            <if test="aEquipmentName != null">a_equipment_name = #{aEquipmentName},</if>
            <if test="aEquipmentLeader != null">a_equipment_leader = #{aEquipmentLeader},</if>
            <if test="aEquipmentTel != null">a_equipment_tel = #{aEquipmentTel},</if>
            <if test="aEquipmentOffice != null">a_equipment_office = #{aEquipmentOffice},</if>
            <if test="aConstructionName != null">a_construction_name = #{aConstructionName},</if>
            <if test="aConstructionLeader != null">a_construction_leader = #{aConstructionLeader},</if>
            <if test="aConstructionTel != null">a_construction_tel = #{aConstructionTel},</if>
            <if test="aConstructionOffice != null">a_construction_office = #{aConstructionOffice},</if>
            <if test="aContractorName != null">a_contractor_name = #{aContractorName},</if>
            <if test="aContractorLeader != null">a_contractor_leader = #{aContractorLeader},</if>
            <if test="aContractorTel != null">a_contractor_tel = #{aContractorTel},</if>
            <if test="aContractorOffice != null">a_contractor_office = #{aContractorOffice},</if>
            <if test="aIsNeedSafeLiaison != null">a_is_need_safe_liaison = #{aIsNeedSafeLiaison},</if>
            <if test="aSafeLiaisonName != null">a_safe_liaison_name = #{aSafeLiaisonName},</if>
            <if test="aSafeLiaisonSign != null">a_safe_liaison_sign = #{aSafeLiaisonSign},</if>
            <if test="aSafeLiaisonTel != null">a_safe_liaison_tel = #{aSafeLiaisonTel},</if>
            <if test="aSafeLiaisonOffice != null">a_safe_liaison_office = #{aSafeLiaisonOffice},</if>
            <if test="bDeviceName != null">b_device_name = #{bDeviceName},</if>
            <if test="bWorkContent != null">b_work_content = #{bWorkContent},</if>
            <if test="bValidityStartTime != null">b_validity_start_time = #{bValidityStartTime},</if>
            <if test="bValidityEndTime != null">b_validity_end_time = #{bValidityEndTime},</if>
            <if test="bFireWorkGrade != null">b_fire_work_grade = #{bFireWorkGrade},</if>
            <if test="bAreaNo != null">b_area_no = #{bAreaNo},</if>
            <if test="cIsWorkToFire != null">c_is_work_to_fire = #{cIsWorkToFire},</if>
            <if test="cIsWorkToBlast != null">c_is_work_to_blast = #{cIsWorkToBlast},</if>
            <if test="cIsWorkToEnvir != null">c_is_work_to_envir = #{cIsWorkToEnvir},</if>
            <if test="cIsDeviceToBlast != null">c_is_device_to_blast = #{cIsDeviceToBlast},</if>
            <if test="cIsOtherA != null">c_is_other_a = #{cIsOtherA},</if>
            <if test="aId != null">a_id = #{aId},</if>
            <if test="cIsOtherFire != null">c_is_other_fire = #{cIsOtherFire},</if>
            <if test="cOtherFireContent != null">c_other_fire_content = #{cOtherFireContent},</if>
            <if test="dIsSiteDemarcation != null">d_is_site_demarcation = #{dIsSiteDemarcation},</if>
            <if test="dSiteDemarcationContent != null">d_site_demarcation_content = #{dSiteDemarcationContent},</if>
            <if test="dSafeImplSign11 != null">d_safe_impl_sign11 = #{dSafeImplSign11},</if>
            <if test="dSafeImplDate11 != null">d_safe_impl_date11 = #{dSafeImplDate11},</if>
            <if test="dSafeLiftedSign11 != null">d_safe_lifted_sign11 = #{dSafeLiftedSign11},</if>
            <if test="dSafeLiftedDate11 != null">d_safe_lifted_date11 = #{dSafeLiftedDate11},</if>
            <if test="dIsCloseTrucks != null">d_is_close_trucks = #{dIsCloseTrucks},</if>
            <if test="dSafeImplSign12 != null">d_safe_impl_sign12 = #{dSafeImplSign12},</if>
            <if test="dSafeImplDate12 != null">d_safe_impl_date12 = #{dSafeImplDate12},</if>
            <if test="dSafeLiftedSign12 != null">d_safe_lifted_sign12 = #{dSafeLiftedSign12},</if>
            <if test="dSafeLiftedDate12 != null">d_safe_lifted_date12 = #{dSafeLiftedDate12},</if>
            <if test="dIsTrucksDistance != null">d_is_trucks_distance = #{dIsTrucksDistance},</if>
            <if test="dLowTrucksDistance != null">d_low_trucks_distance = #{dLowTrucksDistance},</if>
            <if test="dSafeImplSign13 != null">d_safe_impl_sign13 = #{dSafeImplSign13},</if>
            <if test="dSafeImplDate13 != null">d_safe_impl_date13 = #{dSafeImplDate13},</if>
            <if test="dSafeLiftedSign13 != null">d_safe_lifted_sign13 = #{dSafeLiftedSign13},</if>
            <if test="dSafeLiftedDate13 != null">d_safe_lifted_date13 = #{dSafeLiftedDate13},</if>
            <if test="dIsLeakFlanges != null">d_is_leak_flanges = #{dIsLeakFlanges},</if>
            <if test="dSafeImplSign14 != null">d_safe_impl_sign14 = #{dSafeImplSign14},</if>
            <if test="dSafeImplDate14 != null">d_safe_impl_date14 = #{dSafeImplDate14},</if>
            <if test="dIsOverlayPipe != null">d_is_overlay_pipe = #{dIsOverlayPipe},</if>
            <if test="dSafeImplSign15 != null">d_safe_impl_sign15 = #{dSafeImplSign15},</if>
            <if test="dSafeImplDate15 != null">d_safe_impl_date15 = #{dSafeImplDate15},</if>
            <if test="dSafeLiftedSign15 != null">d_safe_lifted_sign15 = #{dSafeLiftedSign15},</if>
            <if test="dSafeLiftedDate15 != null">d_safe_lifted_date15 = #{dSafeLiftedDate15},</if>
            <if test="dIsRemoveCombustibles != null">d_is_remove_combustibles = #{dIsRemoveCombustibles},</if>
            <if test="dSafeImplSign16 != null">d_safe_impl_sign16 = #{dSafeImplSign16},</if>
            <if test="dSafeImplDate16 != null">d_safe_impl_date16 = #{dSafeImplDate16},</if>
            <if test="dIsProvideFireExt != null">d_is_provide_fire_ext = #{dIsProvideFireExt},</if>
            <if test="dSafeImplSign17 != null">d_safe_impl_sign17 = #{dSafeImplSign17},</if>
            <if test="dSafeImplDate17 != null">d_safe_impl_date17 = #{dSafeImplDate17},</if>
            <if test="dSafeLiftedSign17 != null">d_safe_lifted_sign17 = #{dSafeLiftedSign17},</if>
            <if test="dSafeLiftedDate17 != null">d_safe_lifted_date17 = #{dSafeLiftedDate17},</if>
            <if test="dIsFireConfirmForm != null">d_is_fire_confirm_form = #{dIsFireConfirmForm},</if>
            <if test="dSafeImplSign18 != null">d_safe_impl_sign18 = #{dSafeImplSign18},</if>
            <if test="dSafeImplDate18 != null">d_safe_impl_date18 = #{dSafeImplDate18},</if>
            <if test="dIsNaturalVen != null">d_is_natural_ven = #{dIsNaturalVen},</if>
            <if test="dNaturalVenContent != null">d_natural_ven_content = #{dNaturalVenContent},</if>
            <if test="dSafeImplSign21 != null">d_safe_impl_sign21 = #{dSafeImplSign21},</if>
            <if test="dSafeImplDate21 != null">d_safe_impl_date21 = #{dSafeImplDate21},</if>
            <if test="dSafeLiftedSign21 != null">d_safe_lifted_sign21 = #{dSafeLiftedSign21},</if>
            <if test="dSafeLiftedDate21 != null">d_safe_lifted_date21 = #{dSafeLiftedDate21},</if>
            <if test="dIsMecVen != null">d_is_mec_ven = #{dIsMecVen},</if>
            <if test="dMecVenContent != null">d_mec_ven_content = #{dMecVenContent},</if>
            <if test="dSafeImplSign22 != null">d_safe_impl_sign22 = #{dSafeImplSign22},</if>
            <if test="dSafeImplDate22 != null">d_safe_impl_date22 = #{dSafeImplDate22},</if>
            <if test="dSafeLiftedSign22 != null">d_safe_lifted_sign22 = #{dSafeLiftedSign22},</if>
            <if test="dSafeLiftedDate22 != null">d_safe_lifted_date22 = #{dSafeLiftedDate22},</if>
            <if test="dIsAnalyzeAir != null">d_is_analyze_air = #{dIsAnalyzeAir},</if>
            <if test="dAnalyzeAirContent != null">d_analyze_air_content = #{dAnalyzeAirContent},</if>
            <if test="dIsFloodWater != null">d_is_flood_water = #{dIsFloodWater},</if>
            <if test="dSafeImplSign31 != null">d_safe_impl_sign31 = #{dSafeImplSign31},</if>
            <if test="dSafeImplDate31 != null">d_safe_impl_date31 = #{dSafeImplDate31},</if>
            <if test="dSafeLiftedSign31 != null">d_safe_lifted_sign31 = #{dSafeLiftedSign31},</if>
            <if test="dSafeLiftedDate31 != null">d_safe_lifted_date31 = #{dSafeLiftedDate31},</if>
            <if test="dIsProInertGas != null">d_is_pro_inert_gas = #{dIsProInertGas},</if>
            <if test="dProInertGasContent != null">d_pro_inert_gas_content = #{dProInertGasContent},</if>
            <if test="dSafeImplSign32 != null">d_safe_impl_sign32 = #{dSafeImplSign32},</if>
            <if test="dSafeImplDate32 != null">d_safe_impl_date32 = #{dSafeImplDate32},</if>
            <if test="dSafeLiftedSign32 != null">d_safe_lifted_sign32 = #{dSafeLiftedSign32},</if>
            <if test="dSafeLiftedDate32 != null">d_safe_lifted_date32 = #{dSafeLiftedDate32},</if>
            <if test="dIsCleanFlush != null">d_is_clean_flush = #{dIsCleanFlush},</if>
            <if test="dCleanFlushContent != null">d_clean_flush_content = #{dCleanFlushContent},</if>
            <if test="dSafeImplSign33 != null">d_safe_impl_sign33 = #{dSafeImplSign33},</if>
            <if test="dSafeImplDate33 != null">d_safe_impl_date33 = #{dSafeImplDate33},</if>
            <if test="dIsGasAnalysis != null">d_is_gas_analysis = #{dIsGasAnalysis},</if>
            <if test="dGasAnalysisContent != null">d_gas_analysis_content = #{dGasAnalysisContent},</if>
            <if test="dSafeImplSign34 != null">d_safe_impl_sign34 = #{dSafeImplSign34},</if>
            <if test="dSafeImplDate34 != null">d_safe_impl_date34 = #{dSafeImplDate34},</if>
            <if test="dIsCloseFireControl!= null">d_is_close_fire_control= #{dIsCloseFireControl},</if>
            <if test="dSafeImplSign41 != null">d_safe_impl_sign41 = #{dSafeImplSign41},</if>
            <if test="dSafeImplDate41 != null">d_safe_impl_date41 = #{dSafeImplDate41},</if>
            <if test="dSafeLiftedSign41 != null">d_safe_lifted_sign41 = #{dSafeLiftedSign41},</if>
            <if test="dSafeLiftedDate41 != null">d_safe_lifted_date41 = #{dSafeLiftedDate41},</if>
            <if test="dIsOtherMeasure != null">d_is_other_measure = #{dIsOtherMeasure},</if>
            <if test="dOtherMeasureContent != null">d_other_measure_content = #{dOtherMeasureContent},</if>
            <if test="dSafeImplSign42 != null">d_safe_impl_sign42 = #{dSafeImplSign42},</if>
            <if test="dSafeImplDate42 != null">d_safe_impl_date42 = #{dSafeImplDate42},</if>
            <if test="dSafeLiftedSign42 != null">d_safe_lifted_sign42 = #{dSafeLiftedSign42},</if>
            <if test="dSafeLiftedDate42 != null">d_safe_lifted_date42 = #{dSafeLiftedDate42},</if>
            <if test="dDangerSpaceOne != null">d_danger_space_one = #{dDangerSpaceOne},</if>
            <if test="dDangerSpaceOneLeader != null">d_danger_space_one_leader = #{dDangerSpaceOneLeader},</if>
            <if test="dDangerSpaceOneOffice != null">d_danger_space_one_office = #{dDangerSpaceOneOffice},</if>
            <if test="dDangerSpaceOneTel != null">d_danger_space_one_tel = #{dDangerSpaceOneTel},</if>
            <if test="dDangerSpaceOneItem != null">d_danger_space_one_item = #{dDangerSpaceOneItem},</if>
            <if test="dDangerSpaceTwo != null">d_danger_space_two = #{dDangerSpaceTwo},</if>
            <if test="dDangerSpaceTwoLeader != null">d_danger_space_two_leader = #{dDangerSpaceTwoLeader},</if>
            <if test="dDangerSpaceTwoOffice != null">d_danger_space_two_office = #{dDangerSpaceTwoOffice},</if>
            <if test="dDangerSpaceTwoTel != null">d_danger_space_two_tel = #{dDangerSpaceTwoTel},</if>
            <if test="dDangerSpaceTwoItem != null">d_danger_space_two_item = #{dDangerSpaceTwoItem},</if>
            <if test="dDangerSpaceThree != null">d_danger_space_three = #{dDangerSpaceThree},</if>
            <if test="dDangerSpaceThreeLeader != null">d_danger_space_three_leader = #{dDangerSpaceThreeLeader},</if>
            <if test="dDangerSpaceThreeOffice != null">d_danger_space_three_office = #{dDangerSpaceThreeOffice},</if>
            <if test="dDangerSpaceThreeTel != null">d_danger_space_three_tel = #{dDangerSpaceThreeTel},</if>
            <if test="dDangerSpaceThreeItem != null">d_danger_space_three_item = #{dDangerSpaceThreeItem},</if>
            <if test="dDangerSpaceFour != null">d_danger_space_four = #{dDangerSpaceFour},</if>
            <if test="dDangerSpaceFourLeader != null">d_danger_space_four_leader = #{dDangerSpaceFourLeader},</if>
            <if test="dDangerSpaceFourOffice != null">d_danger_space_four_office = #{dDangerSpaceFourOffice},</if>
            <if test="dDangerSpaceFourTel != null">d_danger_space_four_tel = #{dDangerSpaceFourTel},</if>
            <if test="dDangerSpaceFourItem != null">d_danger_space_four_item = #{dDangerSpaceFourItem},</if>
            <if test="dDangerApproveSignOne != null">d_danger_approve_sign_one = #{dDangerApproveSignOne},</if>
            <if test="dDangerApproveDateOne != null">d_danger_approve_date_one = #{dDangerApproveDateOne},</if>
            <if test="dDangerApproveSignTwo != null">d_danger_approve_sign_two = #{dDangerApproveSignTwo},</if>
            <if test="dDangerApproveDateTwo != null">d_danger_approve_date_two = #{dDangerApproveDateTwo},</if>
            <if test="dDangerApproveSignThree != null">d_danger_approve_sign_three = #{dDangerApproveSignThree},</if>
            <if test="dDangerApproveDateThree != null">d_danger_approve_date_three = #{dDangerApproveDateThree},</if>
            <if test="dDangerApproveSignFour != null">d_danger_approve_sign_four = #{dDangerApproveSignFour},</if>
            <if test="dDangerApproveDateFour != null">d_danger_approve_date_four = #{dDangerApproveDateFour},</if>
            <if test="dIsSafeBriefing != null">d_is_safe_briefing = #{dIsSafeBriefing},</if>
            <if test="dPartakeBriefingSign != null">d_partake_briefing_sign = #{dPartakeBriefingSign},</if>
            <if test="dPartakeBriefingDate != null">d_partake_briefing_date = #{dPartakeBriefingDate},</if>
            <if test="dNoReasonContent != null">d_no_reason_content = #{dNoReasonContent},</if>
            <if test="eIsContineCheckAir != null">e_is_contine_check_air = #{eIsContineCheckAir},</if>
            <if test="eIsKeepWet != null">e_is_keep_wet = #{eIsKeepWet},</if>
            <if test="eIsCheckInertGasPro != null">e_is_check_inert_gas_pro = #{eIsCheckInertGasPro},</if>
            <if test="eIsWaterPro != null">e_is_water_pro = #{eIsWaterPro},</if>
            <if test="eIsFireWaterPipe!= null">e_is_fire_water_pipe = #{eIsFireWaterPipe},</if>
            <if test="eIsProFireExt != null">e_is_pro_fire_ext = #{eIsProFireExt},</if>
            <if test="eFireExtType != null">e_fire_ext_type = #{eFireExtType},</if>
            <if test="eFireExtNum != null">e_fire_ext_num = #{eFireExtNum},</if>
            <if test="eIsFallArrest != null">e_is_fall_arrest = #{eIsFallArrest},</if>
            <if test="eFallArrestContent != null">e_fall_arrest_content = #{eFallArrestContent},</if>
            <if test="eIsWeldingMachine != null">e_is_welding_machine = #{eIsWeldingMachine},</if>
            <if test="eIsOtherMeasure != null">e_is_other_measure = #{eIsOtherMeasure},</if>
            <if test="eOtherMeasureContent != null">e_other_measure_content = #{eOtherMeasureContent},</if>
            <if test="eIsContinueMonitoring != null">e_is_continue_monitoring = #{eIsContinueMonitoring},</if>
            <if test="eSafeAttendant != null">e_safe_attendant = #{eSafeAttendant},</if>
            <if test="eSafeAttendantSign != null">e_safe_attendant_sign = #{eSafeAttendantSign},</if>
            <if test="eIsNaturalVen != null">e_is_natural_ven = #{eIsNaturalVen},</if>
            <if test="eNaturalVenContent != null">e_natural_ven_content = #{eNaturalVenContent},</if>
            <if test="eIsMecVen != null">e_is_mec_ven = #{eIsMecVen},</if>
            <if test="eMecVenContent != null">e_mec_ven_content = #{eMecVenContent},</if>
            <if test="eIsExxtractDust != null">e_is_exxtract_dust = #{eIsExxtractDust},</if>
            <if test="eIsAnalyzeAir != null">e_is_analyze_air = #{eIsAnalyzeAir},</if>
            <if test="eAnalyzeAirContent != null">e_analyze_air_content = #{eAnalyzeAirContent},</if>
            <if test="eAnalyzeAirInterval != null">e_analyze_air_interval = #{eAnalyzeAirInterval},</if>
            <if test="eIsOtherVen != null">e_is_other_ven = #{eIsOtherVen},</if>
            <if test="eOtherVenContent != null">e_other_ven_content = #{eOtherVenContent},</if>
            <if test="fIsFireEndCheck != null">f_is_fire_end_check = #{fIsFireEndCheck},</if>
            <if test="fProfessional != null">f_professional = #{fProfessional},</if>
            <if test="fIsNoticeD != null">f_is_notice_d = #{fIsNoticeD},</if>
            <if test="fNoticeOne != null">f_notice_one = #{fNoticeOne},</if>
            <if test="fNoticeTwo != null">f_notice_two = #{fNoticeTwo},</if>
            <if test="fNoticeThree != null">f_notice_three = #{fNoticeThree},</if>
            <if test="fNoticeFour != null">f_notice_four = #{fNoticeFour},</if>
            <if test="fIsOtherSafeMeasures != null">f_is_other_safe_measures = #{fIsOtherSafeMeasures},</if>
            <if test="fOtherSafeMeasuresContent != null">f_other_safe_measures_content = #{fOtherSafeMeasuresContent},</if>
            <if test="gFirstSign != null">g_first_sign = #{gFirstSign},</if>
            <if test="gFirstDate != null">g_first_date = #{gFirstDate},</if>
            <if test="gSecondSign != null">g_second_sign = #{gSecondSign},</if>
            <if test="gSecondDate != null">g_second_date = #{gSecondDate},</if>
            <if test="gThirdSign != null">g_third_sign = #{gThirdSign},</if>
            <if test="gThirdDate != null">g_third_date = #{gThirdDate},</if>
            <if test="gIsSpecialAssessment != null">g_is_special_assessment = #{gIsSpecialAssessment},</if>
            <if test="gSpecialAssessment != null">g_special_assessment = #{gSpecialAssessment},</if>
            <if test="hSafeMesSign != null">h_safe_mes_sign = #{hSafeMesSign},</if>
            <if test="hSafeMesDate != null">h_safe_mes_date = #{hSafeMesDate},</if>
            <if test="hVNoOne != null">h_v_no_one = #{hVNoOne},</if>
            <if test="hVNoTwo != null">h_v_no_two = #{hVNoTwo},</if>
            <if test="hVNoThree != null">h_v_no_three = #{hVNoThree},</if>
            <if test="iOneASign != null">i_one_a_sign = #{iOneASign},</if>
            <if test="iOneADate != null">i_one_a_date = #{iOneADate},</if>
            <if test="iOneBSign != null">i_one_b_sign = #{iOneBSign},</if>
            <if test="iOneBDate != null">i_one_b_date = #{iOneBDate},</if>
            <if test="kConfirmSign != null">k_confirm_sign = #{kConfirmSign},</if>
            <if test="kConfirmDate != null">k_confirm_date = #{kConfirmDate},</if>
            <if test="lNoticeSign != null">l_notice_sign = #{lNoticeSign},</if>
            <if test="lNoticeDate != null">l_notice_date = #{lNoticeDate},</if>
            <if test="mAssessDContent != null">m_assess_d_content = #{mAssessDContent},</if>
            <if test="mAssessDSign != null">m_assess_d_sign = #{mAssessDSign},</if>
            <if test="mAssessDDate != null">m_assess_d_date = #{mAssessDDate},</if>
            <if test="mOtherLicenceOne != null">m_other_licence_one = #{mOtherLicenceOne},</if>
            <if test="mOtherLicenceTwo != null">m_other_licence_two = #{mOtherLicenceTwo},</if>
            <if test="mOtherLicenceThree != null">m_other_licence_three = #{mOtherLicenceThree},</if>
            <if test="wordUrl != null">word_url = #{wordUrl},</if>
            <if test="pdfUrl != null">pdf_url = #{pdfUrl},</if>
        </trim>
        where h_id = #{hId}
    </update>

    <update id="deleteTFireWorkPermitById" parameterType="Long">
        update t_fire_work_permit set del_flag = 2 where h_id = #{hId}
    </update>

    <update id="deleteTFireWorkPermitByIds" parameterType="String">
        update t_fire_work_permit set del_flag = 2 where h_id in
        <foreach item="hId" collection="array" open="(" separator="," close=")">
            #{hId}
        </foreach>
    </update>

</mapper>
