|
@@ -323,7 +323,7 @@
|
|
|
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 project_flingbatch_relation pfp on pfp.project_id=a.id
|
|
|
-
|
|
|
+ LEFT JOIN sys_user sua on a.create_by = sua.id
|
|
|
<if test="leaderNameStr !=null and leaderNameStr !=''">
|
|
|
LEFT JOIN work_project_user w on a.id = w.project_id
|
|
|
LEFT JOIN sys_user su on w.user_id = su.id
|
|
@@ -379,9 +379,12 @@
|
|
|
<if test="workContractInfo!=null and workContractInfo.client !=null and workContractInfo.client.name !=null and workContractInfo.client.name !=''">
|
|
|
AND wct.name like concat(concat('%',#{workContractInfo.client.name}),'%')
|
|
|
</if>
|
|
|
- <if test="leaderNameStr !=null and leaderNameStr !=''">
|
|
|
+ <!--<if test="leaderNameStr !=null and leaderNameStr !=''">
|
|
|
AND su.name like concat(concat('%',#{leaderNameStr}),'%') AND w.is_master = '1' AND w.del_flag='0'
|
|
|
- </if>
|
|
|
+ </if>-->
|
|
|
+ <if test="(leaderNameStr != null and leaderNameStr != '') or (leaderId != null and leaderId != '')">
|
|
|
+ AND ((w.user_id = #{leaderId}) or su.name like concat('%',#{leaderNameStr},'%')) AND w.is_master = '1' AND w.del_flag='0'
|
|
|
+ </if>
|
|
|
<if test="projectStatus !=null">
|
|
|
AND a.status = #{projectStatus}
|
|
|
</if>
|
|
@@ -391,9 +394,12 @@
|
|
|
<if test="endDate !=null">
|
|
|
AND a.create_date < #{endDate}
|
|
|
</if>
|
|
|
- <if test="createBy != null and createBy.id !=null and createBy.id !=''">
|
|
|
+ <!--<if test="createBy != null and createBy.id !=null and createBy.id !=''">
|
|
|
AND a.create_by = #{createBy.id}
|
|
|
- </if>
|
|
|
+ </if>-->
|
|
|
+ <if test="createBy != null and((createBy.id != null and createBy.id != '') or (createBy.name != null and createBy.name != ''))">
|
|
|
+ AND (a.create_by = #{createBy.id} or sua.name like concat('%',#{createBy.name},'%'))
|
|
|
+ </if>
|
|
|
<choose>
|
|
|
<when test="filingProjectStatus == 0">
|
|
|
AND pfp.status is null
|
|
@@ -478,6 +484,7 @@
|
|
|
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 project_flingbatch_relation pfp on pfp.project_id= a.id
|
|
|
+ LEFT JOIN sys_user sua on a.create_by = sua.id
|
|
|
|
|
|
<where>
|
|
|
a.status = 5
|
|
@@ -523,9 +530,12 @@
|
|
|
<if test="workContractInfo!=null and workContractInfo.client !=null and workContractInfo.client.name !=null and workContractInfo.client.name !=''">
|
|
|
AND wct.name like concat(concat('%',#{workContractInfo.client.name}),'%')
|
|
|
</if>
|
|
|
- <if test="leaderNameStr !=null and leaderNameStr !=''">
|
|
|
+ <!--<if test="leaderNameStr !=null and leaderNameStr !=''">
|
|
|
AND su.name like concat(concat('%',#{leaderNameStr}),'%') AND w.is_master = '1' AND w.del_flag='0'
|
|
|
- </if>
|
|
|
+ </if>-->
|
|
|
+ <if test="(leaderNameStr != null and leaderNameStr != '') or (leaderId != null and leaderId != '')">
|
|
|
+ AND ((w.user_id = #{leaderId}) or su.name like concat('%',#{leaderNameStr},'%')) AND w.is_master = '1' AND w.del_flag='0'
|
|
|
+ </if>
|
|
|
<if test="projectStatus !=null">
|
|
|
AND a.status = #{projectStatus}
|
|
|
</if>
|
|
@@ -535,8 +545,11 @@
|
|
|
<if test="endDate !=null">
|
|
|
AND a.create_date < #{endDate}
|
|
|
</if>
|
|
|
- <if test="createBy != null and createBy.id !=null and createBy.id !=''">
|
|
|
+ <!--<if test="createBy != null and createBy.id !=null and createBy.id !=''">
|
|
|
AND a.create_by = #{createBy.id}
|
|
|
+ </if>-->
|
|
|
+ <if test="createBy != null and((createBy.id != null and createBy.id != '') or (createBy.name != null and createBy.name != ''))">
|
|
|
+ AND (a.create_by = #{createBy.id} or sua.name like concat('%',#{createBy.name},'%'))
|
|
|
</if>
|
|
|
|
|
|
<choose>
|