|
@@ -250,6 +250,7 @@
|
|
FROM rural_project_records a
|
|
FROM rural_project_records a
|
|
LEFT JOIN sys_area area ON area.id = a.area_id
|
|
LEFT JOIN sys_area area ON area.id = a.area_id
|
|
left join rural_project_records_reported rprr on rprr.id = a.id
|
|
left join rural_project_records_reported rprr on rprr.id = a.id
|
|
|
|
+ LEFT JOIN project_flingbatch_relation pfp on pfp.project_id=a.id
|
|
|
|
|
|
<if test="leaderNameStr !=null and leaderNameStr !=''">
|
|
<if test="leaderNameStr !=null and leaderNameStr !=''">
|
|
LEFT JOIN work_project_user w on a.id = w.project_id
|
|
LEFT JOIN work_project_user w on a.id = w.project_id
|
|
@@ -318,6 +319,25 @@
|
|
<if test="endDate !=null">
|
|
<if test="endDate !=null">
|
|
AND a.create_date < #{endDate}
|
|
AND a.create_date < #{endDate}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="createBy != null and createBy.id !=null and createBy.id !=''">
|
|
|
|
+ AND a.create_by = #{createBy.id}
|
|
|
|
+ </if>
|
|
|
|
+ <choose>
|
|
|
|
+ <when test="filingProjectStatus == 0">
|
|
|
|
+ AND pfp.status is null
|
|
|
|
+ </when>
|
|
|
|
+ <otherwise>
|
|
|
|
+ <if test="filingProjectStatus!=null and filingProjectStatus !=''">
|
|
|
|
+ AND pfp.status = #{filingProjectStatus}
|
|
|
|
+ </if>
|
|
|
|
+ </otherwise>
|
|
|
|
+ </choose>
|
|
|
|
+ <if test="reportData!=null and reportData.number !=null and reportData.number !=''">
|
|
|
|
+ and prd.number like concat('%',#{reportData.number},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="office!=null and office.id!=null and office.id!=''">
|
|
|
|
+ and a.office_id = #{office.id}
|
|
|
|
+ </if>
|
|
<if test="reportedState !=null and reportedState !=''">
|
|
<if test="reportedState !=null and reportedState !=''">
|
|
<choose>
|
|
<choose>
|
|
<when test="reportedState == 0">
|
|
<when test="reportedState == 0">
|
|
@@ -385,7 +405,9 @@
|
|
left join project_report_data prd on prd.project_id = a.id
|
|
left join project_report_data prd on prd.project_id = a.id
|
|
left join rural_project_report_record prr on prr.report_id = prd.id
|
|
left join rural_project_report_record prr on prr.report_id = prd.id
|
|
left join rural_project_report_record_down prrd on prrd.report_id = prd.id
|
|
left join rural_project_report_record_down prrd on prrd.report_id = prd.id
|
|
- <where>
|
|
|
|
|
|
+ LEFT JOIN project_flingbatch_relation pfp on pfp.project_id= a.id
|
|
|
|
+
|
|
|
|
+ <where>
|
|
a.status = 5
|
|
a.status = 5
|
|
<if test="projectId != null and projectId != ''">
|
|
<if test="projectId != null and projectId != ''">
|
|
AND a.project_id like concat('%',#{projectId},'%')
|
|
AND a.project_id like concat('%',#{projectId},'%')
|
|
@@ -441,7 +463,26 @@
|
|
<if test="endDate !=null">
|
|
<if test="endDate !=null">
|
|
AND a.create_date < #{endDate}
|
|
AND a.create_date < #{endDate}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="createBy != null and createBy.id !=null and createBy.id !=''">
|
|
|
|
+ AND a.create_by = #{createBy.id}
|
|
|
|
+ </if>
|
|
|
|
|
|
|
|
+ <choose>
|
|
|
|
+ <when test="filingProjectStatus == 0">
|
|
|
|
+ AND pfp.status is null
|
|
|
|
+ </when>
|
|
|
|
+ <otherwise>
|
|
|
|
+ <if test="filingProjectStatus!=null and filingProjectStatus !=''">
|
|
|
|
+ AND pfp.status = #{filingProjectStatus}
|
|
|
|
+ </if>
|
|
|
|
+ </otherwise>
|
|
|
|
+ </choose>
|
|
|
|
+ <if test="reportData!=null and reportData.number !=null and reportData.number !=''">
|
|
|
|
+ and prd.number like concat('%',#{reportData.number},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="office!=null and office.id!=null and office.id!=''">
|
|
|
|
+ and a.office_id = #{office.id}
|
|
|
|
+ </if>
|
|
<if test="projectReportStatus != null and projectReportStatus != ''">
|
|
<if test="projectReportStatus != null and projectReportStatus != ''">
|
|
AND prd.status = #{projectReportStatus}
|
|
AND prd.status = #{projectReportStatus}
|
|
</if>
|
|
</if>
|