|
@@ -74,22 +74,22 @@ |
|
|
|
|
|
|
|
|
<sql id="reviewedByHeadman"> |
|
|
<sql id="reviewedByHeadman"> |
|
|
<if test="p.reviewed"> |
|
|
<if test="p.reviewed"> |
|
|
and exists(select 1 from nd_expert_review ner where ner.project_id = np.id and ner.create_by = |
|
|
|
|
|
|
|
|
exists(select 1 from nd_expert_review ner where ner.project_id = np.id and ner.create_by = |
|
|
me.expert_id and is_final = true) |
|
|
me.expert_id and is_final = true) |
|
|
</if> |
|
|
</if> |
|
|
<if test="!p.reviewed"> |
|
|
<if test="!p.reviewed"> |
|
|
and not exists(select 1 from nd_expert_review ner where ner.project_id = np.id and ner.create_by = |
|
|
|
|
|
|
|
|
not exists(select 1 from nd_expert_review ner where ner.project_id = np.id and ner.create_by = |
|
|
me.expert_id and is_final = true) |
|
|
me.expert_id and is_final = true) |
|
|
</if> |
|
|
</if> |
|
|
</sql> |
|
|
</sql> |
|
|
|
|
|
|
|
|
<sql id="reviewedByNotHeadman"> |
|
|
<sql id="reviewedByNotHeadman"> |
|
|
<if test="p.reviewed"> |
|
|
<if test="p.reviewed"> |
|
|
and exists(select 1 from nd_expert_review ner where ner.project_id = np.id and ner.create_by = |
|
|
|
|
|
|
|
|
exists(select 1 from nd_expert_review ner where ner.project_id = np.id and ner.create_by = |
|
|
me.expert_id) |
|
|
me.expert_id) |
|
|
</if> |
|
|
</if> |
|
|
<if test="!p.reviewed"> |
|
|
<if test="!p.reviewed"> |
|
|
and not exists(select 1 from nd_expert_review ner where ner.project_id = np.id and ner.create_by = |
|
|
|
|
|
|
|
|
not exists(select 1 from nd_expert_review ner where ner.project_id = np.id and ner.create_by = |
|
|
me.expert_id) |
|
|
me.expert_id) |
|
|
</if> |
|
|
</if> |
|
|
</sql> |
|
|
</sql> |
|
@@ -104,7 +104,7 @@ |
|
|
inner join meeting_expert me on m.id = me.meeting_id |
|
|
inner join meeting_expert me on m.id = me.meeting_id |
|
|
where m.is_inner_project = true |
|
|
where m.is_inner_project = true |
|
|
<if test="p.reviewed != null"> |
|
|
<if test="p.reviewed != null"> |
|
|
if(me.is_headman,<include refid="reviewedByHeadman"/>,<include refid="reviewedByNotHeadman"/>) |
|
|
|
|
|
|
|
|
and if(me.is_headman,<include refid="reviewedByHeadman"/>,<include refid="reviewedByNotHeadman"/>) |
|
|
</if> |
|
|
</if> |
|
|
and me.expert_id = #{p.userId} |
|
|
and me.expert_id = #{p.userId} |
|
|
<if test="p.projectName != null and p.projectName.length > 0"> |
|
|
<if test="p.projectName != null and p.projectName.length > 0"> |
|
|