TPipeOldPlanProcessMapper.xml 15.1 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 31 32

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

    <sql id="selectTPipeOldPlanProcessVo">
36
        select f_old_plan_process_id, f_uuid, f_enterprise_id,f_ent_uuid, f_region, f_project_name, f_relation_object_type, f_year, f_start_time, f_end_time, f_total_investment, f_create_time, f_update_time, f_subject_implementation, f_concat_person, f_concat_tel, f_construction_content, f_actual_finish_time, f_reconstruction_progress, f_funds_disbursement_progress, f_upload_type, f_upload_time,f_gov_upload_state, f_gov_upload_time from t_pipe_old_plan_process
耿迪迪's avatar
耿迪迪 committed
37 38
    </sql>

39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 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

    <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
101 102 103 104 105 106 107 108 109
    <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>
110
            <if test="fEnterpriseId != null  and fEnterpriseId != ''"> and f_enterprise_id = #{fEnterpriseId}</if>
111
            <if test="govUploadState != null  and govUploadState != ''"> and f_gov_upload_state = #{govUploadState}</if>
耿迪迪's avatar
耿迪迪 committed
112
        </where>
113
        order by f_create_time desc
耿迪迪's avatar
耿迪迪 committed
114
    </select>
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130

    <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
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
    <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>
159
            <if test="fEnterpriseId != null">f_enterprise_id,</if>
160 161 162

            <if test="govUploadState != null">f_gov_upload_state,</if>
            <if test="govUploadTime != null">f_gov_upload_time,</if>
耿迪迪's avatar
耿迪迪 committed
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184
         </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>
185
            <if test="fEnterpriseId != null">#{fEnterpriseId},</if>
186 187 188

            <if test="govUploadState != null">#{govUploadState},</if>
            <if test="govUploadTime != null">#{govUploadTime},</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 211 212 213 214
         </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>
215
            <if test="fEnterpriseId != null">f_enterprise_id = #{fEnterpriseId},</if>
216 217 218

            <if test="govUploadState != null">f_gov_upload_state = #{govUploadState},</if>
            <if test="govUploadTime != null">f_gov_upload_time = #{govUploadTime},</if>
耿迪迪's avatar
耿迪迪 committed
219 220 221 222 223 224 225 226
        </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>

227 228 229
    <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
230 231 232 233 234 235 236
    <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>