瀏覽代碼

财务报销 功能优化

zhaoxian 2 年之前
父節點
當前提交
24e1b18dc3

+ 27 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/reimburse/mondule/mapper/xml/ReimburseApplyMapper.xml

@@ -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 &lt;=#{endDate}
+        </if>
+        )
         <if test="companyId != null and companyId != ''">
             AND company_id =#{companyId}
         </if>