TPipeOldPlanProcessMapper.xml 15.8 KB
Newer Older
耿迪迪's avatar
耿迪迪 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
<?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.zehong.system.mapper.TPipeOldPlanProcessMapper">
    
    <resultMap type="TPipeOldPlanProcess" id="TPipeOldPlanProcessResult">
        <result property="fOldPlanProcessId"    column="f_old_plan_process_id"    />
        <result property="fUuid"    column="f_uuid"    />
        <result property="fEntUuid"    column="f_ent_uuid"    />
        <result property="fRegion"    column="f_region"    />
        <result property="fProjectName"    column="f_project_name"    />
        <result property="fRelationObjectType"    column="f_relation_object_type"    />
        <result property="fYear"    column="f_year"    />
        <result property="fStartTime"    column="f_start_time"    />
        <result property="fEndTime"    column="f_end_time"    />
        <result property="fTotalInvestment"    column="f_total_investment"    />
        <result property="fCreateTime"    column="f_create_time"    />
        <result property="fUpdateTime"    column="f_update_time"    />
        <result property="fSubjectImplementation"    column="f_subject_implementation"    />
        <result property="fConcatPerson"    column="f_concat_person"    />
        <result property="fConcatTel"    column="f_concat_tel"    />
        <result property="fConstructionContent"    column="f_construction_content"    />
        <result property="fActualFinishTime"    column="f_actual_finish_time"    />
        <result property="fReconstructionProgress"    column="f_reconstruction_progress"    />
        <result property="fFundsDisbursementProgress"    column="f_funds_disbursement_progress"    />
        <result property="fUploadType"    column="f_upload_type"    />
        <result property="fUploadTime"    column="f_upload_time"    />
29
        <result property="fEnterpriseId"    column="f_enterprise_id"    />
30
        <result property="enterpriseName"    column="enterpriseName"    />
31 32 33

        <result property="govUploadState"    column="f_gov_upload_state"    />
        <result property="govUploadTime"    column="f_gov_upload_time"    />
耿迪迪's avatar
耿迪迪 committed
34 35 36
    </resultMap>

    <sql id="selectTPipeOldPlanProcessVo">
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
        select process.f_old_plan_process_id,
               process.f_uuid,
               process.f_enterprise_id,
               enterprise.enterprise_name as enterpriseName,
               process.f_ent_uuid,
               process.f_region,
               process.f_project_name,
               process.f_relation_object_type,
               process.f_year,
               process.f_start_time,
               process.f_end_time,
               process.f_total_investment,
               process.f_create_time,
               process.f_update_time,
               process.f_subject_implementation,
               process.f_concat_person,
               process.f_concat_tel,
               process.f_construction_content,
               process.f_actual_finish_time,
               process.f_reconstruction_progress,
               process.f_funds_disbursement_progress,
               process.f_upload_type,
               process.f_upload_time,
               process.f_gov_upload_state,
               process.f_gov_upload_time
        from t_pipe_old_plan_process process left join t_enterprise_info enterprise on process.f_enterprise_id = enterprise.enterprise_id
耿迪迪's avatar
耿迪迪 committed
63 64
    </sql>

65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126

    <resultMap type="TPipeOldPlanProcess" id="TPipeOldPlanProcessResultForExport">
        <result property="fOldPlanProcessId"    column="f_old_plan_process_id"    />
        <result property="fUuid"    column="f_uuid"    />
        <result property="fEntUuid"    column="f_ent_uuid"    />
        <result property="fEnterpriseId"    column="f_enterprise_id"    />
        <result property="enterpriseName"    column="enterpriseName"    />
        <result property="fRegion"    column="f_region"    />
        <result property="regionName"    column="regionName"    />
        <result property="fProjectName"    column="f_project_name"    />
        <result property="fRelationObjectType"    column="f_relation_object_type"    />
        <result property="fYear"    column="f_year"    />
        <result property="fStartTime"    column="f_start_time"    />
        <result property="fEndTime"    column="f_end_time"    />
        <result property="fTotalInvestment"    column="f_total_investment"    />
        <result property="fCreateTime"    column="f_create_time"    />
        <result property="fUpdateTime"    column="f_update_time"    />
        <result property="fSubjectImplementation"    column="f_subject_implementation"    />
        <result property="fConcatPerson"    column="f_concat_person"    />
        <result property="fConcatTel"    column="f_concat_tel"    />
        <result property="fConstructionContent"    column="f_construction_content"    />
        <result property="fActualFinishTime"    column="f_actual_finish_time"    />
        <result property="fReconstructionProgress"    column="f_reconstruction_progress"    />
        <result property="fFundsDisbursementProgress"    column="f_funds_disbursement_progress"    />
        <result property="fUploadType"    column="f_upload_type"    />
        <result property="fUploadTime"    column="f_upload_time"    />

        <result property="govUploadState"    column="f_gov_upload_state"    />
        <result property="govUploadTime"    column="f_gov_upload_time"    />
    </resultMap>

    <sql id="exportTPipeOldPlanProcessVo">
        select process.f_old_plan_process_id,
               process.f_uuid,
               process.f_enterprise_id,
               enterprise.enterprise_name as enterpriseName,
               process.f_ent_uuid,
               process.f_region,
               region.f_name as regionName,
               process.f_project_name,
               process.f_relation_object_type,
               process.f_year,
               process.f_start_time,
               process.f_end_time,
               process.f_total_investment,
               process.f_create_time,
               process.f_update_time,
               process.f_subject_implementation,
               process.f_concat_person,
               process.f_concat_tel,
               process.f_construction_content,
               process.f_actual_finish_time,
               process.f_reconstruction_progress,
               process.f_funds_disbursement_progress,
               process.f_upload_type,
               process.f_upload_time,
               process.f_gov_upload_state,
               process.f_gov_upload_time
        from t_pipe_old_plan_process process left join t_enterprise_info enterprise on process.f_enterprise_id = enterprise.enterprise_id
                                             left join t_county_level_region region on process.f_region = region.f_id
    </sql>

耿迪迪's avatar
耿迪迪 committed
127 128 129 130 131 132 133 134 135
    <select id="selectTPipeOldPlanProcessList" parameterType="TPipeOldPlanProcess" resultMap="TPipeOldPlanProcessResult">
        <include refid="selectTPipeOldPlanProcessVo"/>
        <where>  
            <if test="fProjectName != null  and fProjectName != ''"> and f_project_name like concat('%', #{fProjectName}, '%')</if>
            <if test="fRelationObjectType != null  and fRelationObjectType != ''"> and f_relation_object_type = #{fRelationObjectType}</if>
            <if test="fConcatPerson != null  and fConcatPerson != ''"> and f_concat_person like concat('%', #{fConcatPerson}, '%')</if>
            <if test="fConcatTel != null  and fConcatTel != ''"> and f_concat_tel like concat('%', #{fConcatTel}, '%')</if>
            <if test="fFundsDisbursementProgress != null "> and f_funds_disbursement_progress = #{fFundsDisbursementProgress}</if>
            <if test="fUploadType != null  and fUploadType != ''"> and f_upload_type = #{fUploadType}</if>
136
            <if test="fEnterpriseId != null  and fEnterpriseId != ''"> and f_enterprise_id = #{fEnterpriseId}</if>
137
            <if test="govUploadState != null  and govUploadState != ''"> and f_gov_upload_state = #{govUploadState}</if>
耿迪迪's avatar
耿迪迪 committed
138
        </where>
139
        order by f_create_time desc
耿迪迪's avatar
耿迪迪 committed
140
    </select>
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156

    <select id="exportPipeOldPlanProcessList" parameterType="TPipeOldPlanProcess" resultMap="TPipeOldPlanProcessResultForExport">
        <include refid="exportTPipeOldPlanProcessVo"/>
        <where>
            <if test="fProjectName != null  and fProjectName != ''"> and f_project_name like concat('%', #{fProjectName}, '%')</if>
            <if test="fRelationObjectType != null  and fRelationObjectType != ''"> and f_relation_object_type = #{fRelationObjectType}</if>
            <if test="fConcatPerson != null  and fConcatPerson != ''"> and f_concat_person like concat('%', #{fConcatPerson}, '%')</if>
            <if test="fConcatTel != null  and fConcatTel != ''"> and f_concat_tel like concat('%', #{fConcatTel}, '%')</if>
            <if test="fFundsDisbursementProgress != null "> and f_funds_disbursement_progress = #{fFundsDisbursementProgress}</if>
            <if test="fUploadType != null  and fUploadType != ''"> and f_upload_type = #{fUploadType}</if>
            <if test="fEnterpriseId != null  and fEnterpriseId != ''"> and f_enterprise_id = #{fEnterpriseId}</if>
            <if test="govUploadState != null  and govUploadState != ''"> and f_gov_upload_state = #{govUploadState}</if>
        </where>
        order by f_create_time desc
    </select>

耿迪迪's avatar
耿迪迪 committed
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184
    <select id="selectTPipeOldPlanProcessById" parameterType="Long" resultMap="TPipeOldPlanProcessResult">
        <include refid="selectTPipeOldPlanProcessVo"/>
        where f_old_plan_process_id = #{fOldPlanProcessId}
    </select>
        
    <insert id="insertTPipeOldPlanProcess" parameterType="TPipeOldPlanProcess" useGeneratedKeys="true" keyProperty="fOldPlanProcessId">
        insert into t_pipe_old_plan_process
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="fUuid != null and fUuid != ''">f_uuid,</if>
            <if test="fEntUuid != null">f_ent_uuid,</if>
            <if test="fRegion != null">f_region,</if>
            <if test="fProjectName != null">f_project_name,</if>
            <if test="fRelationObjectType != null">f_relation_object_type,</if>
            <if test="fYear != null">f_year,</if>
            <if test="fStartTime != null">f_start_time,</if>
            <if test="fEndTime != null">f_end_time,</if>
            <if test="fTotalInvestment != null">f_total_investment,</if>
            <if test="fCreateTime != null">f_create_time,</if>
            <if test="fUpdateTime != null">f_update_time,</if>
            <if test="fSubjectImplementation != null">f_subject_implementation,</if>
            <if test="fConcatPerson != null">f_concat_person,</if>
            <if test="fConcatTel != null">f_concat_tel,</if>
            <if test="fConstructionContent != null">f_construction_content,</if>
            <if test="fActualFinishTime != null">f_actual_finish_time,</if>
            <if test="fReconstructionProgress != null">f_reconstruction_progress,</if>
            <if test="fFundsDisbursementProgress != null">f_funds_disbursement_progress,</if>
            <if test="fUploadType != null">f_upload_type,</if>
            <if test="fUploadTime != null">f_upload_time,</if>
185
            <if test="fEnterpriseId != null">f_enterprise_id,</if>
186 187 188

            <if test="govUploadState != null">f_gov_upload_state,</if>
            <if test="govUploadTime != null">f_gov_upload_time,</if>
耿迪迪's avatar
耿迪迪 committed
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="fUuid != null and fUuid != ''">#{fUuid},</if>
            <if test="fEntUuid != null">#{fEntUuid},</if>
            <if test="fRegion != null">#{fRegion},</if>
            <if test="fProjectName != null">#{fProjectName},</if>
            <if test="fRelationObjectType != null">#{fRelationObjectType},</if>
            <if test="fYear != null">#{fYear},</if>
            <if test="fStartTime != null">#{fStartTime},</if>
            <if test="fEndTime != null">#{fEndTime},</if>
            <if test="fTotalInvestment != null">#{fTotalInvestment},</if>
            <if test="fCreateTime != null">#{fCreateTime},</if>
            <if test="fUpdateTime != null">#{fUpdateTime},</if>
            <if test="fSubjectImplementation != null">#{fSubjectImplementation},</if>
            <if test="fConcatPerson != null">#{fConcatPerson},</if>
            <if test="fConcatTel != null">#{fConcatTel},</if>
            <if test="fConstructionContent != null">#{fConstructionContent},</if>
            <if test="fActualFinishTime != null">#{fActualFinishTime},</if>
            <if test="fReconstructionProgress != null">#{fReconstructionProgress},</if>
            <if test="fFundsDisbursementProgress != null">#{fFundsDisbursementProgress},</if>
            <if test="fUploadType != null">#{fUploadType},</if>
            <if test="fUploadTime != null">#{fUploadTime},</if>
211
            <if test="fEnterpriseId != null">#{fEnterpriseId},</if>
212 213 214

            <if test="govUploadState != null">#{govUploadState},</if>
            <if test="govUploadTime != null">#{govUploadTime},</if>
耿迪迪's avatar
耿迪迪 committed
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240
         </trim>
    </insert>

    <update id="updateTPipeOldPlanProcess" parameterType="TPipeOldPlanProcess">
        update t_pipe_old_plan_process
        <trim prefix="SET" suffixOverrides=",">
            <if test="fUuid != null and fUuid != ''">f_uuid = #{fUuid},</if>
            <if test="fEntUuid != null">f_ent_uuid = #{fEntUuid},</if>
            <if test="fRegion != null">f_region = #{fRegion},</if>
            <if test="fProjectName != null">f_project_name = #{fProjectName},</if>
            <if test="fRelationObjectType != null">f_relation_object_type = #{fRelationObjectType},</if>
            <if test="fYear != null">f_year = #{fYear},</if>
            <if test="fStartTime != null">f_start_time = #{fStartTime},</if>
            <if test="fEndTime != null">f_end_time = #{fEndTime},</if>
            <if test="fTotalInvestment != null">f_total_investment = #{fTotalInvestment},</if>
            <if test="fCreateTime != null">f_create_time = #{fCreateTime},</if>
            <if test="fUpdateTime != null">f_update_time = #{fUpdateTime},</if>
            <if test="fSubjectImplementation != null">f_subject_implementation = #{fSubjectImplementation},</if>
            <if test="fConcatPerson != null">f_concat_person = #{fConcatPerson},</if>
            <if test="fConcatTel != null">f_concat_tel = #{fConcatTel},</if>
            <if test="fConstructionContent != null">f_construction_content = #{fConstructionContent},</if>
            <if test="fActualFinishTime != null">f_actual_finish_time = #{fActualFinishTime},</if>
            <if test="fReconstructionProgress != null">f_reconstruction_progress = #{fReconstructionProgress},</if>
            <if test="fFundsDisbursementProgress != null">f_funds_disbursement_progress = #{fFundsDisbursementProgress},</if>
            <if test="fUploadType != null">f_upload_type = #{fUploadType},</if>
            <if test="fUploadTime != null">f_upload_time = #{fUploadTime},</if>
241
            <if test="fEnterpriseId != null">f_enterprise_id = #{fEnterpriseId},</if>
242 243 244

            <if test="govUploadState != null">f_gov_upload_state = #{govUploadState},</if>
            <if test="govUploadTime != null">f_gov_upload_time = #{govUploadTime},</if>
耿迪迪's avatar
耿迪迪 committed
245 246 247 248 249 250 251 252
        </trim>
        where f_old_plan_process_id = #{fOldPlanProcessId}
    </update>

    <delete id="deleteTPipeOldPlanProcessById" parameterType="Long">
        delete from t_pipe_old_plan_process where f_old_plan_process_id = #{fOldPlanProcessId}
    </delete>

253 254 255
    <update id="entReportPipeOldPlanProcess">
        update t_pipe_old_plan_process set f_upload_type = #{state}, f_upload_time = #{entUploadTime} where  f_old_plan_process_id = #{fOldPlanProcessId}
    </update>
耿迪迪's avatar
耿迪迪 committed
256 257 258 259 260 261 262
    <delete id="deleteTPipeOldPlanProcessByIds" parameterType="String">
        delete from t_pipe_old_plan_process where f_old_plan_process_id in 
        <foreach item="fOldPlanProcessId" collection="array" open="(" separator="," close=")">
            #{fOldPlanProcessId}
        </foreach>
    </delete>
</mapper>