|
|
@@ -74,22 +74,22 @@ |
|
|
|
|
|
|
|
<sql id="reviewedByHeadman"> |
|
|
|
<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) |
|
|
|
</if> |
|
|
|
<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) |
|
|
|
</if> |
|
|
|
</sql> |
|
|
|
|
|
|
|
<sql id="reviewedByNotHeadman"> |
|
|
|
<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) |
|
|
|
</if> |
|
|
|
<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) |
|
|
|
</if> |
|
|
|
</sql> |
|
|
@@ -104,7 +104,7 @@ |
|
|
|
inner join meeting_expert me on m.id = me.meeting_id |
|
|
|
where m.is_inner_project = true |
|
|
|
<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> |
|
|
|
and me.expert_id = #{p.userId} |
|
|
|
<if test="p.projectName != null and p.projectName.length > 0"> |
|
|
|