<?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.THazardWorkPermitMapper">

    <resultMap type="THazardWorkPermit" id="THazardWorkPermitResult">
        <result property="aId" column="a_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="bDeviceWork" column="b_device_work"/>
        <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="cHarmMatterName" column="c_harm_matter_name"/>
        <result property="cIsDanger" column="c_is_danger"/>
        <result property="cIsAttention" column="c_is_attention"/>
        <result property="cIsToxic" column="c_is_toxic"/>
        <result property="cIsFlammable" column="c_is_flammable"/>
        <result property="cIsOxidizing" column="c_is_oxidizing"/>
        <result property="cIsExplosive" column="c_is_explosive"/>
        <result property="cIsCorrosive" column="c_is_corrosive"/>
        <result property="cIsIrritantToxic" column="c_is_irritant_toxic"/>
        <result property="cIsHealthHazard" column="c_is_health_hazard"/>
        <result property="cIsCompressedGas" column="c_is_compressed_gas"/>
        <result property="cIsEnvironmentalHazard" column="c_is_environmental_hazard"/>
        <result property="cIsHighTemp" column="c_is_high_temp"/>
        <result property="cIsLowTemp" column="c_is_low_temp"/>
        <result property="cIsPosPressure" column="c_is_pos_pressure"/>
        <result property="cIsNegPressure" column="c_is_neg_pressure"/>
        <result property="cIsMovingParts" column="c_is_moving_parts"/>
        <result property="cIsHotSurfaces" column="c_is_hot_surfaces"/>
        <result property="cIsColdSurfaces" column="c_is_cold_surfaces"/>
        <result property="cIsVoltages" column="c_is_voltages"/>
        <result property="cIsWorkProtective" column="c_is_work_protective"/>
        <result property="cIsOtherDanger" column="c_is_other_danger"/>
        <result property="cOtherDangerContent" column="c_other_danger_content"/>
        <result property="cIsHazardsProd" column="c_is_hazards_prod"/>
        <result property="cIsHazardsProdContent" column="c_is_hazards_prod_content"/>
        <result property="cIsDy" column="c_is_dy"/>
        <result property="cIsAqf" column="c_is_aqf"/>
        <result property="cIsLq" column="c_is_lq"/>
        <result property="cIsFire" column="c_is_fire"/>
        <result property="cHId" column="c_h_id"/>
        <result property="bAreaNo" column="b_area_no"/>
        <result property="dIsOpenSafe" column="d_is_open_safe"/>
        <result property="dIsDisFeeder" column="d_is_dis_feeder"/>
        <result property="dIsBreakIncl" column="d_is_break_incl"/>
        <result property="dBreakInclContent" column="d_break_incl_content"/>
        <result property="dEleCircuitNo" column="d_ele_circuit_no"/>
        <result property="dInsTagNo" column="d_ins_tag_no"/>
        <result property="dIsRadioactiveSources" column="d_is_radioactive_sources"/>
        <result property="dIsOtherEquSafe" column="d_is_other_equ_safe"/>
        <result property="dIsOtherEquSafeContent" column="d_is_other_equ_safe_content"/>
        <result property="dIsDepress" column="d_is_depress"/>
        <result property="dIsSingleBlocking" column="d_is_single_blocking"/>
        <result property="dIsDoubleBlock" column="d_is_double_block"/>
        <result property="dIsLockoutUsing" column="d_is_lockout_using"/>
        <result property="dLockoutUsingContent" column="d_lockout_using_content"/>
        <result property="dIsRemovePipe" column="d_is_remove_pipe"/>
        <result property="dIsDisPipes" column="d_is_dis_pipes"/>
        <result property="dIsInsertBlindPlage" column="d_is_insert_blind_plage"/>
        <result property="dIsMecSecure" column="d_is_mec_secure"/>
        <result property="dMecSecureContent" column="d_mec_secure_content"/>
        <result property="dIsIsolationDiagram" column="d_is_isolation_diagram"/>
        <result property="dIsOtherSafePlant" column="d_is_other_safe_plant"/>
        <result property="dOtherSafePlantContent" column="d_other_safe_plant_content"/>
        <result property="dIsDrain" column="d_is_drain"/>
        <result property="dIsClean" column="d_is_clean"/>
        <result property="dCleanContent" column="d_clean_content"/>
        <result property="dIsFlush" column="d_is_flush"/>
        <result property="dFlushContent" column="d_flush_content"/>
        <result property="dIsOhterClean" column="d_is_ohter_clean"/>
        <result property="dOtherCleanContent" column="d_other_clean_content"/>
        <result property="dIsSiteDemarcation" column="d_is_site_demarcation"/>
        <result property="dSiteDemarcationContent" column="d_site_demarcation_content"/>
        <result property="dIsAreaCover" column="d_is_area_cover"/>
        <result property="dAreaCoverContent" column="d_area_cover_content"/>
        <result property="dIsCloseTrucks" column="d_is_close_trucks"/>
        <result property="dIsLeakFlanges" column="d_is_leak_flanges"/>
        <result property="dIsOtherWorkSafe" column="d_is_other_work_safe"/>
        <result property="dOtherWorkSafeContent" column="d_other_work_safe_content"/>
        <result property="dIsOtherMeasure" column="d_is_other_measure"/>
        <result property="dOtherMeasureContent" column="d_other_measure_content"/>
        <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="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="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="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="dSafeImplSign14" column="d_safe_impl_sign14"/>
        <result property="dSafeImplDate14" column="d_safe_impl_date14"/>
        <result property="dSafeLiftedSign14" column="d_safe_lifted_sign14"/>
        <result property="dSafeLiftedDate14" column="d_safe_lifted_date14"/>
        <result property="dSafeImplSign21" column="d_safe_impl_sign21"/>
        <result property="dSafeImplDate21" column="d_safe_impl_date21"/>
        <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="dSafeImplSign23" column="d_safe_impl_sign23"/>
        <result property="dSafeImplDate23" column="d_safe_impl_date23"/>
        <result property="dSafeLiftedSign23" column="d_safe_lifted_sign23"/>
        <result property="dSafeLiftedDate23" column="d_safe_lifted_date23"/>
        <result property="dSafeImplSign24" column="d_safe_impl_sign24"/>
        <result property="dSafeImplDate24" column="d_safe_impl_date24"/>
        <result property="dSafeLiftedSign24" column="d_safe_lifted_sign24"/>
        <result property="dSafeLiftedDate24" column="d_safe_lifted_date24"/>
        <result property="dSafeImplSign25" column="d_safe_impl_sign25"/>
        <result property="dSafeImplDate25" column="d_safe_impl_date25"/>
        <result property="dSafeLiftedSign25" column="d_safe_lifted_sign25"/>
        <result property="dSafeLiftedDate25" column="d_safe_lifted_date25"/>
        <result property="dSafeImplSign26" column="d_safe_impl_sign26"/>
        <result property="dSafeImplDate26" column="d_safe_impl_date26"/>
        <result property="dSafeLiftedSign26" column="d_safe_lifted_sign26"/>
        <result property="dSafeLiftedDate26" column="d_safe_lifted_date26"/>
        <result property="dSafeImplSign27" column="d_safe_impl_sign27"/>
        <result property="dSafeImplDate27" column="d_safe_impl_date27"/>
        <result property="dSafeLiftedSign27" column="d_safe_lifted_sign27"/>
        <result property="dSafeLiftedDate27" column="d_safe_lifted_date27"/>
        <result property="dSafeImplSign28" column="d_safe_impl_sign28"/>
        <result property="dSafeImplDate28" column="d_safe_impl_date28"/>
        <result property="dSafeLiftedSign28" column="d_safe_lifted_sign28"/>
        <result property="dSafeLiftedDate28" column="d_safe_lifted_date28"/>
        <result property="dSafeImplSign29" column="d_safe_impl_sign29"/>
        <result property="dSafeImplDate29" column="d_safe_impl_date29"/>
        <result property="dSafeImplSign210" column="d_safe_impl_sign210"/>
        <result property="dSafeImplDate210" column="d_safe_impl_date210"/>
        <result property="dSafeLiftedSign210" column="d_safe_lifted_sign210"/>
        <result property="dSafeLiftedDate210" column="d_safe_lifted_date210"/>
        <result property="dSafeImplSign31" column="d_safe_impl_sign31"/>
        <result property="dSafeImplDate31" column="d_safe_impl_date31"/>
        <result property="dSafeImplSign32" column="d_safe_impl_sign32"/>
        <result property="dSafeImplDate32" column="d_safe_impl_date32"/>
        <result property="dSafeImplSign33" column="d_safe_impl_sign33"/>
        <result property="dSafeImplDate33" column="d_safe_impl_date33"/>
        <result property="dSafeImplSign34" column="d_safe_impl_sign34"/>
        <result property="dSafeImplDate34" column="d_safe_impl_date34"/>
        <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="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="dSafeImplSign43" column="d_safe_impl_sign43"/>
        <result property="dSafeImplDate43" column="d_safe_impl_date43"/>
        <result property="dSafeLiftedSign43" column="d_safe_lifted_sign43"/>
        <result property="dSafeLiftedDate43" column="d_safe_lifted_date43"/>
        <result property="dSafeImplSign44" column="d_safe_impl_sign44"/>
        <result property="dSafeImplDate44" column="d_safe_impl_date44"/>
        <result property="dSafeImplSign45" column="d_safe_impl_sign45"/>
        <result property="dSafeImplDate45" column="d_safe_impl_date45"/>
        <result property="dSafeLiftedSign45" column="d_safe_lifted_sign45"/>
        <result property="dSafeLiftedDate45" column="d_safe_lifted_date45"/>
        <result property="dSafeImplSign51" column="d_safe_impl_sign51"/>
        <result property="dSafeImplDate51" column="d_safe_impl_date51"/>
        <result property="dSafeLiftedSign51" column="d_safe_lifted_sign51"/>
        <result property="dSafeLiftedDate51" column="d_safe_lifted_date51"/>
        <result property="eIsPresent" column="e_is_present"/>
        <result property="eIsRequiredPpe" column="e_is_required_ppe"/>
        <result property="ePpeContent" column="e_ppe_content"/>
        <result property="eIsSafeGoggles" column="e_is_safe_goggles"/>
        <result property="eIsFaceShield" column="e_is_face_shield"/>
        <result property="eIsProtectGloves" column="e_is_protect_gloves"/>
        <result property="eProtectGlovesContent" column="e_protect_gloves_content"/>
        <result property="eIsRubberBoots" column="e_is_rubber_boots"/>
        <result property="eIsRubberApron" column="e_is_rubber_apron"/>
        <result property="eIsProtectSuit" column="e_is_protect_suit"/>
        <result property="eProtectSuitContent" column="e_protect_suit_content"/>
        <result property="eIsResProtect" column="e_is_res_protect"/>
        <result property="eResProtectContent" column="e_res_protect_content"/>
        <result property="eIsFallArrest" column="e_is_fall_arrest"/>
        <result property="eFallArrestContent" column="e_fall_arrest_content"/>
        <result property="eIsOtherProtect" column="e_is_other_protect"/>
        <result property="eOtherProtectContent" column="e_other_protect_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="fIsAfterWorkSafe" column="f_is_after_work_safe"/>
        <result property="fAfterWorkSafeContent" column="f_after_work_safe_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="jOneBSign" column="j_one_b_sign"/>
        <result property="jOneBDate" column="j_one_b_date"/>
        <result property="jResMemberSign" column="j_res_member_sign"/>
        <result property="jResMemberDate" column="j_res_member_date"/>
        <result property="jEISign" column="j_e_i_sign"/>
        <result property="jEIDate" column="j_e_i_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"/>
    </resultMap>

    <sql id="selectTHazardWorkPermitVo">
        select d.a_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_device_work,
               d.b_work_content,
               d.b_validity_start_time,
               d.b_validity_end_time,
               d.c_harm_matter_name,
               d.c_is_danger,
               d.c_is_attention,
               d.c_is_toxic,
               d.c_is_flammable,
               d.c_is_oxidizing,
               d.c_is_explosive,
               d.c_is_corrosive,
               d.c_is_irritant_toxic,
               d.c_is_health_hazard,
               d.c_is_compressed_gas,
               d.c_is_environmental_hazard,
               d.c_is_high_temp,
               d.c_is_low_temp,
               d.c_is_pos_pressure,
               d.c_is_neg_pressure,
               d.c_is_moving_parts,
               d.c_is_hot_surfaces,
               d.c_is_cold_surfaces,
               d.c_is_voltages,
               d.c_is_work_protective,
               d.c_is_other_danger,
               d.c_other_danger_content,
               d.c_is_hazards_prod,
               d.c_is_hazards_prod_content,
               d.c_is_dy,
               d.c_is_aqf,
               d.c_is_lq,
               d.c_is_fire,
               d.c_h_id,
               d.b_area_no,
               d.d_is_open_safe,
               d.d_is_dis_feeder,
               d.d_is_break_incl,
               d.d_break_incl_content,
               d.d_ele_circuit_no,
               d.d_ins_tag_no,
               d.d_is_radioactive_sources,
               d.d_is_other_equ_safe,
               d.d_is_other_equ_safe_content,
               d.d_is_depress,
               d.d_is_single_blocking,
               d.d_is_double_block,
               d.d_is_lockout_using,
               d.d_lockout_using_content,
               d.d_is_remove_pipe,
               d.d_is_dis_pipes,
               d.d_is_insert_blind_plage,
               d.d_is_mec_secure,
               d.d_mec_secure_content,
               d.d_is_isolation_diagram,
               d.d_is_other_safe_plant,
               d.d_other_safe_plant_content,
               d.d_is_drain,
               d.d_is_clean,
               d.d_clean_content,
               d.d_is_flush,
               d.d_flush_content,
               d.d_is_ohter_clean,
               d.d_other_clean_content,
               d.d_is_site_demarcation,
               d.d_site_demarcation_content,
               d.d_is_area_cover,
               d.d_area_cover_content,
               d.d_is_close_trucks,
               d.d_is_leak_flanges,
               d.d_is_other_work_safe,
               d.d_other_work_safe_content,
               d.d_is_other_measure,
               d.d_other_measure_content,
               d.d_is_safe_briefing,
               d.d_partake_briefing_sign,
               d.d_partake_briefing_date,
               d.d_no_reason_content,
               d.d_safe_impl_sign11,
               d.d_safe_impl_date11,
               d.d_safe_lifted_sign11,
               d.d_safe_lifted_date11,
               d.d_safe_impl_sign12,
               d.d_safe_impl_date12,
               d.d_safe_lifted_sign12,
               d.d_safe_lifted_date12,
               d.d_safe_impl_sign13,
               d.d_safe_impl_date13,
               d.d_safe_lifted_sign13,
               d.d_safe_lifted_date13,
               d.d_safe_impl_sign14,
               d.d_safe_impl_date14,
               d.d_safe_lifted_sign14,
               d.d_safe_lifted_date14,
               d.d_safe_impl_sign21,
               d.d_safe_impl_date21,
               d.d_safe_impl_sign22,
               d.d_safe_impl_date22,
               d.d_safe_lifted_sign22,
               d.d_safe_lifted_date22,
               d.d_safe_impl_sign23,
               d.d_safe_impl_date23,
               d.d_safe_lifted_sign23,
               d.d_safe_lifted_date23,
               d.d_safe_impl_sign24,
               d.d_safe_impl_date24,
               d.d_safe_lifted_sign24,
               d.d_safe_lifted_date24,
               d.d_safe_impl_sign25,
               d.d_safe_impl_date25,
               d.d_safe_lifted_sign25,
               d.d_safe_lifted_date25,
               d.d_safe_impl_sign26,
               d.d_safe_impl_date26,
               d.d_safe_lifted_sign26,
               d.d_safe_lifted_date26,
               d.d_safe_impl_sign27,
               d.d_safe_impl_date27,
               d.d_safe_lifted_sign27,
               d.d_safe_lifted_date27,
               d.d_safe_impl_sign28,
               d.d_safe_impl_date28,
               d.d_safe_lifted_sign28,
               d.d_safe_lifted_date28,
               d.d_safe_impl_sign29,
               d.d_safe_impl_date29,
               d.d_safe_impl_sign210,
               d.d_safe_impl_date210,
               d.d_safe_lifted_sign210,
               d.d_safe_lifted_date210,
               d.d_safe_impl_sign31,
               d.d_safe_impl_date31,
               d.d_safe_impl_sign32,
               d.d_safe_impl_date32,
               d.d_safe_impl_sign33,
               d.d_safe_impl_date33,
               d.d_safe_impl_sign34,
               d.d_safe_impl_date34,
               d.d_safe_impl_sign41,
               d.d_safe_impl_date41,
               d.d_safe_lifted_sign41,
               d.d_safe_lifted_date41,
               d.d_safe_impl_sign42,
               d.d_safe_impl_date42,
               d.d_safe_lifted_sign42,
               d.d_safe_lifted_date42,
               d.d_safe_impl_sign43,
               d.d_safe_impl_date43,
               d.d_safe_lifted_sign43,
               d.d_safe_lifted_date43,
               d.d_safe_impl_sign44,
               d.d_safe_impl_date44,
               d.d_safe_impl_sign45,
               d.d_safe_impl_date45,
               d.d_safe_lifted_sign45,
               d.d_safe_lifted_date45,
               d.d_safe_impl_sign51,
               d.d_safe_impl_date51,
               d.d_safe_lifted_sign51,
               d.d_safe_lifted_date51,
               d.e_is_present,
               d.e_is_required_ppe,
               d.e_ppe_content,
               d.e_is_safe_goggles,
               d.e_is_face_shield,
               d.e_is_protect_gloves,
               d.e_protect_gloves_content,
               d.e_is_rubber_boots,
               d.e_is_rubber_apron,
               d.e_is_protect_suit,
               d.e_protect_suit_content,
               d.e_is_res_protect,
               d.e_res_protect_content,
               d.e_is_fall_arrest,
               d.e_fall_arrest_content,
               d.e_is_other_protect,
               d.e_other_protect_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_after_work_safe,
               d.f_after_work_safe_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.j_one_b_sign,
               d.j_one_b_date,
               d.j_res_member_sign,
               d.j_res_member_date,
               d.j_e_i_sign,
               d.j_e_i_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_hazard_work_permit d
    </sql>

    <select id="selectTHazardWorkPermitList" parameterType="THazardWorkPermit" resultMap="THazardWorkPermitResult">
        <include refid="selectTHazardWorkPermitVo"/>
    </select>

    <select id="selectTHazardWorkPermitById" parameterType="Long" resultMap="THazardWorkPermitResult">
        <include refid="selectTHazardWorkPermitVo"/>
        where a_id = #{aId}
    </select>

    <insert id="insertTHazardWorkPermit" parameterType="THazardWorkPermit" >
        <!--<selectKey keyProperty="aId" resultType="long" order="BEFORE">
            SELECT seq_t_hazard_work_permit.NEXTVAL as aId FROM DUAL
        </selectKey>-->
        insert into t_hazard_work_permit
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="aId != null">a_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="bDeviceName != null">b_device_name,</if>
            <if test="bDeviceWork != null">b_device_work,</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="cHarmMatterName != null">c_harm_matter_name,</if>
            <if test="cIsDanger != null">c_is_danger,</if>
            <if test="cIsAttention != null">c_is_attention,</if>
            <if test="cIsToxic != null">c_is_toxic,</if>
            <if test="cIsFlammable != null">c_is_flammable,</if>
            <if test="cIsOxidizing != null">c_is_oxidizing,</if>
            <if test="cIsExplosive != null">c_is_explosive,</if>
            <if test="cIsCorrosive != null">c_is_corrosive,</if>
            <if test="cIsIrritantToxic != null">c_is_irritant_toxic,</if>
            <if test="cIsHealthHazard != null">c_is_health_hazard,</if>
            <if test="cIsCompressedGas != null">c_is_compressed_gas,</if>
            <if test="cIsEnvironmentalHazard != null">c_is_environmental_hazard,</if>
            <if test="cIsHighTemp != null">c_is_high_temp,</if>
            <if test="cIsLowTemp != null">c_is_low_temp,</if>
            <if test="cIsPosPressure != null">c_is_pos_pressure,</if>
            <if test="cIsNegPressure != null">c_is_neg_pressure,</if>
            <if test="cIsMovingParts != null">c_is_moving_parts,</if>
            <if test="cIsHotSurfaces != null">c_is_hot_surfaces,</if>
            <if test="cIsColdSurfaces != null">c_is_cold_surfaces,</if>
            <if test="cIsVoltages != null">c_is_voltages,</if>
            <if test="cIsWorkProtective != null">c_is_work_protective,</if>
            <if test="cIsOtherDanger != null">c_is_other_danger,</if>
            <if test="cOtherDangerContent != null">c_other_danger_content,</if>
            <if test="cIsHazardsProd != null">c_is_hazards_prod,</if>
            <if test="cIsHazardsProdContent != null">c_is_hazards_prod_content,</if>
            <if test="cIsDy != null">c_is_dy,</if>
            <if test="cIsAqf != null">c_is_aqf,</if>
            <if test="cIsLq != null">c_is_lq,</if>
            <if test="cIsFire != null">c_is_fire,</if>
            <if test="cHId != null">c_h_id,</if>
            <if test="bAreaNo != null">b_area_no,</if>
            <if test="dIsOpenSafe != null">d_is_open_safe,</if>
            <if test="dIsDisFeeder != null">d_is_dis_feeder,</if>
            <if test="dIsBreakIncl != null">d_is_break_incl,</if>
            <if test="dBreakInclContent != null">d_break_incl_content,</if>
            <if test="dEleCircuitNo != null">d_ele_circuit_no,</if>
            <if test="dInsTagNo != null">d_ins_tag_no,</if>
            <if test="dIsRadioactiveSources != null">d_is_radioactive_sources,</if>
            <if test="dIsOtherEquSafe != null">d_is_other_equ_safe,</if>
            <if test="dIsOtherEquSafeContent != null">d_is_other_equ_safe_content,</if>
            <if test="dIsDepress != null">d_is_depress,</if>
            <if test="dIsSingleBlocking != null">d_is_single_blocking,</if>
            <if test="dIsDoubleBlock != null">d_is_double_block,</if>
            <if test="dIsLockoutUsing != null">d_is_lockout_using,</if>
            <if test="dLockoutUsingContent != null">d_lockout_using_content,</if>
            <if test="dIsRemovePipe != null">d_is_remove_pipe,</if>
            <if test="dIsDisPipes != null">d_is_dis_pipes,</if>
            <if test="dIsInsertBlindPlage != null">d_is_insert_blind_plage,</if>
            <if test="dIsMecSecure != null">d_is_mec_secure,</if>
            <if test="dMecSecureContent != null">d_mec_secure_content,</if>
            <if test="dIsIsolationDiagram != null">d_is_isolation_diagram,</if>
            <if test="dIsOtherSafePlant != null">d_is_other_safe_plant,</if>
            <if test="dOtherSafePlantContent != null">d_other_safe_plant_content,</if>
            <if test="dIsDrain != null">d_is_drain,</if>
            <if test="dIsClean != null">d_is_clean,</if>
            <if test="dCleanContent != null">d_clean_content,</if>
            <if test="dIsFlush != null">d_is_flush,</if>
            <if test="dFlushContent != null">d_flush_content,</if>
            <if test="dIsOhterClean != null">d_is_ohter_clean,</if>
            <if test="dOtherCleanContent != null">d_other_clean_content,</if>
            <if test="dIsSiteDemarcation != null">d_is_site_demarcation,</if>
            <if test="dSiteDemarcationContent != null">d_site_demarcation_content,</if>
            <if test="dIsAreaCover != null">d_is_area_cover,</if>
            <if test="dAreaCoverContent != null">d_area_cover_content,</if>
            <if test="dIsCloseTrucks != null">d_is_close_trucks,</if>
            <if test="dIsLeakFlanges != null">d_is_leak_flanges,</if>
            <if test="dIsOtherWorkSafe != null">d_is_other_work_safe,</if>
            <if test="dOtherWorkSafeContent != null">d_other_work_safe_content,</if>
            <if test="dIsOtherMeasure != null">d_is_other_measure,</if>
            <if test="dOtherMeasureContent != null">d_other_measure_content,</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="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="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="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="dSafeImplSign14 != null">d_safe_impl_sign14,</if>
            <if test="dSafeImplDate14 != null">d_safe_impl_date14,</if>
            <if test="dSafeLiftedSign14 != null">d_safe_lifted_sign14,</if>
            <if test="dSafeLiftedDate14 != null">d_safe_lifted_date14,</if>
            <if test="dSafeImplSign21 != null">d_safe_impl_sign21,</if>
            <if test="dSafeImplDate21 != null">d_safe_impl_date21,</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="dSafeImplSign23 != null">d_safe_impl_sign23,</if>
            <if test="dSafeImplDate23 != null">d_safe_impl_date23,</if>
            <if test="dSafeLiftedSign23 != null">d_safe_lifted_sign23,</if>
            <if test="dSafeLiftedDate23 != null">d_safe_lifted_date23,</if>
            <if test="dSafeImplSign24 != null">d_safe_impl_sign24,</if>
            <if test="dSafeImplDate24 != null">d_safe_impl_date24,</if>
            <if test="dSafeLiftedSign24 != null">d_safe_lifted_sign24,</if>
            <if test="dSafeLiftedDate24 != null">d_safe_lifted_date24,</if>
            <if test="dSafeImplSign25 != null">d_safe_impl_sign25,</if>
            <if test="dSafeImplDate25 != null">d_safe_impl_date25,</if>
            <if test="dSafeLiftedSign25 != null">d_safe_lifted_sign25,</if>
            <if test="dSafeLiftedDate25 != null">d_safe_lifted_date25,</if>
            <if test="dSafeImplSign26 != null">d_safe_impl_sign26,</if>
            <if test="dSafeImplDate26 != null">d_safe_impl_date26,</if>
            <if test="dSafeLiftedSign26 != null">d_safe_lifted_sign26,</if>
            <if test="dSafeLiftedDate26 != null">d_safe_lifted_date26,</if>
            <if test="dSafeImplSign27 != null">d_safe_impl_sign27,</if>
            <if test="dSafeImplDate27 != null">d_safe_impl_date27,</if>
            <if test="dSafeLiftedSign27 != null">d_safe_lifted_sign27,</if>
            <if test="dSafeLiftedDate27 != null">d_safe_lifted_date27,</if>
            <if test="dSafeImplSign28 != null">d_safe_impl_sign28,</if>
            <if test="dSafeImplDate28 != null">d_safe_impl_date28,</if>
            <if test="dSafeLiftedSign28 != null">d_safe_lifted_sign28,</if>
            <if test="dSafeLiftedDate28 != null">d_safe_lifted_date28,</if>
            <if test="dSafeImplSign29 != null">d_safe_impl_sign29,</if>
            <if test="dSafeImplDate29 != null">d_safe_impl_date29,</if>
            <if test="dSafeImplSign210 != null">d_safe_impl_sign210,</if>
            <if test="dSafeImplDate210 != null">d_safe_impl_date210,</if>
            <if test="dSafeLiftedSign210 != null">d_safe_lifted_sign210,</if>
            <if test="dSafeLiftedDate210 != null">d_safe_lifted_date210,</if>
            <if test="dSafeImplSign31 != null">d_safe_impl_sign31,</if>
            <if test="dSafeImplDate31 != null">d_safe_impl_date31,</if>
            <if test="dSafeImplSign32 != null">d_safe_impl_sign32,</if>
            <if test="dSafeImplDate32 != null">d_safe_impl_date32,</if>
            <if test="dSafeImplSign33 != null">d_safe_impl_sign33,</if>
            <if test="dSafeImplDate33 != null">d_safe_impl_date33,</if>
            <if test="dSafeImplSign34 != null">d_safe_impl_sign34,</if>
            <if test="dSafeImplDate34 != null">d_safe_impl_date34,</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="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="dSafeImplSign43 != null">d_safe_impl_sign43,</if>
            <if test="dSafeImplDate43 != null">d_safe_impl_date43,</if>
            <if test="dSafeLiftedSign43 != null">d_safe_lifted_sign43,</if>
            <if test="dSafeLiftedDate43 != null">d_safe_lifted_date43,</if>
            <if test="dSafeImplSign44 != null">d_safe_impl_sign44,</if>
            <if test="dSafeImplDate44 != null">d_safe_impl_date44,</if>
            <if test="dSafeImplSign45 != null">d_safe_impl_sign45,</if>
            <if test="dSafeImplDate45 != null">d_safe_impl_date45,</if>
            <if test="dSafeLiftedSign45 != null">d_safe_lifted_sign45,</if>
            <if test="dSafeLiftedDate45 != null">d_safe_lifted_date45,</if>
            <if test="dSafeImplSign51 != null">d_safe_impl_sign51,</if>
            <if test="dSafeImplDate51 != null">d_safe_impl_date51,</if>
            <if test="dSafeLiftedSign51 != null">d_safe_lifted_sign51,</if>
            <if test="dSafeLiftedDate51 != null">d_safe_lifted_date51,</if>
            <if test="eIsPresent != null">e_is_present,</if>
            <if test="eIsRequiredPpe != null">e_is_required_ppe,</if>
            <if test="ePpeContent != null">e_ppe_content,</if>
            <if test="eIsSafeGoggles != null">e_is_safe_goggles,</if>
            <if test="eIsFaceShield != null">e_is_face_shield,</if>
            <if test="eIsProtectGloves != null">e_is_protect_gloves,</if>
            <if test="eProtectGlovesContent != null">e_protect_gloves_content,</if>
            <if test="eIsRubberBoots != null">e_is_rubber_boots,</if>
            <if test="eIsRubberApron != null">e_is_rubber_apron,</if>
            <if test="eIsProtectSuit != null">e_is_protect_suit,</if>
            <if test="eProtectSuitContent != null">e_protect_suit_content,</if>
            <if test="eIsResProtect != null">e_is_res_protect,</if>
            <if test="eResProtectContent != null">e_res_protect_content,</if>
            <if test="eIsFallArrest != null">e_is_fall_arrest,</if>
            <if test="eFallArrestContent != null">e_fall_arrest_content,</if>
            <if test="eIsOtherProtect != null">e_is_other_protect,</if>
            <if test="eOtherProtectContent != null">e_other_protect_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="fIsAfterWorkSafe != null">f_is_after_work_safe,</if>
            <if test="fAfterWorkSafeContent != null">f_after_work_safe_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="jOneBSign != null">j_one_b_sign,</if>
            <if test="jOneBDate != null">j_one_b_date,</if>
            <if test="jResMemberSign != null">j_res_member_sign,</if>
            <if test="jResMemberDate != null">j_res_member_date,</if>
            <if test="jEISign != null">j_e_i_sign,</if>
            <if test="jEIDate != null">j_e_i_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="aId != null">#{aId},</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="bDeviceName != null">#{bDeviceName},</if>
            <if test="bDeviceWork != null">#{bDeviceWork},</if>
            <if test="bWorkContent != null">#{bWorkContent},</if>
            <if test="bValidityStartTime != null">#{bValidityStartTime},</if>
            <if test="bValidityEndTime != null">#{bValidityEndTime},</if>
            <if test="cHarmMatterName != null">#{cHarmMatterName},</if>
            <if test="cIsDanger != null">#{cIsDanger},</if>
            <if test="cIsAttention != null">#{cIsAttention},</if>
            <if test="cIsToxic != null">#{cIsToxic},</if>
            <if test="cIsFlammable != null">#{cIsFlammable},</if>
            <if test="cIsOxidizing != null">#{cIsOxidizing},</if>
            <if test="cIsExplosive != null">#{cIsExplosive},</if>
            <if test="cIsCorrosive != null">#{cIsCorrosive},</if>
            <if test="cIsIrritantToxic != null">#{cIsIrritantToxic},</if>
            <if test="cIsHealthHazard != null">#{cIsHealthHazard},</if>
            <if test="cIsCompressedGas != null">#{cIsCompressedGas},</if>
            <if test="cIsEnvironmentalHazard != null">#{cIsEnvironmentalHazard},</if>
            <if test="cIsHighTemp != null">#{cIsHighTemp},</if>
            <if test="cIsLowTemp != null">#{cIsLowTemp},</if>
            <if test="cIsPosPressure != null">#{cIsPosPressure},</if>
            <if test="cIsNegPressure != null">#{cIsNegPressure},</if>
            <if test="cIsMovingParts != null">#{cIsMovingParts},</if>
            <if test="cIsHotSurfaces != null">#{cIsHotSurfaces},</if>
            <if test="cIsColdSurfaces != null">#{cIsColdSurfaces},</if>
            <if test="cIsVoltages != null">#{cIsVoltages},</if>
            <if test="cIsWorkProtective != null">#{cIsWorkProtective},</if>
            <if test="cIsOtherDanger != null">#{cIsOtherDanger},</if>
            <if test="cOtherDangerContent != null">#{cOtherDangerContent},</if>
            <if test="cIsHazardsProd != null">#{cIsHazardsProd},</if>
            <if test="cIsHazardsProdContent != null">#{cIsHazardsProdContent},</if>
            <if test="cIsDy != null">#{cIsDy},</if>
            <if test="cIsAqf != null">#{cIsAqf},</if>
            <if test="cIsLq != null">#{cIsLq},</if>
            <if test="cIsFire != null">#{cIsFire},</if>
            <if test="cHId != null">#{cHId},</if>
            <if test="bAreaNo != null">#{bAreaNo},</if>
            <if test="dIsOpenSafe != null">#{dIsOpenSafe},</if>
            <if test="dIsDisFeeder != null">#{dIsDisFeeder},</if>
            <if test="dIsBreakIncl != null">#{dIsBreakIncl},</if>
            <if test="dBreakInclContent != null">#{dBreakInclContent},</if>
            <if test="dEleCircuitNo != null">#{dEleCircuitNo},</if>
            <if test="dInsTagNo != null">#{dInsTagNo},</if>
            <if test="dIsRadioactiveSources != null">#{dIsRadioactiveSources},</if>
            <if test="dIsOtherEquSafe != null">#{dIsOtherEquSafe},</if>
            <if test="dIsOtherEquSafeContent != null">#{dIsOtherEquSafeContent},</if>
            <if test="dIsDepress != null">#{dIsDepress},</if>
            <if test="dIsSingleBlocking != null">#{dIsSingleBlocking},</if>
            <if test="dIsDoubleBlock != null">#{dIsDoubleBlock},</if>
            <if test="dIsLockoutUsing != null">#{dIsLockoutUsing},</if>
            <if test="dLockoutUsingContent != null">#{dLockoutUsingContent},</if>
            <if test="dIsRemovePipe != null">#{dIsRemovePipe},</if>
            <if test="dIsDisPipes != null">#{dIsDisPipes},</if>
            <if test="dIsInsertBlindPlage != null">#{dIsInsertBlindPlage},</if>
            <if test="dIsMecSecure != null">#{dIsMecSecure},</if>
            <if test="dMecSecureContent != null">#{dMecSecureContent},</if>
            <if test="dIsIsolationDiagram != null">#{dIsIsolationDiagram},</if>
            <if test="dIsOtherSafePlant != null">#{dIsOtherSafePlant},</if>
            <if test="dOtherSafePlantContent != null">#{dOtherSafePlantContent},</if>
            <if test="dIsDrain != null">#{dIsDrain},</if>
            <if test="dIsClean != null">#{dIsClean},</if>
            <if test="dCleanContent != null">#{dCleanContent},</if>
            <if test="dIsFlush != null">#{dIsFlush},</if>
            <if test="dFlushContent != null">#{dFlushContent},</if>
            <if test="dIsOhterClean != null">#{dIsOhterClean},</if>
            <if test="dOtherCleanContent != null">#{dOtherCleanContent},</if>
            <if test="dIsSiteDemarcation != null">#{dIsSiteDemarcation},</if>
            <if test="dSiteDemarcationContent != null">#{dSiteDemarcationContent},</if>
            <if test="dIsAreaCover != null">#{dIsAreaCover},</if>
            <if test="dAreaCoverContent != null">#{dAreaCoverContent},</if>
            <if test="dIsCloseTrucks != null">#{dIsCloseTrucks},</if>
            <if test="dIsLeakFlanges != null">#{dIsLeakFlanges},</if>
            <if test="dIsOtherWorkSafe != null">#{dIsOtherWorkSafe},</if>
            <if test="dOtherWorkSafeContent != null">#{dOtherWorkSafeContent},</if>
            <if test="dIsOtherMeasure != null">#{dIsOtherMeasure},</if>
            <if test="dOtherMeasureContent != null">#{dOtherMeasureContent},</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="dSafeImplSign11 != null">#{dSafeImplSign11},</if>
            <if test="dSafeImplDate11 != null">#{dSafeImplDate11},</if>
            <if test="dSafeLiftedSign11 != null">#{dSafeLiftedSign11},</if>
            <if test="dSafeLiftedDate11 != null">#{dSafeLiftedDate11},</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="dSafeImplSign13 != null">#{dSafeImplSign13},</if>
            <if test="dSafeImplDate13 != null">#{dSafeImplDate13},</if>
            <if test="dSafeLiftedSign13 != null">#{dSafeLiftedSign13},</if>
            <if test="dSafeLiftedDate13 != null">#{dSafeLiftedDate13},</if>
            <if test="dSafeImplSign14 != null">#{dSafeImplSign14},</if>
            <if test="dSafeImplDate14 != null">#{dSafeImplDate14},</if>
            <if test="dSafeLiftedSign14 != null">#{dSafeLiftedSign14},</if>
            <if test="dSafeLiftedDate14 != null">#{dSafeLiftedDate14},</if>
            <if test="dSafeImplSign21 != null">#{dSafeImplSign21},</if>
            <if test="dSafeImplDate21 != null">#{dSafeImplDate21},</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="dSafeImplSign23 != null">#{dSafeImplSign23},</if>
            <if test="dSafeImplDate23 != null">#{dSafeImplDate23},</if>
            <if test="dSafeLiftedSign23 != null">#{dSafeLiftedSign23},</if>
            <if test="dSafeLiftedDate23 != null">#{dSafeLiftedDate23},</if>
            <if test="dSafeImplSign24 != null">#{dSafeImplSign24},</if>
            <if test="dSafeImplDate24 != null">#{dSafeImplDate24},</if>
            <if test="dSafeLiftedSign24 != null">#{dSafeLiftedSign24},</if>
            <if test="dSafeLiftedDate24 != null">#{dSafeLiftedDate24},</if>
            <if test="dSafeImplSign25 != null">#{dSafeImplSign25},</if>
            <if test="dSafeImplDate25 != null">#{dSafeImplDate25},</if>
            <if test="dSafeLiftedSign25 != null">#{dSafeLiftedSign25},</if>
            <if test="dSafeLiftedDate25 != null">#{dSafeLiftedDate25},</if>
            <if test="dSafeImplSign26 != null">#{dSafeImplSign26},</if>
            <if test="dSafeImplDate26 != null">#{dSafeImplDate26},</if>
            <if test="dSafeLiftedSign26 != null">#{dSafeLiftedSign26},</if>
            <if test="dSafeLiftedDate26 != null">#{dSafeLiftedDate26},</if>
            <if test="dSafeImplSign27 != null">#{dSafeImplSign27},</if>
            <if test="dSafeImplDate27 != null">#{dSafeImplDate27},</if>
            <if test="dSafeLiftedSign27 != null">#{dSafeLiftedSign27},</if>
            <if test="dSafeLiftedDate27 != null">#{dSafeLiftedDate27},</if>
            <if test="dSafeImplSign28 != null">#{dSafeImplSign28},</if>
            <if test="dSafeImplDate28 != null">#{dSafeImplDate28},</if>
            <if test="dSafeLiftedSign28 != null">#{dSafeLiftedSign28},</if>
            <if test="dSafeLiftedDate28 != null">#{dSafeLiftedDate28},</if>
            <if test="dSafeImplSign29 != null">#{dSafeImplSign29},</if>
            <if test="dSafeImplDate29 != null">#{dSafeImplDate29},</if>
            <if test="dSafeImplSign210 != null">#{dSafeImplSign210},</if>
            <if test="dSafeImplDate210 != null">#{dSafeImplDate210},</if>
            <if test="dSafeLiftedSign210 != null">#{dSafeLiftedSign210},</if>
            <if test="dSafeLiftedDate210 != null">#{dSafeLiftedDate210},</if>
            <if test="dSafeImplSign31 != null">#{dSafeImplSign31},</if>
            <if test="dSafeImplDate31 != null">#{dSafeImplDate31},</if>
            <if test="dSafeImplSign32 != null">#{dSafeImplSign32},</if>
            <if test="dSafeImplDate32 != null">#{dSafeImplDate32},</if>
            <if test="dSafeImplSign33 != null">#{dSafeImplSign33},</if>
            <if test="dSafeImplDate33 != null">#{dSafeImplDate33},</if>
            <if test="dSafeImplSign34 != null">#{dSafeImplSign34},</if>
            <if test="dSafeImplDate34 != null">#{dSafeImplDate34},</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="dSafeImplSign42 != null">#{dSafeImplSign42},</if>
            <if test="dSafeImplDate42 != null">#{dSafeImplDate42},</if>
            <if test="dSafeLiftedSign42 != null">#{dSafeLiftedSign42},</if>
            <if test="dSafeLiftedDate42 != null">#{dSafeLiftedDate42},</if>
            <if test="dSafeImplSign43 != null">#{dSafeImplSign43},</if>
            <if test="dSafeImplDate43 != null">#{dSafeImplDate43},</if>
            <if test="dSafeLiftedSign43 != null">#{dSafeLiftedSign43},</if>
            <if test="dSafeLiftedDate43 != null">#{dSafeLiftedDate43},</if>
            <if test="dSafeImplSign44 != null">#{dSafeImplSign44},</if>
            <if test="dSafeImplDate44 != null">#{dSafeImplDate44},</if>
            <if test="dSafeImplSign45 != null">#{dSafeImplSign45},</if>
            <if test="dSafeImplDate45 != null">#{dSafeImplDate45},</if>
            <if test="dSafeLiftedSign45 != null">#{dSafeLiftedSign45},</if>
            <if test="dSafeLiftedDate45 != null">#{dSafeLiftedDate45},</if>
            <if test="dSafeImplSign51 != null">#{dSafeImplSign51},</if>
            <if test="dSafeImplDate51 != null">#{dSafeImplDate51},</if>
            <if test="dSafeLiftedSign51 != null">#{dSafeLiftedSign51},</if>
            <if test="dSafeLiftedDate51 != null">#{dSafeLiftedDate51},</if>
            <if test="eIsPresent != null">#{eIsPresent},</if>
            <if test="eIsRequiredPpe != null">#{eIsRequiredPpe},</if>
            <if test="ePpeContent != null">#{ePpeContent},</if>
            <if test="eIsSafeGoggles != null">#{eIsSafeGoggles},</if>
            <if test="eIsFaceShield != null">#{eIsFaceShield},</if>
            <if test="eIsProtectGloves != null">#{eIsProtectGloves},</if>
            <if test="eProtectGlovesContent != null">#{eProtectGlovesContent},</if>
            <if test="eIsRubberBoots != null">#{eIsRubberBoots},</if>
            <if test="eIsRubberApron != null">#{eIsRubberApron},</if>
            <if test="eIsProtectSuit != null">#{eIsProtectSuit},</if>
            <if test="eProtectSuitContent != null">#{eProtectSuitContent},</if>
            <if test="eIsResProtect != null">#{eIsResProtect},</if>
            <if test="eResProtectContent != null">#{eResProtectContent},</if>
            <if test="eIsFallArrest != null">#{eIsFallArrest},</if>
            <if test="eFallArrestContent != null">#{eFallArrestContent},</if>
            <if test="eIsOtherProtect != null">#{eIsOtherProtect},</if>
            <if test="eOtherProtectContent != null">#{eOtherProtectContent},</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="fIsAfterWorkSafe != null">#{fIsAfterWorkSafe},</if>
            <if test="fAfterWorkSafeContent != null">#{fAfterWorkSafeContent},</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="jOneBSign != null">#{jOneBSign},</if>
            <if test="jOneBDate != null">#{jOneBDate},</if>
            <if test="jResMemberSign != null">#{jResMemberSign},</if>
            <if test="jResMemberDate != null">#{jResMemberDate},</if>
            <if test="jEISign != null">#{jEISign},</if>
            <if test="jEIDate != null">#{jEIDate},</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="updateTHazardWorkPermit" parameterType="THazardWorkPermit">
        update t_hazard_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="bDeviceWork != null">b_device_work = #{bDeviceWork},</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="cHarmMatterName != null">c_harm_matter_name = #{cHarmMatterName},</if>
            <if test="cIsDanger != null">c_is_danger = #{cIsDanger},</if>
            <if test="cIsAttention != null">c_is_attention = #{cIsAttention},</if>
            <if test="cIsToxic != null">c_is_toxic = #{cIsToxic},</if>
            <if test="cIsFlammable != null">c_is_flammable = #{cIsFlammable},</if>
            <if test="cIsOxidizing != null">c_is_oxidizing = #{cIsOxidizing},</if>
            <if test="cIsExplosive != null">c_is_explosive = #{cIsExplosive},</if>
            <if test="cIsCorrosive != null">c_is_corrosive = #{cIsCorrosive},</if>
            <if test="cIsIrritantToxic != null">c_is_irritant_toxic = #{cIsIrritantToxic},</if>
            <if test="cIsHealthHazard != null">c_is_health_hazard = #{cIsHealthHazard},</if>
            <if test="cIsCompressedGas != null">c_is_compressed_gas = #{cIsCompressedGas},</if>
            <if test="cIsEnvironmentalHazard != null">c_is_environmental_hazard = #{cIsEnvironmentalHazard},</if>
            <if test="cIsHighTemp != null">c_is_high_temp = #{cIsHighTemp},</if>
            <if test="cIsLowTemp != null">c_is_low_temp = #{cIsLowTemp},</if>
            <if test="cIsPosPressure != null">c_is_pos_pressure = #{cIsPosPressure},</if>
            <if test="cIsNegPressure != null">c_is_neg_pressure = #{cIsNegPressure},</if>
            <if test="cIsMovingParts != null">c_is_moving_parts = #{cIsMovingParts},</if>
            <if test="cIsHotSurfaces != null">c_is_hot_surfaces = #{cIsHotSurfaces},</if>
            <if test="cIsColdSurfaces != null">c_is_cold_surfaces = #{cIsColdSurfaces},</if>
            <if test="cIsVoltages != null">c_is_voltages = #{cIsVoltages},</if>
            <if test="cIsWorkProtective != null">c_is_work_protective = #{cIsWorkProtective},</if>
            <if test="cIsOtherDanger != null">c_is_other_danger = #{cIsOtherDanger},</if>
            <if test="cOtherDangerContent != null">c_other_danger_content = #{cOtherDangerContent},</if>
            <if test="cIsHazardsProd != null">c_is_hazards_prod = #{cIsHazardsProd},</if>
            <if test="cIsHazardsProdContent != null">c_is_hazards_prod_content = #{cIsHazardsProdContent},</if>
            <if test="cIsDy != null">c_is_dy = #{cIsDy},</if>
            <if test="cIsAqf != null">c_is_aqf = #{cIsAqf},</if>
            <if test="cIsLq != null">c_is_lq = #{cIsLq},</if>
            <if test="cIsFire != null">c_is_fire = #{cIsFire},</if>
            <if test="cHId != null">c_h_id = #{cHId},</if>
            <if test="bAreaNo != null">b_area_no = #{bAreaNo},</if>
            <if test="dIsOpenSafe != null">d_is_open_safe = #{dIsOpenSafe},</if>
            <if test="dIsDisFeeder != null">d_is_dis_feeder = #{dIsDisFeeder},</if>
            <if test="dIsBreakIncl != null">d_is_break_incl = #{dIsBreakIncl},</if>
            <if test="dBreakInclContent != null">d_break_incl_content = #{dBreakInclContent},</if>
            <if test="dEleCircuitNo != null">d_ele_circuit_no = #{dEleCircuitNo},</if>
            <if test="dInsTagNo != null">d_ins_tag_no = #{dInsTagNo},</if>
            <if test="dIsRadioactiveSources != null">d_is_radioactive_sources = #{dIsRadioactiveSources},</if>
            <if test="dIsOtherEquSafe != null">d_is_other_equ_safe = #{dIsOtherEquSafe},</if>
            <if test="dIsOtherEquSafeContent != null">d_is_other_equ_safe_content = #{dIsOtherEquSafeContent},</if>
            <if test="dIsDepress != null">d_is_depress = #{dIsDepress},</if>
            <if test="dIsSingleBlocking != null">d_is_single_blocking = #{dIsSingleBlocking},</if>
            <if test="dIsDoubleBlock != null">d_is_double_block = #{dIsDoubleBlock},</if>
            <if test="dIsLockoutUsing != null">d_is_lockout_using = #{dIsLockoutUsing},</if>
            <if test="dLockoutUsingContent != null">d_lockout_using_content = #{dLockoutUsingContent},</if>
            <if test="dIsRemovePipe != null">d_is_remove_pipe = #{dIsRemovePipe},</if>
            <if test="dIsDisPipes != null">d_is_dis_pipes = #{dIsDisPipes},</if>
            <if test="dIsInsertBlindPlage != null">d_is_insert_blind_plage = #{dIsInsertBlindPlage},</if>
            <if test="dIsMecSecure != null">d_is_mec_secure = #{dIsMecSecure},</if>
            <if test="dMecSecureContent != null">d_mec_secure_content = #{dMecSecureContent},</if>
            <if test="dIsIsolationDiagram != null">d_is_isolation_diagram = #{dIsIsolationDiagram},</if>
            <if test="dIsOtherSafePlant != null">d_is_other_safe_plant = #{dIsOtherSafePlant},</if>
            <if test="dOtherSafePlantContent != null">d_other_safe_plant_content = #{dOtherSafePlantContent},</if>
            <if test="dIsDrain != null">d_is_drain = #{dIsDrain},</if>
            <if test="dIsClean != null">d_is_clean = #{dIsClean},</if>
            <if test="dCleanContent != null">d_clean_content = #{dCleanContent},</if>
            <if test="dIsFlush != null">d_is_flush = #{dIsFlush},</if>
            <if test="dFlushContent != null">d_flush_content = #{dFlushContent},</if>
            <if test="dIsOhterClean != null">d_is_ohter_clean = #{dIsOhterClean},</if>
            <if test="dOtherCleanContent != null">d_other_clean_content = #{dOtherCleanContent},</if>
            <if test="dIsSiteDemarcation != null">d_is_site_demarcation = #{dIsSiteDemarcation},</if>
            <if test="dSiteDemarcationContent != null">d_site_demarcation_content = #{dSiteDemarcationContent},</if>
            <if test="dIsAreaCover != null">d_is_area_cover = #{dIsAreaCover},</if>
            <if test="dAreaCoverContent != null">d_area_cover_content = #{dAreaCoverContent},</if>
            <if test="dIsCloseTrucks != null">d_is_close_trucks = #{dIsCloseTrucks},</if>
            <if test="dIsLeakFlanges != null">d_is_leak_flanges = #{dIsLeakFlanges},</if>
            <if test="dIsOtherWorkSafe != null">d_is_other_work_safe = #{dIsOtherWorkSafe},</if>
            <if test="dOtherWorkSafeContent != null">d_other_work_safe_content = #{dOtherWorkSafeContent},</if>
            <if test="dIsOtherMeasure != null">d_is_other_measure = #{dIsOtherMeasure},</if>
            <if test="dOtherMeasureContent != null">d_other_measure_content = #{dOtherMeasureContent},</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="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="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="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="dSafeImplSign14 != null">d_safe_impl_sign14 = #{dSafeImplSign14},</if>
            <if test="dSafeImplDate14 != null">d_safe_impl_date14 = #{dSafeImplDate14},</if>
            <if test="dSafeLiftedSign14 != null">d_safe_lifted_sign14 = #{dSafeLiftedSign14},</if>
            <if test="dSafeLiftedDate14 != null">d_safe_lifted_date14 = #{dSafeLiftedDate14},</if>
            <if test="dSafeImplSign21 != null">d_safe_impl_sign21 = #{dSafeImplSign21},</if>
            <if test="dSafeImplDate21 != null">d_safe_impl_date21 = #{dSafeImplDate21},</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="dSafeImplSign23 != null">d_safe_impl_sign23 = #{dSafeImplSign23},</if>
            <if test="dSafeImplDate23 != null">d_safe_impl_date23 = #{dSafeImplDate23},</if>
            <if test="dSafeLiftedSign23 != null">d_safe_lifted_sign23 = #{dSafeLiftedSign23},</if>
            <if test="dSafeLiftedDate23 != null">d_safe_lifted_date23 = #{dSafeLiftedDate23},</if>
            <if test="dSafeImplSign24 != null">d_safe_impl_sign24 = #{dSafeImplSign24},</if>
            <if test="dSafeImplDate24 != null">d_safe_impl_date24 = #{dSafeImplDate24},</if>
            <if test="dSafeLiftedSign24 != null">d_safe_lifted_sign24 = #{dSafeLiftedSign24},</if>
            <if test="dSafeLiftedDate24 != null">d_safe_lifted_date24 = #{dSafeLiftedDate24},</if>
            <if test="dSafeImplSign25 != null">d_safe_impl_sign25 = #{dSafeImplSign25},</if>
            <if test="dSafeImplDate25 != null">d_safe_impl_date25 = #{dSafeImplDate25},</if>
            <if test="dSafeLiftedSign25 != null">d_safe_lifted_sign25 = #{dSafeLiftedSign25},</if>
            <if test="dSafeLiftedDate25 != null">d_safe_lifted_date25 = #{dSafeLiftedDate25},</if>
            <if test="dSafeImplSign26 != null">d_safe_impl_sign26 = #{dSafeImplSign26},</if>
            <if test="dSafeImplDate26 != null">d_safe_impl_date26 = #{dSafeImplDate26},</if>
            <if test="dSafeLiftedSign26 != null">d_safe_lifted_sign26 = #{dSafeLiftedSign26},</if>
            <if test="dSafeLiftedDate26 != null">d_safe_lifted_date26 = #{dSafeLiftedDate26},</if>
            <if test="dSafeImplSign27 != null">d_safe_impl_sign27 = #{dSafeImplSign27},</if>
            <if test="dSafeImplDate27 != null">d_safe_impl_date27 = #{dSafeImplDate27},</if>
            <if test="dSafeLiftedSign27 != null">d_safe_lifted_sign27 = #{dSafeLiftedSign27},</if>
            <if test="dSafeLiftedDate27 != null">d_safe_lifted_date27 = #{dSafeLiftedDate27},</if>
            <if test="dSafeImplSign28 != null">d_safe_impl_sign28 = #{dSafeImplSign28},</if>
            <if test="dSafeImplDate28 != null">d_safe_impl_date28 = #{dSafeImplDate28},</if>
            <if test="dSafeLiftedSign28 != null">d_safe_lifted_sign28 = #{dSafeLiftedSign28},</if>
            <if test="dSafeLiftedDate28 != null">d_safe_lifted_date28 = #{dSafeLiftedDate28},</if>
            <if test="dSafeImplSign29 != null">d_safe_impl_sign29 = #{dSafeImplSign29},</if>
            <if test="dSafeImplDate29 != null">d_safe_impl_date29 = #{dSafeImplDate29},</if>
            <if test="dSafeImplSign210 != null">d_safe_impl_sign210 = #{dSafeImplSign210},</if>
            <if test="dSafeImplDate210 != null">d_safe_impl_date210 = #{dSafeImplDate210},</if>
            <if test="dSafeLiftedSign210 != null">d_safe_lifted_sign210 = #{dSafeLiftedSign210},</if>
            <if test="dSafeLiftedDate210 != null">d_safe_lifted_date210 = #{dSafeLiftedDate210},</if>
            <if test="dSafeImplSign31 != null">d_safe_impl_sign31 = #{dSafeImplSign31},</if>
            <if test="dSafeImplDate31 != null">d_safe_impl_date31 = #{dSafeImplDate31},</if>
            <if test="dSafeImplSign32 != null">d_safe_impl_sign32 = #{dSafeImplSign32},</if>
            <if test="dSafeImplDate32 != null">d_safe_impl_date32 = #{dSafeImplDate32},</if>
            <if test="dSafeImplSign33 != null">d_safe_impl_sign33 = #{dSafeImplSign33},</if>
            <if test="dSafeImplDate33 != null">d_safe_impl_date33 = #{dSafeImplDate33},</if>
            <if test="dSafeImplSign34 != null">d_safe_impl_sign34 = #{dSafeImplSign34},</if>
            <if test="dSafeImplDate34 != null">d_safe_impl_date34 = #{dSafeImplDate34},</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="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="dSafeImplSign43 != null">d_safe_impl_sign43 = #{dSafeImplSign43},</if>
            <if test="dSafeImplDate43 != null">d_safe_impl_date43 = #{dSafeImplDate43},</if>
            <if test="dSafeLiftedSign43 != null">d_safe_lifted_sign43 = #{dSafeLiftedSign43},</if>
            <if test="dSafeLiftedDate43 != null">d_safe_lifted_date43 = #{dSafeLiftedDate43},</if>
            <if test="dSafeImplSign44 != null">d_safe_impl_sign44 = #{dSafeImplSign44},</if>
            <if test="dSafeImplDate44 != null">d_safe_impl_date44 = #{dSafeImplDate44},</if>
            <if test="dSafeImplSign45 != null">d_safe_impl_sign45 = #{dSafeImplSign45},</if>
            <if test="dSafeImplDate45 != null">d_safe_impl_date45 = #{dSafeImplDate45},</if>
            <if test="dSafeLiftedSign45 != null">d_safe_lifted_sign45 = #{dSafeLiftedSign45},</if>
            <if test="dSafeLiftedDate45 != null">d_safe_lifted_date45 = #{dSafeLiftedDate45},</if>
            <if test="dSafeImplSign51 != null">d_safe_impl_sign51 = #{dSafeImplSign51},</if>
            <if test="dSafeImplDate51 != null">d_safe_impl_date51 = #{dSafeImplDate51},</if>
            <if test="dSafeLiftedSign51 != null">d_safe_lifted_sign51 = #{dSafeLiftedSign51},</if>
            <if test="dSafeLiftedDate51 != null">d_safe_lifted_date51 = #{dSafeLiftedDate51},</if>
            <if test="eIsPresent != null">e_is_present = #{eIsPresent},</if>
            <if test="eIsRequiredPpe != null">e_is_required_ppe = #{eIsRequiredPpe},</if>
            <if test="ePpeContent != null">e_ppe_content = #{ePpeContent},</if>
            <if test="eIsSafeGoggles != null">e_is_safe_goggles = #{eIsSafeGoggles},</if>
            <if test="eIsFaceShield != null">e_is_face_shield = #{eIsFaceShield},</if>
            <if test="eIsProtectGloves != null">e_is_protect_gloves = #{eIsProtectGloves},</if>
            <if test="eProtectGlovesContent != null">e_protect_gloves_content = #{eProtectGlovesContent},</if>
            <if test="eIsRubberBoots != null">e_is_rubber_boots = #{eIsRubberBoots},</if>
            <if test="eIsRubberApron != null">e_is_rubber_apron = #{eIsRubberApron},</if>
            <if test="eIsProtectSuit != null">e_is_protect_suit = #{eIsProtectSuit},</if>
            <if test="eProtectSuitContent != null">e_protect_suit_content = #{eProtectSuitContent},</if>
            <if test="eIsResProtect != null">e_is_res_protect = #{eIsResProtect},</if>
            <if test="eResProtectContent != null">e_res_protect_content = #{eResProtectContent},</if>
            <if test="eIsFallArrest != null">e_is_fall_arrest = #{eIsFallArrest},</if>
            <if test="eFallArrestContent != null">e_fall_arrest_content = #{eFallArrestContent},</if>
            <if test="eIsOtherProtect != null">e_is_other_protect = #{eIsOtherProtect},</if>
            <if test="eOtherProtectContent != null">e_other_protect_content = #{eOtherProtectContent},</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="fIsAfterWorkSafe != null">f_is_after_work_safe = #{fIsAfterWorkSafe},</if>
            <if test="fAfterWorkSafeContent != null">f_after_work_safe_content = #{fAfterWorkSafeContent},</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="jOneBSign != null">j_one_b_sign = #{jOneBSign},</if>
            <if test="jOneBDate != null">j_one_b_date = #{jOneBDate},</if>
            <if test="jResMemberSign != null">j_res_member_sign = #{jResMemberSign},</if>
            <if test="jResMemberDate != null">j_res_member_date = #{jResMemberDate},</if>
            <if test="jEISign != null">j_e_i_sign = #{jEISign},</if>
            <if test="jEIDate != null">j_e_i_date = #{jEIDate},</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 a_id = #{aId}
    </update>

    <update id="deleteTHazardWorkPermitById" parameterType="Long">
        update t_hazard_work_permit
        set del_flag = 2
        where a_id = #{aId}
    </update>

    <update id="deleteTHazardWorkPermitByIds" parameterType="String">
        update t_hazard_work_permit set del_flag = 2 where a_id in
        <foreach item="aId" collection="array" open="(" separator="," close=")">
            #{aId}
        </foreach>
    </update>
</mapper>
