<?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.TRestrictedSpacePermitMapper">
    
    <resultMap type="TRestrictedSpacePermit" id="TRestrictedSpacePermitResult">
        <result property="cId"    column="c_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="cHarmMatterName"    column="c_harm_matter_name"    />
        <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="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="cOtherId"    column="c_other_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="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="dIsOtherSafe"    column="d_is_other_safe"    />
        <result property="dIsAreaCover"    column="d_is_area_cover"    />
        <result property="dOtherSafeContent"    column="d_other_safe_content"    />
        <result property="dAreaCoverContent"    column="d_area_cover_content"    />
        <result property="dIsVentilate"    column="d_is_ventilate"    />
        <result property="dIsCloseTrucks"    column="d_is_close_trucks"    />
        <result property="dIsLeakFlanges"    column="d_is_leak_flanges"    />
        <result property="dVentilateContent"    column="d_ventilate_content"    />
        <result property="dIsVentilateUse"    column="d_is_ventilate_use"    />
        <result property="dVentilateUseContent"    column="d_ventilate_use_content"    />
        <result property="dIsVentilateDate"    column="d_is_ventilate_date"    />
        <result property="dVentilateDateContent"    column="d_ventilate_date_content"    />
        <result property="dIsAnalysis"    column="d_is_analysis"    />
        <result property="dAnalysisContent"    column="d_analysis_content"    />
        <result property="dIsOtherMeasure"    column="d_is_other_measure"    />
        <result property="dOtherMeasureContent"    column="d_other_measure_content"    />
        <result property="dPartakeBriefingSign"    column="d_partake_briefing_sign"    />
        <result property="dPartakeBriefingDate"    column="d_partake_briefing_date"    />
        <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="dSafeLiftedSign29"    column="d_safe_lifted_sign29"    />
        <result property="dSafeLiftedDate27"    column="d_safe_lifted_date27"    />
        <result property="dSafeLiftedDate29"    column="d_safe_lifted_date29"    />
        <result property="dSafeImplSign28"    column="d_safe_impl_sign28"    />
        <result property="dSafeImplDate28"    column="d_safe_impl_date28"    />
        <result property="dSafeImplSign29"    column="d_safe_impl_sign29"    />
        <result property="dSafeImplDate29"    column="d_safe_impl_date29"    />
        <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="dSafeImplSign52"    column="d_safe_impl_sign52"    />
        <result property="dSafeImplDate52"    column="d_safe_impl_date52"    />
        <result property="dSafeLiftedSign52"    column="d_safe_lifted_sign52"    />
        <result property="dSafeLiftedDate52"    column="d_safe_lifted_date52"    />
        <result property="dSafeImplSign53"    column="d_safe_impl_sign53"    />
        <result property="dSafeImplDate53"    column="d_safe_impl_date53"    />
        <result property="dSafeImplSign61"    column="d_safe_impl_sign61"    />
        <result property="dSafeImplDate61"    column="d_safe_impl_date61"    />
        <result property="dSafeLiftedSign61"    column="d_safe_lifted_sign61"    />
        <result property="dSafeLiftedDate61"    column="d_safe_lifted_date61"    />
        <result property="eIsPresent"    column="e_is_present"    />
        <result property="eIsRequiredPpe"    column="e_is_required_ppe"    />
        <result property="ePpeContent"    column="e_ppe_content"    />
        <result property="ePpeContent2"    column="e_ppe_content2"    />
        <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="eIsContinueMonitoring"    column="e_is_continue_monitoring"    />
        <result property="eIsRubberApron"    column="e_is_rubber_apron"    />
        <result property="eIsProtectSuit"    column="e_is_protect_suit"    />
        <result property="eSafeAttendantSign"    column="e_safe_attendant_sign"    />
        <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="eSafeAttendant"    column="e_safe_attendant"    />
        <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="hSafeMesA4Sign"    column="h_safe_mes_a4_sign"    />
        <result property="hSafeMesA4Date"    column="h_safe_mes_a4_date"    />
        <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="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="wordUrl"    column="word_url"    />
        <result property="pdfUrl"    column="pdf_url"    />
        <result property="jOneBSign"    column="j_one_b_sign"    />
        <result property="cIsGhs"    column="c_is_ghs"    />
        <result property="cIsYesDanger"    column="c_is_yes_danger"    />
        <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="isEquipmentHazards"    column="is_equipment_hazards"    />
        <result property="isFacilityHazards"    column="is_facility_hazards"    />
        <result property="cIsOtherA"    column="c_is_other_a"    />
        <result property="eMonitor"    column="e_monitor"    />
        <result property="deptName" column="dept_name" />
    </resultMap>

    <sql id="selectTRestrictedSpacePermitVo">
        select d.e_monitor, d.c_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.c_harm_matter_name, 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_other_danger, d.c_other_danger_content, d.c_is_hazards_prod, d.c_is_hazards_prod_content, d.c_other_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_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_other_safe, d.d_is_area_cover, d.d_other_safe_content, d.d_area_cover_content, d.d_is_ventilate, d.d_is_close_trucks, d.d_is_leak_flanges, d.d_ventilate_content, d.d_is_ventilate_use, d.d_ventilate_use_content, d.d_is_ventilate_date, d.d_ventilate_date_content, d.d_is_analysis, d.d_analysis_content, d.d_is_other_measure, d.d_other_measure_content, d.d_partake_briefing_sign, d.d_partake_briefing_date, 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_sign29, d.d_safe_lifted_date27, d.d_safe_lifted_date29, d.d_safe_impl_sign28, d.d_safe_impl_date28, d.d_safe_impl_sign29, d.d_safe_impl_date29, 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.d_safe_impl_sign52, d.d_safe_impl_date52, d.d_safe_lifted_sign52, d.d_safe_lifted_date52, d.d_safe_impl_sign53, d.d_safe_impl_date53, d.d_safe_impl_sign61, d.d_safe_impl_date61, d.d_safe_lifted_sign61, d.d_safe_lifted_date61, d.e_is_present, d.e_is_required_ppe, d.e_ppe_content, d.e_ppe_content2, 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_continue_monitoring, d.e_is_rubber_apron, d.e_is_protect_suit, d.e_safe_attendant_sign, 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_safe_attendant, 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.h_safe_mes_a4_sign, d.h_safe_mes_a4_date, 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.i_one_a_sign, d.i_one_a_date, d.i_one_b_sign, d.i_one_b_date, d.word_url, d.pdf_url, d.j_one_b_sign, d.c_is_ghs, 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.C_IS_YES_DANGER, d.is_equipment_hazards, d.is_facility_hazards, d.c_is_other_a from t_restricted_space_permit d
    </sql>

    <select id="selectTRestrictedSpacePermitList" parameterType="TRestrictedSpacePermit" resultMap="TRestrictedSpacePermitResult">
        <include refid="selectTRestrictedSpacePermitVo"/>
        <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="cHarmMatterName != null  and cHarmMatterName != ''"> and c_harm_matter_name like concat(concat('%', #{cHarmMatterName}), '%')</if>
            <if test="cIsToxic != null "> and c_is_toxic = #{cIsToxic}</if>
            <if test="cIsFlammable != null "> and c_is_flammable = #{cIsFlammable}</if>
            <if test="cIsOxidizing != null "> and c_is_oxidizing = #{cIsOxidizing}</if>
            <if test="cIsExplosive != null "> and c_is_explosive = #{cIsExplosive}</if>
            <if test="cIsCorrosive != null "> and c_is_corrosive = #{cIsCorrosive}</if>
            <if test="cIsIrritantToxic != null "> and c_is_irritant_toxic = #{cIsIrritantToxic}</if>
            <if test="cIsHealthHazard != null "> and c_is_health_hazard = #{cIsHealthHazard}</if>
            <if test="cIsCompressedGas != null "> and c_is_compressed_gas = #{cIsCompressedGas}</if>
            <if test="cIsEnvironmentalHazard != null "> and c_is_environmental_hazard = #{cIsEnvironmentalHazard}</if>
            <if test="cIsHighTemp != null "> and c_is_high_temp = #{cIsHighTemp}</if>
            <if test="cIsLowTemp != null "> and c_is_low_temp = #{cIsLowTemp}</if>
            <if test="cIsPosPressure != null "> and c_is_pos_pressure = #{cIsPosPressure}</if>
            <if test="cIsNegPressure != null "> and c_is_neg_pressure = #{cIsNegPressure}</if>
            <if test="cIsMovingParts != null "> and c_is_moving_parts = #{cIsMovingParts}</if>
            <if test="cIsHotSurfaces != null "> and c_is_hot_surfaces = #{cIsHotSurfaces}</if>
            <if test="cIsColdSurfaces != null "> and c_is_cold_surfaces = #{cIsColdSurfaces}</if>
            <if test="cIsVoltages != null "> and c_is_voltages = #{cIsVoltages}</if>
            <if test="cIsOtherDanger != null "> and c_is_other_danger = #{cIsOtherDanger}</if>
            <if test="cOtherDangerContent != null  and cOtherDangerContent != ''"> and c_other_danger_content = #{cOtherDangerContent}</if>
            <if test="cIsHazardsProd != null "> and c_is_hazards_prod = #{cIsHazardsProd}</if>
            <if test="cIsHazardsProdContent != null  and cIsHazardsProdContent != ''"> and c_is_hazards_prod_content = #{cIsHazardsProdContent}</if>
            <if test="cOtherId != null  and cOtherId != ''"> and c_other_id = #{cOtherId}</if>
            <if test="bAreaNo != null  and bAreaNo != ''"> and b_area_no = #{bAreaNo}</if>
            <if test="dIsOpenSafe != null "> and d_is_open_safe = #{dIsOpenSafe}</if>
            <if test="dIsDisFeeder != null "> and d_is_dis_feeder = #{dIsDisFeeder}</if>
            <if test="dIsBreakIncl != null "> and d_is_break_incl = #{dIsBreakIncl}</if>
            <if test="dBreakInclContent != null "> and d_break_incl_content = #{dBreakInclContent}</if>
            <if test="dEleCircuitNo != null  and dEleCircuitNo != ''"> and d_ele_circuit_no = #{dEleCircuitNo}</if>
            <if test="dInsTagNo != null  and dInsTagNo != ''"> and d_ins_tag_no = #{dInsTagNo}</if>
            <if test="dIsRadioactiveSources != null "> and d_is_radioactive_sources = #{dIsRadioactiveSources}</if>
            <if test="dIsOtherEquSafe != null "> and d_is_other_equ_safe = #{dIsOtherEquSafe}</if>
            <if test="dIsOtherEquSafeContent != null  and dIsOtherEquSafeContent != ''"> and d_is_other_equ_safe_content = #{dIsOtherEquSafeContent}</if>
            <if test="dIsDepress != null "> and d_is_depress = #{dIsDepress}</if>
            <if test="dIsDoubleBlock != null "> and d_is_double_block = #{dIsDoubleBlock}</if>
            <if test="dIsLockoutUsing != null "> and d_is_lockout_using = #{dIsLockoutUsing}</if>
            <if test="dLockoutUsingContent != null  and dLockoutUsingContent != ''"> and d_lockout_using_content = #{dLockoutUsingContent}</if>
            <if test="dIsRemovePipe != null "> and d_is_remove_pipe = #{dIsRemovePipe}</if>
            <if test="dIsDisPipes != null "> and d_is_dis_pipes = #{dIsDisPipes}</if>
            <if test="dIsInsertBlindPlage != null "> and d_is_insert_blind_plage = #{dIsInsertBlindPlage}</if>
            <if test="dIsMecSecure != null "> and d_is_mec_secure = #{dIsMecSecure}</if>
            <if test="dMecSecureContent != null  and dMecSecureContent != ''"> and d_mec_secure_content = #{dMecSecureContent}</if>
            <if test="dIsIsolationDiagram != null "> and d_is_isolation_diagram = #{dIsIsolationDiagram}</if>
            <if test="dIsOtherSafePlant != null "> and d_is_other_safe_plant = #{dIsOtherSafePlant}</if>
            <if test="dOtherSafePlantContent != null  and dOtherSafePlantContent != ''"> and d_other_safe_plant_content = #{dOtherSafePlantContent}</if>
            <if test="dIsDrain != null "> and d_is_drain = #{dIsDrain}</if>
            <if test="dIsClean != null "> and d_is_clean = #{dIsClean}</if>
            <if test="dCleanContent != null  and dCleanContent != ''"> and d_clean_content = #{dCleanContent}</if>
            <if test="dIsFlush != null "> and d_is_flush = #{dIsFlush}</if>
            <if test="dFlushContent != null  and dFlushContent != ''"> and d_flush_content = #{dFlushContent}</if>
            <if test="dIsOhterClean != null "> and d_is_ohter_clean = #{dIsOhterClean}</if>
            <if test="dOtherCleanContent != null  and dOtherCleanContent != ''"> and d_other_clean_content = #{dOtherCleanContent}</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="dIsOtherSafe != null  and dIsOtherSafe != ''"> and d_is_other_safe = #{dIsOtherSafe}</if>
            <if test="dIsAreaCover != null "> and d_is_area_cover = #{dIsAreaCover}</if>
            <if test="dOtherSafeContent != null  and dOtherSafeContent != ''"> and d_other_safe_content = #{dOtherSafeContent}</if>
            <if test="dAreaCoverContent != null  and dAreaCoverContent != ''"> and d_area_cover_content = #{dAreaCoverContent}</if>
            <if test="dIsVentilate != null  and dIsVentilate != ''"> and d_is_ventilate = #{dIsVentilate}</if>
            <if test="dIsCloseTrucks != null "> and d_is_close_trucks = #{dIsCloseTrucks}</if>
            <if test="dIsLeakFlanges != null "> and d_is_leak_flanges = #{dIsLeakFlanges}</if>
            <if test="dVentilateContent != null  and dVentilateContent != ''"> and d_ventilate_content = #{dVentilateContent}</if>
            <if test="dIsVentilateUse != null  and dIsVentilateUse != ''"> and d_is_ventilate_use = #{dIsVentilateUse}</if>
            <if test="dVentilateUseContent != null  and dVentilateUseContent != ''"> and d_ventilate_use_content = #{dVentilateUseContent}</if>
            <if test="dIsVentilateDate != null  and dIsVentilateDate != ''"> and d_is_ventilate_date = #{dIsVentilateDate}</if>
            <if test="dVentilateDateContent != null "> and d_ventilate_date_content = #{dVentilateDateContent}</if>
            <if test="dIsAnalysis != null  and dIsAnalysis != ''"> and d_is_analysis = #{dIsAnalysis}</if>
            <if test="dAnalysisContent != null  and dAnalysisContent != ''"> and d_analysis_content = #{dAnalysisContent}</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="dPartakeBriefingSign != null  and dPartakeBriefingSign != ''"> and d_partake_briefing_sign = #{dPartakeBriefingSign}</if>
            <if test="dPartakeBriefingDate != null "> and d_partake_briefing_date = #{dPartakeBriefingDate}</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="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="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="dSafeImplSign14 != null  and dSafeImplSign14 != ''"> and d_safe_impl_sign14 = #{dSafeImplSign14}</if>
            <if test="dSafeImplDate14 != null "> and d_safe_impl_date14 = #{dSafeImplDate14}</if>
            <if test="dSafeLiftedSign14 != null  and dSafeLiftedSign14 != ''"> and d_safe_lifted_sign14 = #{dSafeLiftedSign14}</if>
            <if test="dSafeLiftedDate14 != null "> and d_safe_lifted_date14 = #{dSafeLiftedDate14}</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="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="dSafeImplSign23 != null  and dSafeImplSign23 != ''"> and d_safe_impl_sign23 = #{dSafeImplSign23}</if>
            <if test="dSafeImplDate23 != null "> and d_safe_impl_date23 = #{dSafeImplDate23}</if>
            <if test="dSafeLiftedSign23 != null  and dSafeLiftedSign23 != ''"> and d_safe_lifted_sign23 = #{dSafeLiftedSign23}</if>
            <if test="dSafeLiftedDate23 != null "> and d_safe_lifted_date23 = #{dSafeLiftedDate23}</if>
            <if test="dSafeImplSign24 != null  and dSafeImplSign24 != ''"> and d_safe_impl_sign24 = #{dSafeImplSign24}</if>
            <if test="dSafeImplDate24 != null "> and d_safe_impl_date24 = #{dSafeImplDate24}</if>
            <if test="dSafeLiftedSign24 != null  and dSafeLiftedSign24 != ''"> and d_safe_lifted_sign24 = #{dSafeLiftedSign24}</if>
            <if test="dSafeLiftedDate24 != null "> and d_safe_lifted_date24 = #{dSafeLiftedDate24}</if>
            <if test="dSafeImplSign25 != null  and dSafeImplSign25 != ''"> and d_safe_impl_sign25 = #{dSafeImplSign25}</if>
            <if test="dSafeImplDate25 != null "> and d_safe_impl_date25 = #{dSafeImplDate25}</if>
            <if test="dSafeLiftedSign25 != null  and dSafeLiftedSign25 != ''"> and d_safe_lifted_sign25 = #{dSafeLiftedSign25}</if>
            <if test="dSafeLiftedDate25 != null "> and d_safe_lifted_date25 = #{dSafeLiftedDate25}</if>
            <if test="dSafeImplSign26 != null  and dSafeImplSign26 != ''"> and d_safe_impl_sign26 = #{dSafeImplSign26}</if>
            <if test="dSafeImplDate26 != null "> and d_safe_impl_date26 = #{dSafeImplDate26}</if>
            <if test="dSafeLiftedSign26 != null  and dSafeLiftedSign26 != ''"> and d_safe_lifted_sign26 = #{dSafeLiftedSign26}</if>
            <if test="dSafeLiftedDate26 != null "> and d_safe_lifted_date26 = #{dSafeLiftedDate26}</if>
            <if test="dSafeImplSign27 != null  and dSafeImplSign27 != ''"> and d_safe_impl_sign27 = #{dSafeImplSign27}</if>
            <if test="dSafeImplDate27 != null "> and d_safe_impl_date27 = #{dSafeImplDate27}</if>
            <if test="dSafeLiftedSign27 != null  and dSafeLiftedSign27 != ''"> and d_safe_lifted_sign27 = #{dSafeLiftedSign27}</if>
            <if test="dSafeLiftedSign29 != null  and dSafeLiftedSign29 != ''"> and d_safe_lifted_sign29 = #{dSafeLiftedSign29}</if>
            <if test="dSafeLiftedDate27 != null "> and d_safe_lifted_date27 = #{dSafeLiftedDate27}</if>
            <if test="dSafeLiftedDate29 != null "> and d_safe_lifted_date29 = #{dSafeLiftedDate29}</if>
            <if test="dSafeImplSign28 != null  and dSafeImplSign28 != ''"> and d_safe_impl_sign28 = #{dSafeImplSign28}</if>
            <if test="dSafeImplDate28 != null "> and d_safe_impl_date28 = #{dSafeImplDate28}</if>
            <if test="dSafeImplSign29 != null  and dSafeImplSign29 != ''"> and d_safe_impl_sign29 = #{dSafeImplSign29}</if>
            <if test="dSafeImplDate29 != null "> and d_safe_impl_date29 = #{dSafeImplDate29}</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="dSafeImplSign32 != null  and dSafeImplSign32 != ''"> and d_safe_impl_sign32 = #{dSafeImplSign32}</if>
            <if test="dSafeImplDate32 != null "> and d_safe_impl_date32 = #{dSafeImplDate32}</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="dSafeImplSign34 != null  and dSafeImplSign34 != ''"> and d_safe_impl_sign34 = #{dSafeImplSign34}</if>
            <if test="dSafeImplDate34 != null "> and d_safe_impl_date34 = #{dSafeImplDate34}</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="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="dSafeImplSign43 != null  and dSafeImplSign43 != ''"> and d_safe_impl_sign43 = #{dSafeImplSign43}</if>
            <if test="dSafeImplDate43 != null "> and d_safe_impl_date43 = #{dSafeImplDate43}</if>
            <if test="dSafeLiftedSign43 != null  and dSafeLiftedSign43 != ''"> and d_safe_lifted_sign43 = #{dSafeLiftedSign43}</if>
            <if test="dSafeLiftedDate43 != null "> and d_safe_lifted_date43 = #{dSafeLiftedDate43}</if>
            <if test="dSafeImplSign44 != null  and dSafeImplSign44 != ''"> and d_safe_impl_sign44 = #{dSafeImplSign44}</if>
            <if test="dSafeImplDate44 != null "> and d_safe_impl_date44 = #{dSafeImplDate44}</if>
            <if test="dSafeImplSign45 != null  and dSafeImplSign45 != ''"> and d_safe_impl_sign45 = #{dSafeImplSign45}</if>
            <if test="dSafeImplDate45 != null "> and d_safe_impl_date45 = #{dSafeImplDate45}</if>
            <if test="dSafeLiftedSign45 != null  and dSafeLiftedSign45 != ''"> and d_safe_lifted_sign45 = #{dSafeLiftedSign45}</if>
            <if test="dSafeLiftedDate45 != null "> and d_safe_lifted_date45 = #{dSafeLiftedDate45}</if>
            <if test="dSafeImplSign51 != null  and dSafeImplSign51 != ''"> and d_safe_impl_sign51 = #{dSafeImplSign51}</if>
            <if test="dSafeImplDate51 != null "> and d_safe_impl_date51 = #{dSafeImplDate51}</if>
            <if test="dSafeLiftedSign51 != null  and dSafeLiftedSign51 != ''"> and d_safe_lifted_sign51 = #{dSafeLiftedSign51}</if>
            <if test="dSafeLiftedDate51 != null "> and d_safe_lifted_date51 = #{dSafeLiftedDate51}</if>
            <if test="dSafeImplSign52 != null  and dSafeImplSign52 != ''"> and d_safe_impl_sign52 = #{dSafeImplSign52}</if>
            <if test="dSafeImplDate52 != null "> and d_safe_impl_date52 = #{dSafeImplDate52}</if>
            <if test="dSafeLiftedSign52 != null  and dSafeLiftedSign52 != ''"> and d_safe_lifted_sign52 = #{dSafeLiftedSign52}</if>
            <if test="dSafeLiftedDate52 != null "> and d_safe_lifted_date52 = #{dSafeLiftedDate52}</if>
            <if test="dSafeImplSign53 != null  and dSafeImplSign53 != ''"> and d_safe_impl_sign53 = #{dSafeImplSign53}</if>
            <if test="dSafeImplDate53 != null "> and d_safe_impl_date53 = #{dSafeImplDate53}</if>
            <if test="dSafeImplSign61 != null  and dSafeImplSign61 != ''"> and d_safe_impl_sign61 = #{dSafeImplSign61}</if>
            <if test="dSafeImplDate61 != null "> and d_safe_impl_date61 = #{dSafeImplDate61}</if>
            <if test="dSafeLiftedSign61 != null  and dSafeLiftedSign61 != ''"> and d_safe_lifted_sign61 = #{dSafeLiftedSign61}</if>
            <if test="dSafeLiftedDate61 != null "> and d_safe_lifted_date61 = #{dSafeLiftedDate61}</if>
            <if test="eIsPresent != null "> and e_is_present = #{eIsPresent}</if>
            <if test="eIsRequiredPpe != null "> and e_is_required_ppe = #{eIsRequiredPpe}</if>
            <if test="ePpeContent != null  and ePpeContent != ''"> and e_ppe_content = #{ePpeContent}</if>
            <if test="ePpeContent2 != null  and ePpeContent2 != ''"> and e_ppe_content2 = #{ePpeContent2}</if>
            <if test="eIsSafeGoggles != null "> and e_is_safe_goggles = #{eIsSafeGoggles}</if>
            <if test="eIsFaceShield != null "> and e_is_face_shield = #{eIsFaceShield}</if>
            <if test="eIsProtectGloves != null "> and e_is_protect_gloves = #{eIsProtectGloves}</if>
            <if test="eProtectGlovesContent != null  and eProtectGlovesContent != ''"> and e_protect_gloves_content = #{eProtectGlovesContent}</if>
            <if test="eIsRubberBoots != null "> and e_is_rubber_boots = #{eIsRubberBoots}</if>
            <if test="eIsContinueMonitoring != null  and eIsContinueMonitoring != ''"> and e_is_continue_monitoring = #{eIsContinueMonitoring}</if>
            <if test="eIsRubberApron != null "> and e_is_rubber_apron = #{eIsRubberApron}</if>
            <if test="eIsProtectSuit != null "> and e_is_protect_suit = #{eIsProtectSuit}</if>
            <if test="eSafeAttendantSign != null  and eSafeAttendantSign != ''"> and e_safe_attendant_sign = #{eSafeAttendantSign}</if>
            <if test="eProtectSuitContent != null  and eProtectSuitContent != ''"> and e_protect_suit_content = #{eProtectSuitContent}</if>
            <if test="eIsResProtect != null "> and e_is_res_protect = #{eIsResProtect}</if>
            <if test="eResProtectContent != null  and eResProtectContent != ''"> and e_res_protect_content = #{eResProtectContent}</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="eIsOtherProtect != null "> and e_is_other_protect = #{eIsOtherProtect}</if>
            <if test="eOtherProtectContent != null  and eOtherProtectContent != ''"> and e_other_protect_content = #{eOtherProtectContent}</if>
            <if test="eSafeAttendant != null  and eSafeAttendant != ''"> and e_safe_attendant = #{eSafeAttendant}</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="fIsAfterWorkSafe != null "> and f_is_after_work_safe = #{fIsAfterWorkSafe}</if>
            <if test="fAfterWorkSafeContent != null  and fAfterWorkSafeContent != ''"> and f_after_work_safe_content = #{fAfterWorkSafeContent}</if>
            <if test="hSafeMesA4Sign != null  and hSafeMesA4Sign != ''"> and h_safe_mes_a4_sign = #{hSafeMesA4Sign}</if>
            <if test="hSafeMesA4Date != null "> and h_safe_mes_a4_date = #{hSafeMesA4Date}</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="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="wordUrl != null  and wordUrl != ''"> and word_url = #{wordUrl}</if>
            <if test="pdfUrl != null  and pdfUrl != ''"> and pdf_url = #{pdfUrl}</if>
            <if test="jOneBSign != null  and jOneBSign != ''"> and j_one_b_sign = #{jOneBSign}</if>
            <if test="cIsGhs != null  and cIsGhs != ''"> and c_is_ghs = #{cIsGhs}</if>
            <if test="jOneBDate != null "> and j_one_b_date = #{jOneBDate}</if>
            <if test="jResMemberSign != null  and jResMemberSign != ''"> and j_res_member_sign = #{jResMemberSign}</if>
            <if test="jResMemberDate != null "> and j_res_member_date = #{jResMemberDate}</if>
            <if test="jEISign != null  and jEISign != ''"> and j_e_i_sign = #{jEISign}</if>
            <if test="jEIDate != null "> and j_e_i_date = #{jEIDate}</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 m_other_licence_one = #{mOtherLicenceOne}</if>
            <if test="mOtherLicenceTwo != null "> and m_other_licence_two = #{mOtherLicenceTwo}</if>
            <if test="mOtherLicenceThree != null "> and m_other_licence_three = #{mOtherLicenceThree}</if>
            and d.del_flag = 0
        </where>
        <!-- 数据范围过滤 -->
        ${params.dataScope}
    </select>
    
    <select id="selectTRestrictedSpacePermitById" parameterType="Long" resultMap="TRestrictedSpacePermitResult">
        <include refid="selectTRestrictedSpacePermitVo"/>
        where c_id = #{cId}
    </select>
        
    <insert id="insertTRestrictedSpacePermit" parameterType="TRestrictedSpacePermit">
        <!--<selectKey keyProperty="cId" resultType="long" order="BEFORE">-->
            <!--SELECT seq_t_restricted_space_permit.NEXTVAL as cId FROM DUAL-->
        <!--</selectKey>-->
        insert into t_restricted_space_permit
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="cId != null">c_id,</if>
            <if test="eMonitor != null">e_monitor,</if>
            <if test="aEquipmentName != null and aEquipmentName != ''">a_equipment_name,</if>
            <if test="aEquipmentLeader != null and aEquipmentLeader != ''">a_equipment_leader,</if>
            <if test="aEquipmentTel != null and aEquipmentTel != ''">a_equipment_tel,</if>
            <if test="aEquipmentOffice != null and aEquipmentOffice != ''">a_equipment_office,</if>
            <if test="aConstructionName != null and aConstructionName != ''">a_construction_name,</if>
            <if test="aConstructionLeader != null and aConstructionLeader != ''">a_construction_leader,</if>
            <if test="aConstructionTel != null and aConstructionTel != ''">a_construction_tel,</if>
            <if test="aConstructionOffice != null and aConstructionOffice != ''">a_construction_office,</if>
            <if test="aContractorName != null and aContractorName != ''">a_contractor_name,</if>
            <if test="aContractorLeader != null and aContractorLeader != ''">a_contractor_leader,</if>
            <if test="aContractorTel != null and aContractorTel != ''">a_contractor_tel,</if>
            <if test="aContractorOffice != null and aContractorOffice != ''">a_contractor_office,</if>
            <if test="aIsNeedSafeLiaison != null">a_is_need_safe_liaison,</if>
            <if test="aSafeLiaisonName != null and aSafeLiaisonName != ''">a_safe_liaison_name,</if>
            <if test="aSafeLiaisonSign != null and aSafeLiaisonSign != ''">a_safe_liaison_sign,</if>
            <if test="aSafeLiaisonTel != null and aSafeLiaisonTel != ''">a_safe_liaison_tel,</if>
            <if test="aSafeLiaisonOffice != null and aSafeLiaisonOffice != ''">a_safe_liaison_office,</if>
            <if test="bDeviceName != null and bDeviceName != ''">b_device_name,</if>
            <if test="bWorkContent != null and bWorkContent != ''">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 and cHarmMatterName != ''">c_harm_matter_name,</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="cIsOtherDanger != null">c_is_other_danger,</if>
            <if test="cOtherDangerContent != null and cOtherDangerContent != ''">c_other_danger_content,</if>
            <if test="cIsHazardsProd != null">c_is_hazards_prod,</if>
            <if test="cIsHazardsProdContent != null and cIsHazardsProdContent != ''">c_is_hazards_prod_content,</if>
            <if test="cOtherId != null">c_other_id,</if>
            <if test="bAreaNo != null and bAreaNo != ''">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 and dEleCircuitNo != ''">d_ele_circuit_no,</if>
            <if test="dInsTagNo != null and dInsTagNo != ''">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 and dIsOtherEquSafeContent != ''">d_is_other_equ_safe_content,</if>
            <if test="dIsDepress != null">d_is_depress,</if>
            <if test="dIsDoubleBlock != null">d_is_double_block,</if>
            <if test="dIsLockoutUsing != null">d_is_lockout_using,</if>
            <if test="dLockoutUsingContent != null and dLockoutUsingContent != ''">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 and dMecSecureContent != ''">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 and dOtherSafePlantContent != ''">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 and dCleanContent != ''">d_clean_content,</if>
            <if test="dIsFlush != null">d_is_flush,</if>
            <if test="dFlushContent != null and dFlushContent != ''">d_flush_content,</if>
            <if test="dIsOhterClean != null">d_is_ohter_clean,</if>
            <if test="dOtherCleanContent != null and dOtherCleanContent != ''">d_other_clean_content,</if>
            <if test="dIsSiteDemarcation != null">d_is_site_demarcation,</if>
            <if test="dSiteDemarcationContent != null and dSiteDemarcationContent != ''">d_site_demarcation_content,</if>
            <if test="dIsOtherSafe != null">d_is_other_safe,</if>
            <if test="dIsAreaCover != null">d_is_area_cover,</if>
            <if test="dOtherSafeContent != null">d_other_safe_content,</if>
            <if test="dAreaCoverContent != null and dAreaCoverContent != ''">d_area_cover_content,</if>
            <if test="dIsVentilate != null">d_is_ventilate,</if>
            <if test="dIsCloseTrucks != null">d_is_close_trucks,</if>
            <if test="dIsLeakFlanges != null">d_is_leak_flanges,</if>
            <if test="dVentilateContent != null">d_ventilate_content,</if>
            <if test="dIsVentilateUse != null">d_is_ventilate_use,</if>
            <if test="dVentilateUseContent != null">d_ventilate_use_content,</if>
            <if test="dIsVentilateDate != null">d_is_ventilate_date,</if>
            <if test="dVentilateDateContent != null">d_ventilate_date_content,</if>
            <if test="dIsAnalysis != null">d_is_analysis,</if>
            <if test="dAnalysisContent != null">d_analysis_content,</if>
            <if test="dIsOtherMeasure != null">d_is_other_measure,</if>
            <if test="dOtherMeasureContent != null and dOtherMeasureContent != ''">d_other_measure_content,</if>
            <if test="dPartakeBriefingSign != null and dPartakeBriefingSign != ''">d_partake_briefing_sign,</if>
            <if test="dPartakeBriefingDate != null">d_partake_briefing_date,</if>
            <if test="dSafeImplSign11 != null and dSafeImplSign11 != ''">d_safe_impl_sign11,</if>
            <if test="dSafeImplDate11 != null">d_safe_impl_date11,</if>
            <if test="dSafeLiftedSign11 != null and dSafeLiftedSign11 != ''">d_safe_lifted_sign11,</if>
            <if test="dSafeLiftedDate11 != null">d_safe_lifted_date11,</if>
            <if test="dSafeImplSign12 != null and dSafeImplSign12 != ''">d_safe_impl_sign12,</if>
            <if test="dSafeImplDate12 != null">d_safe_impl_date12,</if>
            <if test="dSafeLiftedSign12 != null and dSafeLiftedSign12 != ''">d_safe_lifted_sign12,</if>
            <if test="dSafeLiftedDate12 != null">d_safe_lifted_date12,</if>
            <if test="dSafeImplSign13 != null and dSafeImplSign13 != ''">d_safe_impl_sign13,</if>
            <if test="dSafeImplDate13 != null">d_safe_impl_date13,</if>
            <if test="dSafeLiftedSign13 != null and dSafeLiftedSign13 != ''">d_safe_lifted_sign13,</if>
            <if test="dSafeLiftedDate13 != null">d_safe_lifted_date13,</if>
            <if test="dSafeImplSign14 != null and dSafeImplSign14 != ''">d_safe_impl_sign14,</if>
            <if test="dSafeImplDate14 != null">d_safe_impl_date14,</if>
            <if test="dSafeLiftedSign14 != null and dSafeLiftedSign14 != ''">d_safe_lifted_sign14,</if>
            <if test="dSafeLiftedDate14 != null">d_safe_lifted_date14,</if>
            <if test="dSafeImplSign21 != null and dSafeImplSign21 != ''">d_safe_impl_sign21,</if>
            <if test="dSafeImplDate21 != null">d_safe_impl_date21,</if>
            <if test="dSafeImplSign22 != null and dSafeImplSign22 != ''">d_safe_impl_sign22,</if>
            <if test="dSafeImplDate22 != null">d_safe_impl_date22,</if>
            <if test="dSafeLiftedSign22 != null and dSafeLiftedSign22 != ''">d_safe_lifted_sign22,</if>
            <if test="dSafeLiftedDate22 != null">d_safe_lifted_date22,</if>
            <if test="dSafeImplSign23 != null and dSafeImplSign23 != ''">d_safe_impl_sign23,</if>
            <if test="dSafeImplDate23 != null">d_safe_impl_date23,</if>
            <if test="dSafeLiftedSign23 != null and dSafeLiftedSign23 != ''">d_safe_lifted_sign23,</if>
            <if test="dSafeLiftedDate23 != null">d_safe_lifted_date23,</if>
            <if test="dSafeImplSign24 != null and dSafeImplSign24 != ''">d_safe_impl_sign24,</if>
            <if test="dSafeImplDate24 != null">d_safe_impl_date24,</if>
            <if test="dSafeLiftedSign24 != null and dSafeLiftedSign24 != ''">d_safe_lifted_sign24,</if>
            <if test="dSafeLiftedDate24 != null">d_safe_lifted_date24,</if>
            <if test="dSafeImplSign25 != null and dSafeImplSign25 != ''">d_safe_impl_sign25,</if>
            <if test="dSafeImplDate25 != null">d_safe_impl_date25,</if>
            <if test="dSafeLiftedSign25 != null and dSafeLiftedSign25 != ''">d_safe_lifted_sign25,</if>
            <if test="dSafeLiftedDate25 != null">d_safe_lifted_date25,</if>
            <if test="dSafeImplSign26 != null and dSafeImplSign26 != ''">d_safe_impl_sign26,</if>
            <if test="dSafeImplDate26 != null">d_safe_impl_date26,</if>
            <if test="dSafeLiftedSign26 != null and dSafeLiftedSign26 != ''">d_safe_lifted_sign26,</if>
            <if test="dSafeLiftedDate26 != null">d_safe_lifted_date26,</if>
            <if test="dSafeImplSign27 != null and dSafeImplSign27 != ''">d_safe_impl_sign27,</if>
            <if test="dSafeImplDate27 != null">d_safe_impl_date27,</if>
            <if test="dSafeLiftedSign27 != null and dSafeLiftedSign27 != ''">d_safe_lifted_sign27,</if>
            <if test="dSafeLiftedSign29 != null">d_safe_lifted_sign29,</if>
            <if test="dSafeLiftedDate27 != null">d_safe_lifted_date27,</if>
            <if test="dSafeLiftedDate29 != null">d_safe_lifted_date29,</if>
            <if test="dSafeImplSign28 != null and dSafeImplSign28 != ''">d_safe_impl_sign28,</if>
            <if test="dSafeImplDate28 != null">d_safe_impl_date28,</if>
            <if test="dSafeImplSign29 != null and dSafeImplSign29 != ''">d_safe_impl_sign29,</if>
            <if test="dSafeImplDate29 != null">d_safe_impl_date29,</if>
            <if test="dSafeImplSign31 != null and dSafeImplSign31 != ''">d_safe_impl_sign31,</if>
            <if test="dSafeImplDate31 != null">d_safe_impl_date31,</if>
            <if test="dSafeImplSign32 != null and dSafeImplSign32 != ''">d_safe_impl_sign32,</if>
            <if test="dSafeImplDate32 != null">d_safe_impl_date32,</if>
            <if test="dSafeImplSign33 != null and dSafeImplSign33 != ''">d_safe_impl_sign33,</if>
            <if test="dSafeImplDate33 != null">d_safe_impl_date33,</if>
            <if test="dSafeImplSign34 != null and dSafeImplSign34 != ''">d_safe_impl_sign34,</if>
            <if test="dSafeImplDate34 != null">d_safe_impl_date34,</if>
            <if test="dSafeImplSign41 != null and dSafeImplSign41 != ''">d_safe_impl_sign41,</if>
            <if test="dSafeImplDate41 != null">d_safe_impl_date41,</if>
            <if test="dSafeLiftedSign41 != null and dSafeLiftedSign41 != ''">d_safe_lifted_sign41,</if>
            <if test="dSafeLiftedDate41 != null">d_safe_lifted_date41,</if>
            <if test="dSafeImplSign42 != null and dSafeImplSign42 != ''">d_safe_impl_sign42,</if>
            <if test="dSafeImplDate42 != null">d_safe_impl_date42,</if>
            <if test="dSafeLiftedSign42 != null and dSafeLiftedSign42 != ''">d_safe_lifted_sign42,</if>
            <if test="dSafeLiftedDate42 != null">d_safe_lifted_date42,</if>
            <if test="dSafeImplSign43 != null and dSafeImplSign43 != ''">d_safe_impl_sign43,</if>
            <if test="dSafeImplDate43 != null">d_safe_impl_date43,</if>
            <if test="dSafeLiftedSign43 != null and dSafeLiftedSign43 != ''">d_safe_lifted_sign43,</if>
            <if test="dSafeLiftedDate43 != null">d_safe_lifted_date43,</if>
            <if test="dSafeImplSign44 != null and dSafeImplSign44 != ''">d_safe_impl_sign44,</if>
            <if test="dSafeImplDate44 != null">d_safe_impl_date44,</if>
            <if test="dSafeImplSign45 != null and dSafeImplSign45 != ''">d_safe_impl_sign45,</if>
            <if test="dSafeImplDate45 != null">d_safe_impl_date45,</if>
            <if test="dSafeLiftedSign45 != null and dSafeLiftedSign45 != ''">d_safe_lifted_sign45,</if>
            <if test="dSafeLiftedDate45 != null">d_safe_lifted_date45,</if>
            <if test="dSafeImplSign51 != null and dSafeImplSign51 != ''">d_safe_impl_sign51,</if>
            <if test="dSafeImplDate51 != null">d_safe_impl_date51,</if>
            <if test="dSafeLiftedSign51 != null and dSafeLiftedSign51 != ''">d_safe_lifted_sign51,</if>
            <if test="dSafeLiftedDate51 != null">d_safe_lifted_date51,</if>
            <if test="dSafeImplSign52 != null and dSafeImplSign52 != ''">d_safe_impl_sign52,</if>
            <if test="dSafeImplDate52 != null">d_safe_impl_date52,</if>
            <if test="dSafeLiftedSign52 != null and dSafeLiftedSign52 != ''">d_safe_lifted_sign52,</if>
            <if test="dSafeLiftedDate52 != null">d_safe_lifted_date52,</if>
            <if test="dSafeImplSign53 != null and dSafeImplSign53 != ''">d_safe_impl_sign53,</if>
            <if test="dSafeImplDate53 != null">d_safe_impl_date53,</if>
            <if test="dSafeImplSign61 != null and dSafeImplSign61 != ''">d_safe_impl_sign61,</if>
            <if test="dSafeImplDate61 != null">d_safe_impl_date61,</if>
            <if test="dSafeLiftedSign61 != null and dSafeLiftedSign61 != ''">d_safe_lifted_sign61,</if>
            <if test="dSafeLiftedDate61 != null">d_safe_lifted_date61,</if>
            <if test="eIsPresent != null">e_is_present,</if>
            <if test="eIsRequiredPpe != null">e_is_required_ppe,</if>
            <if test="ePpeContent != null and ePpeContent != ''">e_ppe_content,</if>
            <if test="ePpeContent2 != null and ePpeContent2 != ''">e_ppe_content2,</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 and eProtectGlovesContent != ''">e_protect_gloves_content,</if>
            <if test="eIsRubberBoots != null">e_is_rubber_boots,</if>
            <if test="eIsContinueMonitoring != null">e_is_continue_monitoring,</if>
            <if test="eIsRubberApron != null">e_is_rubber_apron,</if>
            <if test="eIsProtectSuit != null">e_is_protect_suit,</if>
            <if test="eSafeAttendantSign != null">e_safe_attendant_sign,</if>
            <if test="eProtectSuitContent != null and eProtectSuitContent != ''">e_protect_suit_content,</if>
            <if test="eIsResProtect != null">e_is_res_protect,</if>
            <if test="eResProtectContent != null and eResProtectContent != ''">e_res_protect_content,</if>
            <if test="eIsFallArrest != null">e_is_fall_arrest,</if>
            <if test="eFallArrestContent != null and eFallArrestContent != ''">e_fall_arrest_content,</if>
            <if test="eIsOtherProtect != null">e_is_other_protect,</if>
            <if test="eOtherProtectContent != null and eOtherProtectContent != ''">e_other_protect_content,</if>
            <if test="eSafeAttendant != null and eSafeAttendant != ''">e_safe_attendant,</if>
            <if test="eIsNaturalVen != null">e_is_natural_ven,</if>
            <if test="eNaturalVenContent != null and eNaturalVenContent != ''">e_natural_ven_content,</if>
            <if test="eIsMecVen != null">e_is_mec_ven,</if>
            <if test="eMecVenContent != null and eMecVenContent != ''">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 and eAnalyzeAirContent != ''">e_analyze_air_content,</if>
            <if test="eAnalyzeAirInterval != null and eAnalyzeAirInterval != ''">e_analyze_air_interval,</if>
            <if test="eIsOtherVen != null">e_is_other_ven,</if>
            <if test="eOtherVenContent != null and eOtherVenContent != ''">e_other_ven_content,</if>
            <if test="fIsAfterWorkSafe != null">f_is_after_work_safe,</if>
            <if test="fAfterWorkSafeContent != null and fAfterWorkSafeContent != ''">f_after_work_safe_content,</if>
            <if test="hSafeMesA4Sign != null">h_safe_mes_a4_sign,</if>
            <if test="hSafeMesA4Date != null">h_safe_mes_a4_date,</if>
            <if test="gFirstSign != null and gFirstSign != ''">g_first_sign,</if>
            <if test="gFirstDate != null">g_first_date,</if>
            <if test="gSecondSign != null and gSecondSign != ''">g_second_sign,</if>
            <if test="gSecondDate != null">g_second_date,</if>
            <if test="gThirdSign != null and gThirdSign != ''">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 and gSpecialAssessment != ''">g_special_assessment,</if>
            <if test="hSafeMesSign != null and hSafeMesSign != ''">h_safe_mes_sign,</if>
            <if test="hSafeMesDate != null">h_safe_mes_date,</if>
            <if test="iOneASign != null and iOneASign != ''">i_one_a_sign,</if>
            <if test="iOneADate != null">i_one_a_date,</if>
            <if test="iOneBSign != null and iOneBSign != ''">i_one_b_sign,</if>
            <if test="iOneBDate != null">i_one_b_date,</if>
            <if test="wordUrl != null">word_url,</if>
            <if test="pdfUrl != null">pdf_url,</if>
            <if test="jOneBSign != null and jOneBSign != ''">j_one_b_sign,</if>
            <if test="cIsGhs != null">c_is_ghs,</if>
            <if test="jOneBDate != null">j_one_b_date,</if>
            <if test="jResMemberSign != null and jResMemberSign != ''">j_res_member_sign,</if>
            <if test="jResMemberDate != null">j_res_member_date,</if>
            <if test="jEISign != null and jEISign != ''">j_e_i_sign,</if>
            <if test="jEIDate != null">j_e_i_date,</if>
            <if test="kConfirmSign != null and kConfirmSign != ''">k_confirm_sign,</if>
            <if test="kConfirmDate != null">k_confirm_date,</if>
            <if test="lNoticeSign != null and lNoticeSign != ''">l_notice_sign,</if>
            <if test="lNoticeDate != null">l_notice_date,</if>
            <if test="mAssessDContent != null and mAssessDContent != ''">m_assess_d_content,</if>
            <if test="mAssessDSign != null and mAssessDSign != ''">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="cIsYesDanger != null">c_is_yes_danger,</if>
            <if test="isEquipmentHazards != null">is_equipment_hazards,</if>
            <if test="isFacilityHazards != null">is_facility_hazards,</if>
            <if test="cIsOtherA != null">c_is_other_a,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="cId != null">#{cId},</if>
            <if test="eMonitor != null">#{eMonitor},</if>
            <if test="aEquipmentName != null and aEquipmentName != ''">#{aEquipmentName},</if>
            <if test="aEquipmentLeader != null and aEquipmentLeader != ''">#{aEquipmentLeader},</if>
            <if test="aEquipmentTel != null and aEquipmentTel != ''">#{aEquipmentTel},</if>
            <if test="aEquipmentOffice != null and aEquipmentOffice != ''">#{aEquipmentOffice},</if>
            <if test="aConstructionName != null and aConstructionName != ''">#{aConstructionName},</if>
            <if test="aConstructionLeader != null and aConstructionLeader != ''">#{aConstructionLeader},</if>
            <if test="aConstructionTel != null and aConstructionTel != ''">#{aConstructionTel},</if>
            <if test="aConstructionOffice != null and aConstructionOffice != ''">#{aConstructionOffice},</if>
            <if test="aContractorName != null and aContractorName != ''">#{aContractorName},</if>
            <if test="aContractorLeader != null and aContractorLeader != ''">#{aContractorLeader},</if>
            <if test="aContractorTel != null and aContractorTel != ''">#{aContractorTel},</if>
            <if test="aContractorOffice != null and aContractorOffice != ''">#{aContractorOffice},</if>
            <if test="aIsNeedSafeLiaison != null">#{aIsNeedSafeLiaison},</if>
            <if test="aSafeLiaisonName != null and aSafeLiaisonName != ''">#{aSafeLiaisonName},</if>
            <if test="aSafeLiaisonSign != null and aSafeLiaisonSign != ''">#{aSafeLiaisonSign},</if>
            <if test="aSafeLiaisonTel != null and aSafeLiaisonTel != ''">#{aSafeLiaisonTel},</if>
            <if test="aSafeLiaisonOffice != null and aSafeLiaisonOffice != ''">#{aSafeLiaisonOffice},</if>
            <if test="bDeviceName != null and bDeviceName != ''">#{bDeviceName},</if>
            <if test="bWorkContent != null and bWorkContent != ''">#{bWorkContent},</if>
            <if test="bValidityStartTime != null">#{bValidityStartTime},</if>
            <if test="bValidityEndTime != null">#{bValidityEndTime},</if>
            <if test="cHarmMatterName != null and cHarmMatterName != ''">#{cHarmMatterName},</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="cIsOtherDanger != null">#{cIsOtherDanger},</if>
            <if test="cOtherDangerContent != null and cOtherDangerContent != ''">#{cOtherDangerContent},</if>
            <if test="cIsHazardsProd != null">#{cIsHazardsProd},</if>
            <if test="cIsHazardsProdContent != null and cIsHazardsProdContent != ''">#{cIsHazardsProdContent},</if>
            <if test="cOtherId != null">#{cOtherId},</if>
            <if test="bAreaNo != null and bAreaNo != ''">#{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 and dEleCircuitNo != ''">#{dEleCircuitNo},</if>
            <if test="dInsTagNo != null and dInsTagNo != ''">#{dInsTagNo},</if>
            <if test="dIsRadioactiveSources != null">#{dIsRadioactiveSources},</if>
            <if test="dIsOtherEquSafe != null">#{dIsOtherEquSafe},</if>
            <if test="dIsOtherEquSafeContent != null and dIsOtherEquSafeContent != ''">#{dIsOtherEquSafeContent},</if>
            <if test="dIsDepress != null">#{dIsDepress},</if>
            <if test="dIsDoubleBlock != null">#{dIsDoubleBlock},</if>
            <if test="dIsLockoutUsing != null">#{dIsLockoutUsing},</if>
            <if test="dLockoutUsingContent != null and dLockoutUsingContent != ''">#{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 and dMecSecureContent != ''">#{dMecSecureContent},</if>
            <if test="dIsIsolationDiagram != null">#{dIsIsolationDiagram},</if>
            <if test="dIsOtherSafePlant != null">#{dIsOtherSafePlant},</if>
            <if test="dOtherSafePlantContent != null and dOtherSafePlantContent != ''">#{dOtherSafePlantContent},</if>
            <if test="dIsDrain != null">#{dIsDrain},</if>
            <if test="dIsClean != null">#{dIsClean},</if>
            <if test="dCleanContent != null and dCleanContent != ''">#{dCleanContent},</if>
            <if test="dIsFlush != null">#{dIsFlush},</if>
            <if test="dFlushContent != null and dFlushContent != ''">#{dFlushContent},</if>
            <if test="dIsOhterClean != null">#{dIsOhterClean},</if>
            <if test="dOtherCleanContent != null and dOtherCleanContent != ''">#{dOtherCleanContent},</if>
            <if test="dIsSiteDemarcation != null">#{dIsSiteDemarcation},</if>
            <if test="dSiteDemarcationContent != null and dSiteDemarcationContent != ''">#{dSiteDemarcationContent},</if>
            <if test="dIsOtherSafe != null">#{dIsOtherSafe},</if>
            <if test="dIsAreaCover != null">#{dIsAreaCover},</if>
            <if test="dOtherSafeContent != null">#{dOtherSafeContent},</if>
            <if test="dAreaCoverContent != null and dAreaCoverContent != ''">#{dAreaCoverContent},</if>
            <if test="dIsVentilate != null">#{dIsVentilate},</if>
            <if test="dIsCloseTrucks != null">#{dIsCloseTrucks},</if>
            <if test="dIsLeakFlanges != null">#{dIsLeakFlanges},</if>
            <if test="dVentilateContent != null">#{dVentilateContent},</if>
            <if test="dIsVentilateUse != null">#{dIsVentilateUse},</if>
            <if test="dVentilateUseContent != null">#{dVentilateUseContent},</if>
            <if test="dIsVentilateDate != null">#{dIsVentilateDate},</if>
            <if test="dVentilateDateContent != null">#{dVentilateDateContent},</if>
            <if test="dIsAnalysis != null">#{dIsAnalysis},</if>
            <if test="dAnalysisContent != null">#{dAnalysisContent},</if>
            <if test="dIsOtherMeasure != null">#{dIsOtherMeasure},</if>
            <if test="dOtherMeasureContent != null and dOtherMeasureContent != ''">#{dOtherMeasureContent},</if>
            <if test="dPartakeBriefingSign != null and dPartakeBriefingSign != ''">#{dPartakeBriefingSign},</if>
            <if test="dPartakeBriefingDate != null">#{dPartakeBriefingDate},</if>
            <if test="dSafeImplSign11 != null and dSafeImplSign11 != ''">#{dSafeImplSign11},</if>
            <if test="dSafeImplDate11 != null">#{dSafeImplDate11},</if>
            <if test="dSafeLiftedSign11 != null and dSafeLiftedSign11 != ''">#{dSafeLiftedSign11},</if>
            <if test="dSafeLiftedDate11 != null">#{dSafeLiftedDate11},</if>
            <if test="dSafeImplSign12 != null and dSafeImplSign12 != ''">#{dSafeImplSign12},</if>
            <if test="dSafeImplDate12 != null">#{dSafeImplDate12},</if>
            <if test="dSafeLiftedSign12 != null and dSafeLiftedSign12 != ''">#{dSafeLiftedSign12},</if>
            <if test="dSafeLiftedDate12 != null">#{dSafeLiftedDate12},</if>
            <if test="dSafeImplSign13 != null and dSafeImplSign13 != ''">#{dSafeImplSign13},</if>
            <if test="dSafeImplDate13 != null">#{dSafeImplDate13},</if>
            <if test="dSafeLiftedSign13 != null and dSafeLiftedSign13 != ''">#{dSafeLiftedSign13},</if>
            <if test="dSafeLiftedDate13 != null">#{dSafeLiftedDate13},</if>
            <if test="dSafeImplSign14 != null and dSafeImplSign14 != ''">#{dSafeImplSign14},</if>
            <if test="dSafeImplDate14 != null">#{dSafeImplDate14},</if>
            <if test="dSafeLiftedSign14 != null and dSafeLiftedSign14 != ''">#{dSafeLiftedSign14},</if>
            <if test="dSafeLiftedDate14 != null">#{dSafeLiftedDate14},</if>
            <if test="dSafeImplSign21 != null and dSafeImplSign21 != ''">#{dSafeImplSign21},</if>
            <if test="dSafeImplDate21 != null">#{dSafeImplDate21},</if>
            <if test="dSafeImplSign22 != null and dSafeImplSign22 != ''">#{dSafeImplSign22},</if>
            <if test="dSafeImplDate22 != null">#{dSafeImplDate22},</if>
            <if test="dSafeLiftedSign22 != null and dSafeLiftedSign22 != ''">#{dSafeLiftedSign22},</if>
            <if test="dSafeLiftedDate22 != null">#{dSafeLiftedDate22},</if>
            <if test="dSafeImplSign23 != null and dSafeImplSign23 != ''">#{dSafeImplSign23},</if>
            <if test="dSafeImplDate23 != null">#{dSafeImplDate23},</if>
            <if test="dSafeLiftedSign23 != null and dSafeLiftedSign23 != ''">#{dSafeLiftedSign23},</if>
            <if test="dSafeLiftedDate23 != null">#{dSafeLiftedDate23},</if>
            <if test="dSafeImplSign24 != null and dSafeImplSign24 != ''">#{dSafeImplSign24},</if>
            <if test="dSafeImplDate24 != null">#{dSafeImplDate24},</if>
            <if test="dSafeLiftedSign24 != null and dSafeLiftedSign24 != ''">#{dSafeLiftedSign24},</if>
            <if test="dSafeLiftedDate24 != null">#{dSafeLiftedDate24},</if>
            <if test="dSafeImplSign25 != null and dSafeImplSign25 != ''">#{dSafeImplSign25},</if>
            <if test="dSafeImplDate25 != null">#{dSafeImplDate25},</if>
            <if test="dSafeLiftedSign25 != null and dSafeLiftedSign25 != ''">#{dSafeLiftedSign25},</if>
            <if test="dSafeLiftedDate25 != null">#{dSafeLiftedDate25},</if>
            <if test="dSafeImplSign26 != null and dSafeImplSign26 != ''">#{dSafeImplSign26},</if>
            <if test="dSafeImplDate26 != null">#{dSafeImplDate26},</if>
            <if test="dSafeLiftedSign26 != null and dSafeLiftedSign26 != ''">#{dSafeLiftedSign26},</if>
            <if test="dSafeLiftedDate26 != null">#{dSafeLiftedDate26},</if>
            <if test="dSafeImplSign27 != null and dSafeImplSign27 != ''">#{dSafeImplSign27},</if>
            <if test="dSafeImplDate27 != null">#{dSafeImplDate27},</if>
            <if test="dSafeLiftedSign27 != null and dSafeLiftedSign27 != ''">#{dSafeLiftedSign27},</if>
            <if test="dSafeLiftedSign29 != null">#{dSafeLiftedSign29},</if>
            <if test="dSafeLiftedDate27 != null">#{dSafeLiftedDate27},</if>
            <if test="dSafeLiftedDate29 != null">#{dSafeLiftedDate29},</if>
            <if test="dSafeImplSign28 != null and dSafeImplSign28 != ''">#{dSafeImplSign28},</if>
            <if test="dSafeImplDate28 != null">#{dSafeImplDate28},</if>
            <if test="dSafeImplSign29 != null and dSafeImplSign29 != ''">#{dSafeImplSign29},</if>
            <if test="dSafeImplDate29 != null">#{dSafeImplDate29},</if>
            <if test="dSafeImplSign31 != null and dSafeImplSign31 != ''">#{dSafeImplSign31},</if>
            <if test="dSafeImplDate31 != null">#{dSafeImplDate31},</if>
            <if test="dSafeImplSign32 != null and dSafeImplSign32 != ''">#{dSafeImplSign32},</if>
            <if test="dSafeImplDate32 != null">#{dSafeImplDate32},</if>
            <if test="dSafeImplSign33 != null and dSafeImplSign33 != ''">#{dSafeImplSign33},</if>
            <if test="dSafeImplDate33 != null">#{dSafeImplDate33},</if>
            <if test="dSafeImplSign34 != null and dSafeImplSign34 != ''">#{dSafeImplSign34},</if>
            <if test="dSafeImplDate34 != null">#{dSafeImplDate34},</if>
            <if test="dSafeImplSign41 != null and dSafeImplSign41 != ''">#{dSafeImplSign41},</if>
            <if test="dSafeImplDate41 != null">#{dSafeImplDate41},</if>
            <if test="dSafeLiftedSign41 != null and dSafeLiftedSign41 != ''">#{dSafeLiftedSign41},</if>
            <if test="dSafeLiftedDate41 != null">#{dSafeLiftedDate41},</if>
            <if test="dSafeImplSign42 != null and dSafeImplSign42 != ''">#{dSafeImplSign42},</if>
            <if test="dSafeImplDate42 != null">#{dSafeImplDate42},</if>
            <if test="dSafeLiftedSign42 != null and dSafeLiftedSign42 != ''">#{dSafeLiftedSign42},</if>
            <if test="dSafeLiftedDate42 != null">#{dSafeLiftedDate42},</if>
            <if test="dSafeImplSign43 != null and dSafeImplSign43 != ''">#{dSafeImplSign43},</if>
            <if test="dSafeImplDate43 != null">#{dSafeImplDate43},</if>
            <if test="dSafeLiftedSign43 != null and dSafeLiftedSign43 != ''">#{dSafeLiftedSign43},</if>
            <if test="dSafeLiftedDate43 != null">#{dSafeLiftedDate43},</if>
            <if test="dSafeImplSign44 != null and dSafeImplSign44 != ''">#{dSafeImplSign44},</if>
            <if test="dSafeImplDate44 != null">#{dSafeImplDate44},</if>
            <if test="dSafeImplSign45 != null and dSafeImplSign45 != ''">#{dSafeImplSign45},</if>
            <if test="dSafeImplDate45 != null">#{dSafeImplDate45},</if>
            <if test="dSafeLiftedSign45 != null and dSafeLiftedSign45 != ''">#{dSafeLiftedSign45},</if>
            <if test="dSafeLiftedDate45 != null">#{dSafeLiftedDate45},</if>
            <if test="dSafeImplSign51 != null and dSafeImplSign51 != ''">#{dSafeImplSign51},</if>
            <if test="dSafeImplDate51 != null">#{dSafeImplDate51},</if>
            <if test="dSafeLiftedSign51 != null and dSafeLiftedSign51 != ''">#{dSafeLiftedSign51},</if>
            <if test="dSafeLiftedDate51 != null">#{dSafeLiftedDate51},</if>
            <if test="dSafeImplSign52 != null and dSafeImplSign52 != ''">#{dSafeImplSign52},</if>
            <if test="dSafeImplDate52 != null">#{dSafeImplDate52},</if>
            <if test="dSafeLiftedSign52 != null and dSafeLiftedSign52 != ''">#{dSafeLiftedSign52},</if>
            <if test="dSafeLiftedDate52 != null">#{dSafeLiftedDate52},</if>
            <if test="dSafeImplSign53 != null and dSafeImplSign53 != ''">#{dSafeImplSign53},</if>
            <if test="dSafeImplDate53 != null">#{dSafeImplDate53},</if>
            <if test="dSafeImplSign61 != null and dSafeImplSign61 != ''">#{dSafeImplSign61},</if>
            <if test="dSafeImplDate61 != null">#{dSafeImplDate61},</if>
            <if test="dSafeLiftedSign61 != null and dSafeLiftedSign61 != ''">#{dSafeLiftedSign61},</if>
            <if test="dSafeLiftedDate61 != null">#{dSafeLiftedDate61},</if>
            <if test="eIsPresent != null">#{eIsPresent},</if>
            <if test="eIsRequiredPpe != null">#{eIsRequiredPpe},</if>
            <if test="ePpeContent != null and ePpeContent != ''">#{ePpeContent},</if>
            <if test="ePpeContent2 != null and ePpeContent2 != ''">#{ePpeContent2},</if>
            <if test="eIsSafeGoggles != null">#{eIsSafeGoggles},</if>
            <if test="eIsFaceShield != null">#{eIsFaceShield},</if>
            <if test="eIsProtectGloves != null">#{eIsProtectGloves},</if>
            <if test="eProtectGlovesContent != null and eProtectGlovesContent != ''">#{eProtectGlovesContent},</if>
            <if test="eIsRubberBoots != null">#{eIsRubberBoots},</if>
            <if test="eIsContinueMonitoring != null">#{eIsContinueMonitoring},</if>
            <if test="eIsRubberApron != null">#{eIsRubberApron},</if>
            <if test="eIsProtectSuit != null">#{eIsProtectSuit},</if>
            <if test="eSafeAttendantSign != null">#{eSafeAttendantSign},</if>
            <if test="eProtectSuitContent != null and eProtectSuitContent != ''">#{eProtectSuitContent},</if>
            <if test="eIsResProtect != null">#{eIsResProtect},</if>
            <if test="eResProtectContent != null and eResProtectContent != ''">#{eResProtectContent},</if>
            <if test="eIsFallArrest != null">#{eIsFallArrest},</if>
            <if test="eFallArrestContent != null and eFallArrestContent != ''">#{eFallArrestContent},</if>
            <if test="eIsOtherProtect != null">#{eIsOtherProtect},</if>
            <if test="eOtherProtectContent != null and eOtherProtectContent != ''">#{eOtherProtectContent},</if>
            <if test="eSafeAttendant != null and eSafeAttendant != ''">#{eSafeAttendant},</if>
            <if test="eIsNaturalVen != null">#{eIsNaturalVen},</if>
            <if test="eNaturalVenContent != null and eNaturalVenContent != ''">#{eNaturalVenContent},</if>
            <if test="eIsMecVen != null">#{eIsMecVen},</if>
            <if test="eMecVenContent != null and eMecVenContent != ''">#{eMecVenContent},</if>
            <if test="eIsExxtractDust != null">#{eIsExxtractDust},</if>
            <if test="eIsAnalyzeAir != null">#{eIsAnalyzeAir},</if>
            <if test="eAnalyzeAirContent != null and eAnalyzeAirContent != ''">#{eAnalyzeAirContent},</if>
            <if test="eAnalyzeAirInterval != null and eAnalyzeAirInterval != ''">#{eAnalyzeAirInterval},</if>
            <if test="eIsOtherVen != null">#{eIsOtherVen},</if>
            <if test="eOtherVenContent != null and eOtherVenContent != ''">#{eOtherVenContent},</if>
            <if test="fIsAfterWorkSafe != null">#{fIsAfterWorkSafe},</if>
            <if test="fAfterWorkSafeContent != null and fAfterWorkSafeContent != ''">#{fAfterWorkSafeContent},</if>
            <if test="hSafeMesA4Sign != null">#{hSafeMesA4Sign},</if>
            <if test="hSafeMesA4Date != null">#{hSafeMesA4Date},</if>
            <if test="gFirstSign != null and gFirstSign != ''">#{gFirstSign},</if>
            <if test="gFirstDate != null">#{gFirstDate},</if>
            <if test="gSecondSign != null and gSecondSign != ''">#{gSecondSign},</if>
            <if test="gSecondDate != null">#{gSecondDate},</if>
            <if test="gThirdSign != null and gThirdSign != ''">#{gThirdSign},</if>
            <if test="gThirdDate != null">#{gThirdDate},</if>
            <if test="gIsSpecialAssessment != null">#{gIsSpecialAssessment},</if>
            <if test="gSpecialAssessment != null and gSpecialAssessment != ''">#{gSpecialAssessment},</if>
            <if test="hSafeMesSign != null and hSafeMesSign != ''">#{hSafeMesSign},</if>
            <if test="hSafeMesDate != null">#{hSafeMesDate},</if>
            <if test="iOneASign != null and iOneASign != ''">#{iOneASign},</if>
            <if test="iOneADate != null">#{iOneADate},</if>
            <if test="iOneBSign != null and iOneBSign != ''">#{iOneBSign},</if>
            <if test="iOneBDate != null">#{iOneBDate},</if>
            <if test="wordUrl != null">#{wordUrl},</if>
            <if test="pdfUrl != null">#{pdfUrl},</if>
            <if test="jOneBSign != null and jOneBSign != ''">#{jOneBSign},</if>
            <if test="cIsGhs != null">#{cIsGhs},</if>
            <if test="jOneBDate != null">#{jOneBDate},</if>
            <if test="jResMemberSign != null and jResMemberSign != ''">#{jResMemberSign},</if>
            <if test="jResMemberDate != null">#{jResMemberDate},</if>
            <if test="jEISign != null and jEISign != ''">#{jEISign},</if>
            <if test="jEIDate != null">#{jEIDate},</if>
            <if test="kConfirmSign != null and kConfirmSign != ''">#{kConfirmSign},</if>
            <if test="kConfirmDate != null">#{kConfirmDate},</if>
            <if test="lNoticeSign != null and lNoticeSign != ''">#{lNoticeSign},</if>
            <if test="lNoticeDate != null">#{lNoticeDate},</if>
            <if test="mAssessDContent != null and mAssessDContent != ''">#{mAssessDContent},</if>
            <if test="mAssessDSign != null and mAssessDSign != ''">#{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="cIsYesDanger != null">#{cIsYesDanger},</if>
            <if test="isEquipmentHazards != null">#{isEquipmentHazards},</if>
            <if test="isFacilityHazards != null">#{isFacilityHazards},</if>
            <if test="cIsOtherA != null">#{cIsOtherA},</if>
         </trim>
    </insert>

    <update id="updateTRestrictedSpacePermit" parameterType="TRestrictedSpacePermit">
        update t_restricted_space_permit
        <trim prefix="SET" suffixOverrides=",">
            <if test="aEquipmentName != null and aEquipmentName != ''">a_equipment_name = #{aEquipmentName},</if>
            <if test="eMonitor != null and eMonitor != ''">e_monitor = #{eMonitor},</if>
            <if test="aEquipmentLeader != null and aEquipmentLeader != ''">a_equipment_leader = #{aEquipmentLeader},</if>
            <if test="aEquipmentTel != null and aEquipmentTel != ''">a_equipment_tel = #{aEquipmentTel},</if>
            <if test="aEquipmentOffice != null and aEquipmentOffice != ''">a_equipment_office = #{aEquipmentOffice},</if>
            <if test="aConstructionName != null and aConstructionName != ''">a_construction_name = #{aConstructionName},</if>
            <if test="aConstructionLeader != null and aConstructionLeader != ''">a_construction_leader = #{aConstructionLeader},</if>
            <if test="aConstructionTel != null and aConstructionTel != ''">a_construction_tel = #{aConstructionTel},</if>
            <if test="aConstructionOffice != null and aConstructionOffice != ''">a_construction_office = #{aConstructionOffice},</if>
            <if test="aContractorName != null and aContractorName != ''">a_contractor_name = #{aContractorName},</if>
            <if test="aContractorLeader != null and aContractorLeader != ''">a_contractor_leader = #{aContractorLeader},</if>
            <if test="aContractorTel != null and aContractorTel != ''">a_contractor_tel = #{aContractorTel},</if>
            <if test="aContractorOffice != null and aContractorOffice != ''">a_contractor_office = #{aContractorOffice},</if>
            <if test="aIsNeedSafeLiaison != null">a_is_need_safe_liaison = #{aIsNeedSafeLiaison},</if>
            <if test="aSafeLiaisonName != null and aSafeLiaisonName != ''">a_safe_liaison_name = #{aSafeLiaisonName},</if>
            <if test="aSafeLiaisonSign != null and aSafeLiaisonSign != ''">a_safe_liaison_sign = #{aSafeLiaisonSign},</if>
            <if test="aSafeLiaisonTel != null and aSafeLiaisonTel != ''">a_safe_liaison_tel = #{aSafeLiaisonTel},</if>
            <if test="aSafeLiaisonOffice != null and aSafeLiaisonOffice != ''">a_safe_liaison_office = #{aSafeLiaisonOffice},</if>
            <if test="bDeviceName != null and bDeviceName != ''">b_device_name = #{bDeviceName},</if>
            <if test="bWorkContent != null and bWorkContent != ''">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 and cHarmMatterName != ''">c_harm_matter_name = #{cHarmMatterName},</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="cIsOtherDanger != null">c_is_other_danger = #{cIsOtherDanger},</if>
            <if test="cOtherDangerContent != null and cOtherDangerContent != ''">c_other_danger_content = #{cOtherDangerContent},</if>
            <if test="cIsHazardsProd != null">c_is_hazards_prod = #{cIsHazardsProd},</if>
            <if test="cIsHazardsProdContent != null and cIsHazardsProdContent != ''">c_is_hazards_prod_content = #{cIsHazardsProdContent},</if>
            <if test="cOtherId != null">c_other_id = #{cOtherId},</if>
            <if test="bAreaNo != null and bAreaNo != ''">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 and dEleCircuitNo != ''">d_ele_circuit_no = #{dEleCircuitNo},</if>
            <if test="dInsTagNo != null and dInsTagNo != ''">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 and dIsOtherEquSafeContent != ''">d_is_other_equ_safe_content = #{dIsOtherEquSafeContent},</if>
            <if test="dIsDepress != null">d_is_depress = #{dIsDepress},</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 and dLockoutUsingContent != ''">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 and dMecSecureContent != ''">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 and dOtherSafePlantContent != ''">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 and dCleanContent != ''">d_clean_content = #{dCleanContent},</if>
            <if test="dIsFlush != null">d_is_flush = #{dIsFlush},</if>
            <if test="dFlushContent != null and dFlushContent != ''">d_flush_content = #{dFlushContent},</if>
            <if test="dIsOhterClean != null">d_is_ohter_clean = #{dIsOhterClean},</if>
            <if test="dOtherCleanContent != null and dOtherCleanContent != ''">d_other_clean_content = #{dOtherCleanContent},</if>
            <if test="dIsSiteDemarcation != null">d_is_site_demarcation = #{dIsSiteDemarcation},</if>
            <if test="dSiteDemarcationContent != null and dSiteDemarcationContent != ''">d_site_demarcation_content = #{dSiteDemarcationContent},</if>
            <if test="dIsOtherSafe != null">d_is_other_safe = #{dIsOtherSafe},</if>
            <if test="dIsAreaCover != null">d_is_area_cover = #{dIsAreaCover},</if>
            <if test="dOtherSafeContent != null">d_other_safe_content = #{dOtherSafeContent},</if>
            <if test="dAreaCoverContent != null and dAreaCoverContent != ''">d_area_cover_content = #{dAreaCoverContent},</if>
            <if test="dIsVentilate != null">d_is_ventilate = #{dIsVentilate},</if>
            <if test="dIsCloseTrucks != null">d_is_close_trucks = #{dIsCloseTrucks},</if>
            <if test="dIsLeakFlanges != null">d_is_leak_flanges = #{dIsLeakFlanges},</if>
            <if test="dVentilateContent != null">d_ventilate_content = #{dVentilateContent},</if>
            <if test="dIsVentilateUse != null">d_is_ventilate_use = #{dIsVentilateUse},</if>
            <if test="dVentilateUseContent != null">d_ventilate_use_content = #{dVentilateUseContent},</if>
            <if test="dIsVentilateDate != null">d_is_ventilate_date = #{dIsVentilateDate},</if>
            <if test="dVentilateDateContent != null">d_ventilate_date_content = #{dVentilateDateContent},</if>
            <if test="dIsAnalysis != null">d_is_analysis = #{dIsAnalysis},</if>
            <if test="dAnalysisContent != null">d_analysis_content = #{dAnalysisContent},</if>
            <if test="dIsOtherMeasure != null">d_is_other_measure = #{dIsOtherMeasure},</if>
            <if test="dOtherMeasureContent != null and dOtherMeasureContent != ''">d_other_measure_content = #{dOtherMeasureContent},</if>
            <if test="dPartakeBriefingSign != null and dPartakeBriefingSign != ''">d_partake_briefing_sign = #{dPartakeBriefingSign},</if>
            <if test="dPartakeBriefingDate != null">d_partake_briefing_date = #{dPartakeBriefingDate},</if>
            <if test="dSafeImplSign11 != null and dSafeImplSign11 != ''">d_safe_impl_sign11 = #{dSafeImplSign11},</if>
            <if test="dSafeImplDate11 != null">d_safe_impl_date11 = #{dSafeImplDate11},</if>
            <if test="dSafeLiftedSign11 != null and dSafeLiftedSign11 != ''">d_safe_lifted_sign11 = #{dSafeLiftedSign11},</if>
            <if test="dSafeLiftedDate11 != null">d_safe_lifted_date11 = #{dSafeLiftedDate11},</if>
            <if test="dSafeImplSign12 != null and dSafeImplSign12 != ''">d_safe_impl_sign12 = #{dSafeImplSign12},</if>
            <if test="dSafeImplDate12 != null">d_safe_impl_date12 = #{dSafeImplDate12},</if>
            <if test="dSafeLiftedSign12 != null and dSafeLiftedSign12 != ''">d_safe_lifted_sign12 = #{dSafeLiftedSign12},</if>
            <if test="dSafeLiftedDate12 != null">d_safe_lifted_date12 = #{dSafeLiftedDate12},</if>
            <if test="dSafeImplSign13 != null and dSafeImplSign13 != ''">d_safe_impl_sign13 = #{dSafeImplSign13},</if>
            <if test="dSafeImplDate13 != null">d_safe_impl_date13 = #{dSafeImplDate13},</if>
            <if test="dSafeLiftedSign13 != null and dSafeLiftedSign13 != ''">d_safe_lifted_sign13 = #{dSafeLiftedSign13},</if>
            <if test="dSafeLiftedDate13 != null">d_safe_lifted_date13 = #{dSafeLiftedDate13},</if>
            <if test="dSafeImplSign14 != null and dSafeImplSign14 != ''">d_safe_impl_sign14 = #{dSafeImplSign14},</if>
            <if test="dSafeImplDate14 != null">d_safe_impl_date14 = #{dSafeImplDate14},</if>
            <if test="dSafeLiftedSign14 != null and dSafeLiftedSign14 != ''">d_safe_lifted_sign14 = #{dSafeLiftedSign14},</if>
            <if test="dSafeLiftedDate14 != null">d_safe_lifted_date14 = #{dSafeLiftedDate14},</if>
            <if test="dSafeImplSign21 != null and dSafeImplSign21 != ''">d_safe_impl_sign21 = #{dSafeImplSign21},</if>
            <if test="dSafeImplDate21 != null">d_safe_impl_date21 = #{dSafeImplDate21},</if>
            <if test="dSafeImplSign22 != null and dSafeImplSign22 != ''">d_safe_impl_sign22 = #{dSafeImplSign22},</if>
            <if test="dSafeImplDate22 != null">d_safe_impl_date22 = #{dSafeImplDate22},</if>
            <if test="dSafeLiftedSign22 != null and dSafeLiftedSign22 != ''">d_safe_lifted_sign22 = #{dSafeLiftedSign22},</if>
            <if test="dSafeLiftedDate22 != null">d_safe_lifted_date22 = #{dSafeLiftedDate22},</if>
            <if test="dSafeImplSign23 != null and dSafeImplSign23 != ''">d_safe_impl_sign23 = #{dSafeImplSign23},</if>
            <if test="dSafeImplDate23 != null">d_safe_impl_date23 = #{dSafeImplDate23},</if>
            <if test="dSafeLiftedSign23 != null and dSafeLiftedSign23 != ''">d_safe_lifted_sign23 = #{dSafeLiftedSign23},</if>
            <if test="dSafeLiftedDate23 != null">d_safe_lifted_date23 = #{dSafeLiftedDate23},</if>
            <if test="dSafeImplSign24 != null and dSafeImplSign24 != ''">d_safe_impl_sign24 = #{dSafeImplSign24},</if>
            <if test="dSafeImplDate24 != null">d_safe_impl_date24 = #{dSafeImplDate24},</if>
            <if test="dSafeLiftedSign24 != null and dSafeLiftedSign24 != ''">d_safe_lifted_sign24 = #{dSafeLiftedSign24},</if>
            <if test="dSafeLiftedDate24 != null">d_safe_lifted_date24 = #{dSafeLiftedDate24},</if>
            <if test="dSafeImplSign25 != null and dSafeImplSign25 != ''">d_safe_impl_sign25 = #{dSafeImplSign25},</if>
            <if test="dSafeImplDate25 != null">d_safe_impl_date25 = #{dSafeImplDate25},</if>
            <if test="dSafeLiftedSign25 != null and dSafeLiftedSign25 != ''">d_safe_lifted_sign25 = #{dSafeLiftedSign25},</if>
            <if test="dSafeLiftedDate25 != null">d_safe_lifted_date25 = #{dSafeLiftedDate25},</if>
            <if test="dSafeImplSign26 != null and dSafeImplSign26 != ''">d_safe_impl_sign26 = #{dSafeImplSign26},</if>
            <if test="dSafeImplDate26 != null">d_safe_impl_date26 = #{dSafeImplDate26},</if>
            <if test="dSafeLiftedSign26 != null and dSafeLiftedSign26 != ''">d_safe_lifted_sign26 = #{dSafeLiftedSign26},</if>
            <if test="dSafeLiftedDate26 != null">d_safe_lifted_date26 = #{dSafeLiftedDate26},</if>
            <if test="dSafeImplSign27 != null and dSafeImplSign27 != ''">d_safe_impl_sign27 = #{dSafeImplSign27},</if>
            <if test="dSafeImplDate27 != null">d_safe_impl_date27 = #{dSafeImplDate27},</if>
            <if test="dSafeLiftedSign27 != null and dSafeLiftedSign27 != ''">d_safe_lifted_sign27 = #{dSafeLiftedSign27},</if>
            <if test="dSafeLiftedSign29 != null">d_safe_lifted_sign29 = #{dSafeLiftedSign29},</if>
            <if test="dSafeLiftedDate27 != null">d_safe_lifted_date27 = #{dSafeLiftedDate27},</if>
            <if test="dSafeLiftedDate29 != null">d_safe_lifted_date29 = #{dSafeLiftedDate29},</if>
            <if test="dSafeImplSign28 != null and dSafeImplSign28 != ''">d_safe_impl_sign28 = #{dSafeImplSign28},</if>
            <if test="dSafeImplDate28 != null">d_safe_impl_date28 = #{dSafeImplDate28},</if>
            <if test="dSafeImplSign29 != null and dSafeImplSign29 != ''">d_safe_impl_sign29 = #{dSafeImplSign29},</if>
            <if test="dSafeImplDate29 != null">d_safe_impl_date29 = #{dSafeImplDate29},</if>
            <if test="dSafeImplSign31 != null and dSafeImplSign31 != ''">d_safe_impl_sign31 = #{dSafeImplSign31},</if>
            <if test="dSafeImplDate31 != null">d_safe_impl_date31 = #{dSafeImplDate31},</if>
            <if test="dSafeImplSign32 != null and dSafeImplSign32 != ''">d_safe_impl_sign32 = #{dSafeImplSign32},</if>
            <if test="dSafeImplDate32 != null">d_safe_impl_date32 = #{dSafeImplDate32},</if>
            <if test="dSafeImplSign33 != null and dSafeImplSign33 != ''">d_safe_impl_sign33 = #{dSafeImplSign33},</if>
            <if test="dSafeImplDate33 != null">d_safe_impl_date33 = #{dSafeImplDate33},</if>
            <if test="dSafeImplSign34 != null and dSafeImplSign34 != ''">d_safe_impl_sign34 = #{dSafeImplSign34},</if>
            <if test="dSafeImplDate34 != null">d_safe_impl_date34 = #{dSafeImplDate34},</if>
            <if test="dSafeImplSign41 != null and dSafeImplSign41 != ''">d_safe_impl_sign41 = #{dSafeImplSign41},</if>
            <if test="dSafeImplDate41 != null">d_safe_impl_date41 = #{dSafeImplDate41},</if>
            <if test="dSafeLiftedSign41 != null and dSafeLiftedSign41 != ''">d_safe_lifted_sign41 = #{dSafeLiftedSign41},</if>
            <if test="dSafeLiftedDate41 != null">d_safe_lifted_date41 = #{dSafeLiftedDate41},</if>
            <if test="dSafeImplSign42 != null and dSafeImplSign42 != ''">d_safe_impl_sign42 = #{dSafeImplSign42},</if>
            <if test="dSafeImplDate42 != null">d_safe_impl_date42 = #{dSafeImplDate42},</if>
            <if test="dSafeLiftedSign42 != null and dSafeLiftedSign42 != ''">d_safe_lifted_sign42 = #{dSafeLiftedSign42},</if>
            <if test="dSafeLiftedDate42 != null">d_safe_lifted_date42 = #{dSafeLiftedDate42},</if>
            <if test="dSafeImplSign43 != null and dSafeImplSign43 != ''">d_safe_impl_sign43 = #{dSafeImplSign43},</if>
            <if test="dSafeImplDate43 != null">d_safe_impl_date43 = #{dSafeImplDate43},</if>
            <if test="dSafeLiftedSign43 != null and dSafeLiftedSign43 != ''">d_safe_lifted_sign43 = #{dSafeLiftedSign43},</if>
            <if test="dSafeLiftedDate43 != null">d_safe_lifted_date43 = #{dSafeLiftedDate43},</if>
            <if test="dSafeImplSign44 != null and dSafeImplSign44 != ''">d_safe_impl_sign44 = #{dSafeImplSign44},</if>
            <if test="dSafeImplDate44 != null">d_safe_impl_date44 = #{dSafeImplDate44},</if>
            <if test="dSafeImplSign45 != null and dSafeImplSign45 != ''">d_safe_impl_sign45 = #{dSafeImplSign45},</if>
            <if test="dSafeImplDate45 != null">d_safe_impl_date45 = #{dSafeImplDate45},</if>
            <if test="dSafeLiftedSign45 != null and dSafeLiftedSign45 != ''">d_safe_lifted_sign45 = #{dSafeLiftedSign45},</if>
            <if test="dSafeLiftedDate45 != null">d_safe_lifted_date45 = #{dSafeLiftedDate45},</if>
            <if test="dSafeImplSign51 != null and dSafeImplSign51 != ''">d_safe_impl_sign51 = #{dSafeImplSign51},</if>
            <if test="dSafeImplDate51 != null">d_safe_impl_date51 = #{dSafeImplDate51},</if>
            <if test="dSafeLiftedSign51 != null and dSafeLiftedSign51 != ''">d_safe_lifted_sign51 = #{dSafeLiftedSign51},</if>
            <if test="dSafeLiftedDate51 != null">d_safe_lifted_date51 = #{dSafeLiftedDate51},</if>
            <if test="dSafeImplSign52 != null and dSafeImplSign52 != ''">d_safe_impl_sign52 = #{dSafeImplSign52},</if>
            <if test="dSafeImplDate52 != null">d_safe_impl_date52 = #{dSafeImplDate52},</if>
            <if test="dSafeLiftedSign52 != null and dSafeLiftedSign52 != ''">d_safe_lifted_sign52 = #{dSafeLiftedSign52},</if>
            <if test="dSafeLiftedDate52 != null">d_safe_lifted_date52 = #{dSafeLiftedDate52},</if>
            <if test="dSafeImplSign53 != null and dSafeImplSign53 != ''">d_safe_impl_sign53 = #{dSafeImplSign53},</if>
            <if test="dSafeImplDate53 != null">d_safe_impl_date53 = #{dSafeImplDate53},</if>
            <if test="dSafeImplSign61 != null and dSafeImplSign61 != ''">d_safe_impl_sign61 = #{dSafeImplSign61},</if>
            <if test="dSafeImplDate61 != null">d_safe_impl_date61 = #{dSafeImplDate61},</if>
            <if test="dSafeLiftedSign61 != null and dSafeLiftedSign61 != ''">d_safe_lifted_sign61 = #{dSafeLiftedSign61},</if>
            <if test="dSafeLiftedDate61 != null">d_safe_lifted_date61 = #{dSafeLiftedDate61},</if>
            <if test="eIsPresent != null">e_is_present = #{eIsPresent},</if>
            <if test="eIsRequiredPpe != null">e_is_required_ppe = #{eIsRequiredPpe},</if>
            <if test="ePpeContent != null and ePpeContent != ''">e_ppe_content = #{ePpeContent},</if>
            <if test="ePpeContent2 != null and ePpeContent2 != ''">e_ppe_content2 = #{ePpeContent2},</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 and eProtectGlovesContent != ''">e_protect_gloves_content = #{eProtectGlovesContent},</if>
            <if test="eIsRubberBoots != null">e_is_rubber_boots = #{eIsRubberBoots},</if>
            <if test="eIsContinueMonitoring != null">e_is_continue_monitoring = #{eIsContinueMonitoring},</if>
            <if test="eIsRubberApron != null">e_is_rubber_apron = #{eIsRubberApron},</if>
            <if test="eIsProtectSuit != null">e_is_protect_suit = #{eIsProtectSuit},</if>
            <if test="eSafeAttendantSign != null">e_safe_attendant_sign = #{eSafeAttendantSign},</if>
            <if test="eProtectSuitContent != null and eProtectSuitContent != ''">e_protect_suit_content = #{eProtectSuitContent},</if>
            <if test="eIsResProtect != null">e_is_res_protect = #{eIsResProtect},</if>
            <if test="eResProtectContent != null and eResProtectContent != ''">e_res_protect_content = #{eResProtectContent},</if>
            <if test="eIsFallArrest != null">e_is_fall_arrest = #{eIsFallArrest},</if>
            <if test="eFallArrestContent != null and eFallArrestContent != ''">e_fall_arrest_content = #{eFallArrestContent},</if>
            <if test="eIsOtherProtect != null">e_is_other_protect = #{eIsOtherProtect},</if>
            <if test="eOtherProtectContent != null and eOtherProtectContent != ''">e_other_protect_content = #{eOtherProtectContent},</if>
            <if test="eSafeAttendant != null and eSafeAttendant != ''">e_safe_attendant = #{eSafeAttendant},</if>
            <if test="eIsNaturalVen != null">e_is_natural_ven = #{eIsNaturalVen},</if>
            <if test="eNaturalVenContent != null and eNaturalVenContent != ''">e_natural_ven_content = #{eNaturalVenContent},</if>
            <if test="eIsMecVen != null">e_is_mec_ven = #{eIsMecVen},</if>
            <if test="eMecVenContent != null and eMecVenContent != ''">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 and eAnalyzeAirContent != ''">e_analyze_air_content = #{eAnalyzeAirContent},</if>
            <if test="eAnalyzeAirInterval != null and eAnalyzeAirInterval != ''">e_analyze_air_interval = #{eAnalyzeAirInterval},</if>
            <if test="eIsOtherVen != null">e_is_other_ven = #{eIsOtherVen},</if>
            <if test="eOtherVenContent != null and eOtherVenContent != ''">e_other_ven_content = #{eOtherVenContent},</if>
            <if test="fIsAfterWorkSafe != null">f_is_after_work_safe = #{fIsAfterWorkSafe},</if>
            <if test="fAfterWorkSafeContent != null and fAfterWorkSafeContent != ''">f_after_work_safe_content = #{fAfterWorkSafeContent},</if>
            <if test="hSafeMesA4Sign != null">h_safe_mes_a4_sign = #{hSafeMesA4Sign},</if>
            <if test="hSafeMesA4Date != null">h_safe_mes_a4_date = #{hSafeMesA4Date},</if>
            <if test="gFirstSign != null and gFirstSign != ''">g_first_sign = #{gFirstSign},</if>
            <if test="gFirstDate != null">g_first_date = #{gFirstDate},</if>
            <if test="gSecondSign != null and gSecondSign != ''">g_second_sign = #{gSecondSign},</if>
            <if test="gSecondDate != null">g_second_date = #{gSecondDate},</if>
            <if test="gThirdSign != null and gThirdSign != ''">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 and gSpecialAssessment != ''">g_special_assessment = #{gSpecialAssessment},</if>
            <if test="hSafeMesSign != null and hSafeMesSign != ''">h_safe_mes_sign = #{hSafeMesSign},</if>
            <if test="hSafeMesDate != null">h_safe_mes_date = #{hSafeMesDate},</if>
            <if test="iOneASign != null and iOneASign != ''">i_one_a_sign = #{iOneASign},</if>
            <if test="iOneADate != null">i_one_a_date = #{iOneADate},</if>
            <if test="iOneBSign != null and iOneBSign != ''">i_one_b_sign = #{iOneBSign},</if>
            <if test="iOneBDate != null">i_one_b_date = #{iOneBDate},</if>
            <if test="wordUrl != null">word_url = #{wordUrl},</if>
            <if test="pdfUrl != null">pdf_url = #{pdfUrl},</if>
            <if test="jOneBSign != null and jOneBSign != ''">j_one_b_sign = #{jOneBSign},</if>
            <if test="cIsGhs != null">c_is_ghs = #{cIsGhs},</if>
            <if test="jOneBDate != null">j_one_b_date = #{jOneBDate},</if>
            <if test="jResMemberSign != null and jResMemberSign != ''">j_res_member_sign = #{jResMemberSign},</if>
            <if test="jResMemberDate != null">j_res_member_date = #{jResMemberDate},</if>
            <if test="jEISign != null and jEISign != ''">j_e_i_sign = #{jEISign},</if>
            <if test="jEIDate != null">j_e_i_date = #{jEIDate},</if>
            <if test="kConfirmSign != null and kConfirmSign != ''">k_confirm_sign = #{kConfirmSign},</if>
            <if test="kConfirmDate != null">k_confirm_date = #{kConfirmDate},</if>
            <if test="lNoticeSign != null and lNoticeSign != ''">l_notice_sign = #{lNoticeSign},</if>
            <if test="lNoticeDate != null">l_notice_date = #{lNoticeDate},</if>
            <if test="mAssessDContent != null and mAssessDContent != ''">m_assess_d_content = #{mAssessDContent},</if>
            <if test="mAssessDSign != null and mAssessDSign != ''">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="cIsYesDanger != null">c_is_yes_danger = #{cIsYesDanger},</if>
            <if test="isEquipmentHazards != null">is_equipment_hazards = #{isEquipmentHazards},</if>
            <if test="isFacilityHazards != null">is_facility_hazards = #{isFacilityHazards},</if>
            <if test="cIsOtherA != null">c_is_other_a = #{cIsOtherA},</if>
        </trim>
        where c_id = #{cId}
    </update>

    <update id="deleteTRestrictedSpacePermitById" parameterType="Long">
        update t_restricted_space_permit set del_flag = 2 where c_id = #{cId}
    </update>

    <update id="deleteTRestrictedSpacePermitByIds" parameterType="String">
        update t_restricted_space_permit set del_flag = 2 where c_id in
        <foreach item="cId" collection="array" open="(" separator="," close=")">
            #{cId}
        </foreach>
    </update>
    
</mapper>