|
@@ -57,6 +57,33 @@
|
|
|
left join ctop_reimburse_apply_leader_rel t2 on t1.id = t2.apply_id
|
|
|
where
|
|
|
t2.user_id = #{userId}
|
|
|
+ AND t1.id not in (
|
|
|
+ SELECT id FROM ctop_reimburse_apply
|
|
|
+ where 1=1
|
|
|
+ <if test="financialReview == 1">
|
|
|
+ AND leader_id = ''
|
|
|
+ AND final_status = 1
|
|
|
+ </if>
|
|
|
+ <if test="financialReview == null">
|
|
|
+ AND leader_id = #{userId}
|
|
|
+ </if>
|
|
|
+ <if test="companyId != null and companyId != ''">
|
|
|
+ AND company_id =#{companyId}
|
|
|
+ </if>
|
|
|
+ <if test="media != null and media != ''">
|
|
|
+ AND media =#{media}
|
|
|
+ </if>
|
|
|
+ <if test="type != null and type != ''">
|
|
|
+ AND `type` =#{type}
|
|
|
+ </if>
|
|
|
+ <if test="status != null and status != ''">
|
|
|
+ AND status =#{status}
|
|
|
+ </if>
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
+ AND stat_date >=#{startDate}
|
|
|
+ AND stat_date <=#{endDate}
|
|
|
+ </if>
|
|
|
+ )
|
|
|
<if test="companyId != null and companyId != ''">
|
|
|
AND company_id =#{companyId}
|
|
|
</if>
|