<?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.jeeplus.modules.sg.managementcenter.reserveManagement.mapper.ReserveManagementMapper">

    <sql id="reserveManagementColumns">
        a.id as "id",
        a.create_by AS "createBy.id",
		a.create_date AS "createDate",
		a.update_by AS "updateBy.id",
		a.update_date AS "updateDate",
		a.remarks AS "remarks",
		a.del_flag AS "delFlag",
        a.projectNature,
        a.demandUnit,
        a.district,
        a.projectGroup,
        a.reserveBatches,
        a.blockSupply,
        a.gridNumber,
        a.cellNumber,
        a.powerGridProjectId,
        a.projectReserveId,
        a.projectName,
        a.constructionNecessityAndContent,
        a.substationName,
        a.circuitName,
        a.netRackProjectDivide,
        a.projectType,
        a.costEstimate,
        a.whetherWindwardProject,
        a.projectUrgencyDegree,
        a.implementIssuedYear,
        a.implementBatch,
        a.basicRemarks,
        a.designCondition,
        a.whetherPassReview,
        a.whetherNeedWiringDiagram,
        a.whetherFinishMaterials,
        a.whetherFinishDrawing,
        a.disclosureToCoordinate,
        a.disclosureParticipate,
        a.whetherFinishDisclosure,
        a.projectManagementPeople,
        a.designingInstitutePeople,
        a.ifoPeople,
        a.regionalCenterPeople,
        a.uninterruptedOperationPeople,
        a.workMode,
        a.disclosureFinishDate,
        a.disclosureRemarks,
        a.projectDescription,
        a.doNotPossessProjectDescription,
        a.changedProgramsExplain,
        a.initialDifficulty,
        a.capitalEquipment,
        a.substationNewLine,
        a.whetherImplement,
        a.fieldDescription,
        a.necessaryOfImplementation,
        a.unnecessaryDescription,
        a.precondition,
        a.conditionsDescribed,
        a.constructionSchemeProblem,
        a.problemDescriptionOfConstructionScheme,
        a.existingSecurityThreat,
        a.safetyHazardDescription,
        a.customizedMaterials,
        a.materialDescription,
        a.dismantlingTheOldMaterial,
        a.operatingType,
        a.problemDescription,
        a.civilWork,
        a.verticalRodWorkload,
        a.totalWorkloadDescription,
        a.regionalCenter,
        a.powerSupplyArea,
        a.zhengLocation,
        a.zhengType,
        a.zhengObject,
        a.zhengDescribe,
        a.projectApproval,
        a.courseEvaluationProcedures,
        a.zhengDifficultyWarn
    </sql>

    <sql id="reserveManagementListColumns">
        a.id as "id",
        a.create_by AS "createBy.id",
		a.create_date AS "createDate",
		a.update_by AS "updateBy.id",
		a.update_date AS "updateDate",
		a.remarks AS "remarks",
		a.del_flag AS "delFlag",
        a.projectNature,
        a.demandUnit,
        a.district,
        a.projectGroup,
        a.reserveBatches,
        a.blockSupply,
        a.gridNumber,
        a.cellNumber,
        a.powerGridProjectId,
        a.projectReserveId,
        a.projectName,
        a.constructionNecessityAndContent,
        a.substationName,
        a.circuitName,
        a.netRackProjectDivide,
        a.projectType,
        a.costEstimate,
        (case a.whetherWindwardProject when '1' then '是' when '0' then '否' else '取消' end) whetherWindwardProject,
        a.projectUrgencyDegree,
        a.implementIssuedYear,
        a.implementBatch,
        a.basicRemarks,
        (case a.designCondition when '1' then '已完成' when '0' then '未完成' else '' end) designCondition,
        (case a.whetherPassReview when '1' then '已通过' when '0' then '未通过' else '' end) whetherPassReview,
        (case a.whetherNeedWiringDiagram when '1' then '是' when '0' then '否' else '' end) whetherNeedWiringDiagram,
        (case a.whetherFinishMaterials when '1' then '是' when '0' then '否' else '' end) whetherFinishMaterials,
        (case a.whetherFinishDrawing when '1' then '是' when '0' then '否' else '' end) whetherFinishDrawing,
        a.disclosureToCoordinate,
        a.disclosureParticipate,
        (case a.whetherFinishDisclosure when '1' then '是' when '0' then '否' else '' end) whetherFinishDisclosure,
        a.projectManagementPeople,
        a.designingInstitutePeople,
        a.ifoPeople,
        a.regionalCenterPeople,
        a.uninterruptedOperationPeople,
        a.workMode,
        a.disclosureFinishDate,
        a.disclosureRemarks,
        a.projectDescription,
        a.doNotPossessProjectDescription,
        a.changedProgramsExplain,
        a.initialDifficulty,
        (case a.capitalEquipment when '1' then '是' when '0' then '否' else '' end) capitalEquipment,
        (case a.substationNewLine when '1' then '是' when '0' then '否' else '' end) substationNewLine,
        (case a.whetherImplement when '1' then '是' when '0' then '否' else '' end) whetherImplement,
        a.fieldDescription,
        (case a.necessaryOfImplementation when '1' then '是' when '0' then '否' else '' end) necessaryOfImplementation,
        a.unnecessaryDescription,
        (case a.precondition when '1' then '是' when '0' then '否' else '' end) precondition,
        a.conditionsDescribed,
        (case a.constructionSchemeProblem when '1' then '是' when '0' then '否' else '' end) constructionSchemeProblem,
        a.problemDescriptionOfConstructionScheme,
        (case a.existingSecurityThreat when '1' then '是' when '0' then '否' else '' end) existingSecurityThreat,
        a.safetyHazardDescription,
        (case a.customizedMaterials when '1' then '是' when '0' then '否' else '' end) customizedMaterials,
        a.materialDescription,
        (case a.dismantlingTheOldMaterial when '1' then '是' when '0' then '否' else '' end) dismantlingTheOldMaterial,
        a.operatingType,
        a.problemDescription,
        (case a.civilWork when '1' then '是' when '0' then '否' else '' end) civilWork,
        (case a.verticalRodWorkload when '1' then '是' when '0' then '否' else '' end) verticalRodWorkload,
        a.totalWorkloadDescription,
        a.regionalCenter,
        a.powerSupplyArea,
        a.zhengLocation,
        a.zhengType,
        a.zhengObject,
        a.zhengDescribe,
        (case a.projectApproval when '1' then '是' when '0' then '否' else '' end) projectApproval,
        (case a.courseEvaluationProcedures when '1' then '是' when '0' then '否' else '' end) courseEvaluationProcedures,
        a.zhengDifficultyWarn
    </sql>


    <sql id="exportListColumns">
        a.id as "id",
        a.create_by AS "createBy.id",
		a.create_date AS "createDate",
		a.update_by AS "updateBy.id",
		a.update_date AS "updateDate",
		a.remarks AS "remarks",
		a.del_flag AS "delFlag",
        a.projectNature,
        a.demandUnit,
        a.district,
        a.projectGroup,
        a.reserveBatches,
        a.blockSupply,
        a.gridNumber,
        a.cellNumber,
        a.powerGridProjectId,
        a.projectReserveId,
        a.projectName,
        a.constructionNecessityAndContent,
        a.substationName,
        a.circuitName,
        a.netRackProjectDivide,
        a.projectType,
        a.costEstimate,
        (case a.whetherWindwardProject when '1' then '是' when '0' then '否' else '取消' end) whetherWindwardProject,
        a.projectUrgencyDegree,
        a.implementIssuedYear,
        a.implementBatch,
        a.basicRemarks,
        (case a.designCondition when '1' then '已完成' when '0' then '未完成' else '' end) designCondition,
        (case a.whetherPassReview when '1' then '已通过' when '0' then '未通过' else '' end) whetherPassReview,
        (case a.whetherNeedWiringDiagram when '1' then '是' when '0' then '否' else '' end) whetherNeedWiringDiagram,
        (case a.whetherFinishMaterials when '1' then '是' when '0' then '否' else '' end) whetherFinishMaterials,
        (case a.whetherFinishDrawing when '1' then '是' when '0' then '否' else '' end) whetherFinishDrawing,
        a.disclosureToCoordinate,
        a.disclosureParticipate,
        (case a.whetherFinishDisclosure when '1' then '是' when '0' then '否' else '' end) whetherFinishDisclosure,
        a.projectManagementPeople,
        a.designingInstitutePeople,
        a.ifoPeople,
        a.regionalCenterPeople,
        a.uninterruptedOperationPeople,
        a.workMode,
        date_format(a.disclosureFinishDate, '%Y-%m-%d') as "disclosureFinishDateStr",
        a.disclosureRemarks,
        a.projectDescription,
        a.doNotPossessProjectDescription,
        a.changedProgramsExplain,
        a.initialDifficulty,
        (case a.capitalEquipment when '1' then '是' when '0' then '否' else '' end) capitalEquipment,
        (case a.substationNewLine when '1' then '是' when '0' then '否' else '' end) substationNewLine,
        (case a.whetherImplement when '1' then '是' when '0' then '否' else '' end) whetherImplement,
        a.fieldDescription,
        (case a.necessaryOfImplementation when '1' then '是' when '0' then '否' else '' end) necessaryOfImplementation,
        a.unnecessaryDescription,
        (case a.precondition when '1' then '是' when '0' then '否' else '' end) precondition,
        a.conditionsDescribed,
        (case a.constructionSchemeProblem when '1' then '是' when '0' then '否' else '' end) constructionSchemeProblem,
        a.problemDescriptionOfConstructionScheme,
        (case a.existingSecurityThreat when '1' then '是' when '0' then '否' else '' end) existingSecurityThreat,
        a.safetyHazardDescription,
        (case a.customizedMaterials when '1' then '是' when '0' then '否' else '' end) customizedMaterials,
        a.materialDescription,
        (case a.dismantlingTheOldMaterial when '1' then '是' when '0' then '否' else '' end) dismantlingTheOldMaterial,
        a.operatingType,
        a.problemDescription,
        (case a.civilWork when '1' then '是' when '0' then '否' else '' end) civilWork,
        (case a.verticalRodWorkload when '1' then '是' when '0' then '否' else '' end) verticalRodWorkload,
        a.totalWorkloadDescription,
        a.regionalCenter,
        a.powerSupplyArea,
        a.zhengLocation,
        a.zhengType,
        a.zhengObject,
        a.zhengDescribe,
        (case a.projectApproval when '1' then '是' when '0' then '否' else '' end) projectApproval,
        (case a.courseEvaluationProcedures when '1' then '是' when '0' then '否' else '' end) courseEvaluationProcedures,
        a.zhengDifficultyWarn
    </sql>

    <select id="get" resultType="com.jeeplus.modules.sg.managementcenter.reserveManagement.entity.ReserveManagement">
        select
        <include refid="reserveManagementColumns"/>
        from cb_reserve_management a
        where a.id = #{id}
    </select>

    <select id="findList" resultType="com.jeeplus.modules.sg.managementcenter.reserveManagement.entity.ReserveManagement">
        select
        <include refid="reserveManagementListColumns"/>
        from cb_reserve_management a
        <where>
            del_flag = 0
            <if test="projectReserveId!=null and projectReserveId!=''">
                and a.projectReserveId like concat('%', #{projectReserveId}, '%')
            </if>
            <if test="projectName!=null and projectName!=''">
                and a.projectName like concat('%', #{projectName}, '%')
            </if>
            <if test="dataScope != null and dataScope != ''">
                ${dataScope}
            </if>
        </where>
        <choose>
            <when test="page !=null and page.orderBy != null and page.orderBy != ''">
                ORDER BY ${page.orderBy}
            </when>
            <otherwise>
                ORDER BY a.update_date DESC
            </otherwise>
        </choose>
    </select>

    <select id="exportFindList" resultType="com.jeeplus.modules.sg.managementcenter.reserveManagement.entity.ReserveManagement">
        select
        <include refid="exportListColumns"/>
        from cb_reserve_management a
        <where>
            del_flag = 0
            <if test="projectReserveId!=null and projectReserveId!=''">
                and a.projectReserveId like concat('%', #{projectReserveId}, '%')
            </if>
            <if test="projectName!=null and projectName!=''">
                and a.projectName like concat('%', #{projectName}, '%')
            </if>
            <if test="dataScope != null and dataScope != ''">
                ${dataScope}
            </if>
        </where>
        ORDER BY a.update_date DESC
    </select>

    <select id="queryByProjectReserveId" resultType="com.jeeplus.modules.sg.managementcenter.reserveManagement.entity.ReserveManagement">
        select
        <include refid="reserveManagementColumns"/>
        from cb_reserve_management a
        where a.projectReserveId = #{projectReserveId}
    </select>

    <insert id="insert">
        insert into cb_reserve_management (
          id,
          create_by,
          create_date,
          update_by,
          update_date,
          del_flag,
          remarks,
          projectNature,
          demandUnit,
          district,
          projectGroup,
          reserveBatches,
          blockSupply,
          gridNumber,
          cellNumber,
          powerGridProjectId,
          projectReserveId,
          projectName,
          constructionNecessityAndContent,
          substationName,
          circuitName,
          netRackProjectDivide,
          projectType,
          costEstimate,
          whetherWindwardProject,
          projectUrgencyDegree,
          implementIssuedYear,
          implementBatch,
          basicRemarks,
          designCondition,
          whetherPassReview,
          whetherNeedWiringDiagram,
          whetherFinishMaterials,
          whetherFinishDrawing
        )
        values
          (
            #{id},
			#{createBy.id},
			#{createDate},
			#{updateBy.id},
			#{updateDate},
			#{delFlag},
			#{remarks},
            #{projectNature},
            #{demandUnit},
            #{district},
            #{projectGroup},
            #{reserveBatches},
            #{blockSupply},
            #{gridNumber},
            #{cellNumber},
            #{powerGridProjectId},
            #{projectReserveId},
            #{projectName},
            #{constructionNecessityAndContent},
            #{substationName},
            #{circuitName},
            #{netRackProjectDivide},
            #{projectType},
            #{costEstimate},
            #{whetherWindwardProject},
            #{projectUrgencyDegree},
            #{implementIssuedYear},
            #{implementBatch},
            #{basicRemarks},
            #{designCondition},
            #{whetherPassReview},
            #{whetherNeedWiringDiagram},
            #{whetherFinishMaterials},
            #{whetherFinishDrawing}
		)
    </insert>

    <insert id="insertList">
        insert into cb_reserve_management (
          id,
          create_by,
          create_date,
          update_by,
          update_date,
          del_flag,
          remarks,
          projectNature,
          demandUnit,
          district,
          projectGroup,
          reserveBatches,
          blockSupply,
          gridNumber,
          cellNumber,
          powerGridProjectId,
          projectReserveId,
          projectName,
          constructionNecessityAndContent,
          substationName,
          circuitName,
          netRackProjectDivide,
          projectType,
          costEstimate,
          whetherWindwardProject,
          projectUrgencyDegree,
          implementIssuedYear,
          implementBatch,
          basicRemarks,
          designCondition,
          whetherPassReview,
          whetherNeedWiringDiagram,
          whetherFinishMaterials,
          whetherFinishDrawing
        )
        values
        <foreach collection="list" item="item" index="index" separator="," >
              (
                #{item.id},
                #{item.createBy.id},
                #{item.createDate},
                #{item.updateBy.id},
                #{item.updateDate},
                #{item.delFlag},
                #{item.remarks},
                #{item.projectNature},
                #{item.demandUnit},
                #{item.district},
                #{item.projectGroup},
                #{item.reserveBatches},
                #{item.blockSupply},
                #{item.gridNumber},
                #{item.cellNumber},
                #{item.powerGridProjectId},
                #{item.projectReserveId},
                #{item.projectName},
                #{item.constructionNecessityAndContent},
                #{item.substationName},
                #{item.circuitName},
                #{item.netRackProjectDivide},
                #{item.projectType},
                #{item.costEstimate},
                #{item.whetherWindwardProject},
                #{item.projectUrgencyDegree},
                #{item.implementIssuedYear},
                #{item.implementBatch},
                #{item.basicRemarks},
                #{item.designCondition},
                #{item.whetherPassReview},
                #{item.whetherNeedWiringDiagram},
                #{item.whetherFinishMaterials},
                #{item.whetherFinishDrawing}
            )
        </foreach>
    </insert>

    <update id="update">
		update
            cb_reserve_management
        set
            update_by = #{updateBy.id},
            update_date = #{updateDate},
            remarks = #{remarks}

            <if test="projectNature!=null and projectNature != ''">
                ,projectNature = #{projectNature}
            </if>
            <if test="demandUnit!=null and demandUnit != ''">
                ,demandUnit = #{demandUnit}
            </if>
            <if test="district!=null and district != ''">
                ,district = #{district}
            </if>
            <if test="projectGroup!=null and projectGroup != ''">
                ,projectGroup = #{projectGroup}
            </if>
            <if test="reserveBatches!=null and reserveBatches != ''">
                ,reserveBatches = #{reserveBatches}
            </if>
            <if test="projectName!=null and projectName != ''">
                ,projectName = #{projectName}
            </if>
            <if test="blockSupply!=null and blockSupply != ''">
                ,blockSupply = #{blockSupply}
            </if>
            <if test="gridNumber!=null and gridNumber != ''">
                ,gridNumber = #{gridNumber}
            </if>
            <if test="cellNumber!=null and cellNumber != ''">
                ,cellNumber = #{cellNumber}
            </if>
            <if test="powerGridProjectId!=null and powerGridProjectId != ''">
                ,powerGridProjectId = #{powerGridProjectId}
            </if>
            <if test="constructionNecessityAndContent!=null and constructionNecessityAndContent != ''">
                ,constructionNecessityAndContent = #{constructionNecessityAndContent}
            </if>
            <if test="substationName!=null and substationName != ''">
                ,substationName = #{substationName}
            </if>
            <if test="circuitName!=null and circuitName != ''">
                ,circuitName = #{circuitName}
            </if>
            <if test="netRackProjectDivide!=null and netRackProjectDivide != ''">
                ,netRackProjectDivide = #{netRackProjectDivide}
            </if>
            <if test="projectType!=null and projectType != ''">
                ,projectType = #{projectType}
            </if>
            <if test="costEstimate!=null and costEstimate != ''">
                ,costEstimate = #{costEstimate}
            </if>
            <if test="whetherWindwardProject!=null and whetherWindwardProject != ''">
                ,whetherWindwardProject = #{whetherWindwardProject}
            </if>
            <if test="projectUrgencyDegree!=null and projectUrgencyDegree != ''">
                ,projectUrgencyDegree = #{projectUrgencyDegree}
            </if>
            <if test="implementIssuedYear!=null and implementIssuedYear != ''">
                ,implementIssuedYear = #{implementIssuedYear}
            </if>
            <if test="implementBatch!=null and implementBatch != ''">
                ,implementBatch = #{implementBatch}
            </if>
            <if test="basicRemarks!=null and basicRemarks != ''">
                ,basicRemarks = #{basicRemarks}
            </if>
            <if test="designCondition!=null and designCondition != ''">
                ,designCondition = #{designCondition}
            </if>
            <if test="whetherPassReview!=null and whetherPassReview != ''">
                ,whetherPassReview = #{whetherPassReview}
            </if>
            <if test="whetherNeedWiringDiagram!=null and whetherNeedWiringDiagram != ''">
                ,whetherNeedWiringDiagram = #{whetherNeedWiringDiagram}
            </if>
            <if test="whetherFinishMaterials!=null and whetherFinishMaterials != ''">
                ,whetherFinishMaterials = #{whetherFinishMaterials}
            </if>
            <if test="whetherFinishDrawing!=null and whetherFinishDrawing != ''">
                ,whetherFinishDrawing = #{whetherFinishDrawing}
            </if>
        where id = #{id}
	</update>

    <update id="updatejl">
        update
        cb_reserve_management
        set
        update_by = #{updateBy.id},
        update_date = #{updateDate},
        remarks = #{remarks}

        <if test="disclosureToCoordinate!=null and disclosureToCoordinate != ''">
            ,disclosureToCoordinate = #{disclosureToCoordinate}
        </if>
        <if test="disclosureParticipate!=null and disclosureParticipate != ''">
            ,disclosureParticipate = #{disclosureParticipate}
        </if>
        <if test="whetherFinishDisclosure!=null and whetherFinishDisclosure != ''">
            ,whetherFinishDisclosure = #{whetherFinishDisclosure}
        </if>
        <if test="projectManagementPeople!=null and projectManagementPeople != ''">
            ,projectManagementPeople = #{projectManagementPeople}
        </if>
        <if test="designingInstitutePeople!=null and designingInstitutePeople != ''">
            ,designingInstitutePeople = #{designingInstitutePeople}
        </if>
        <if test="ifoPeople!=null and ifoPeople != ''">
            ,ifoPeople = #{ifoPeople}
        </if>
        <if test="regionalCenterPeople!=null and regionalCenterPeople != ''">
            ,regionalCenterPeople = #{regionalCenterPeople}
        </if>
        <if test="uninterruptedOperationPeople!=null and uninterruptedOperationPeople != ''">
            ,uninterruptedOperationPeople = #{uninterruptedOperationPeople}
        </if>
        <if test="workMode!=null and workMode != ''">
            ,workMode = #{workMode}
        </if>
        <if test="disclosureFinishDate!=null and disclosureFinishDate != ''">
            ,disclosureFinishDate = #{disclosureFinishDate}
        </if>
        <if test="disclosureRemarks!=null and disclosureRemarks != ''">
            ,disclosureRemarks = #{disclosureRemarks}
        </if>
        <if test="projectDescription!=null and projectDescription != ''">
            ,projectDescription = #{projectDescription}
        </if>
        <if test="doNotPossessProjectDescription!=null and doNotPossessProjectDescription != ''">
            ,doNotPossessProjectDescription = #{doNotPossessProjectDescription}
        </if>
        <if test="changedProgramsExplain!=null and changedProgramsExplain != ''">
            ,changedProgramsExplain = #{changedProgramsExplain}
        </if>
        <if test="initialDifficulty!=null and initialDifficulty != ''">
            ,initialDifficulty = #{initialDifficulty}
        </if>
        <if test="capitalEquipment!=null and capitalEquipment != ''">
            ,capitalEquipment = #{capitalEquipment}
        </if>
        <if test="substationNewLine!=null and substationNewLine != ''">
            ,substationNewLine = #{substationNewLine}
        </if>
        <if test="whetherImplement!=null and whetherImplement != ''">
            ,whetherImplement = #{whetherImplement}
        </if>
        <if test="fieldDescription!=null and fieldDescription != ''">
            ,fieldDescription = #{fieldDescription}
        </if>
        <if test="necessaryOfImplementation!=null and necessaryOfImplementation != ''">
            ,necessaryOfImplementation = #{necessaryOfImplementation}
        </if>
        <if test="unnecessaryDescription!=null and unnecessaryDescription != ''">
            ,unnecessaryDescription = #{unnecessaryDescription}
        </if>
        <if test="precondition!=null and precondition != ''">
            ,precondition = #{precondition}
        </if>
        <if test="conditionsDescribed!=null and conditionsDescribed != ''">
            ,conditionsDescribed = #{conditionsDescribed}
        </if>
        <if test="constructionSchemeProblem!=null and constructionSchemeProblem != ''">
            ,constructionSchemeProblem = #{constructionSchemeProblem}
        </if>
        <if test="problemDescriptionOfConstructionScheme!=null and problemDescriptionOfConstructionScheme != ''">
            ,problemDescriptionOfConstructionScheme = #{problemDescriptionOfConstructionScheme}
        </if>
        <if test="existingSecurityThreat!=null and existingSecurityThreat != ''">
            ,existingSecurityThreat = #{existingSecurityThreat}
        </if>
        <if test="safetyHazardDescription!=null and safetyHazardDescription != ''">
            ,safetyHazardDescription = #{safetyHazardDescription}
        </if>
        <if test="customizedMaterials!=null and customizedMaterials != ''">
            ,customizedMaterials = #{customizedMaterials}
        </if>
        <if test="materialDescription!=null and materialDescription != ''">
            ,materialDescription = #{materialDescription}
        </if>
        <if test="dismantlingTheOldMaterial!=null and dismantlingTheOldMaterial != ''">
            ,dismantlingTheOldMaterial = #{dismantlingTheOldMaterial}
        </if>
        <if test="operatingType!=null and operatingType != ''">
            ,operatingType = #{operatingType}
        </if>
        <if test="problemDescription!=null and problemDescription != ''">
            ,problemDescription = #{problemDescription}
        </if>
        <if test="civilWork!=null and civilWork != ''">
            ,civilWork = #{civilWork}
        </if>
        <if test="verticalRodWorkload!=null and verticalRodWorkload != ''">
            ,verticalRodWorkload = #{verticalRodWorkload}
        </if>
        <if test="totalWorkloadDescription!=null and totalWorkloadDescription != ''">
            ,totalWorkloadDescription = #{totalWorkloadDescription}
        </if>
        <if test="regionalCenter!=null and regionalCenter != ''">
            ,regionalCenter = #{regionalCenter}
        </if>
        <if test="powerSupplyArea!=null and powerSupplyArea != ''">
            ,powerSupplyArea = #{powerSupplyArea}
        </if>
        <if test="zhengLocation!=null and zhengLocation != ''">
            ,zhengLocation = #{zhengLocation}
        </if>
        <if test="zhengType!=null and zhengType != ''">
            ,zhengType = #{zhengType}
        </if>
        <if test="zhengObject!=null and zhengObject != ''">
            ,zhengObject = #{zhengObject}
        </if>
        <if test="zhengDescribe!=null and zhengDescribe != ''">
            ,zhengDescribe = #{zhengDescribe}
        </if>
        <if test="projectApproval!=null and projectApproval != ''">
            ,projectApproval = #{projectApproval}
        </if>
        <if test="courseEvaluationProcedures!=null and courseEvaluationProcedures != ''">
            ,courseEvaluationProcedures = #{courseEvaluationProcedures}
        </if>
        <if test="zhengDifficultyWarn!=null and zhengDifficultyWarn != ''">
            ,zhengDifficultyWarn = #{zhengDifficultyWarn}
        </if>
        where id = #{id}
    </update>

    <update id="delete">
        delete from
        cb_reserve_management
        where id = #{id}
    </update>

</mapper>