Browse Source

报销开发子报销列表新增字段

anderx 2 years ago
parent
commit
2facf72466
1 changed files with 16 additions and 4 deletions
  1. 16 4
      src/main/java/com/goafanti/common/mapper/ExpenseAccountMapper.xml

+ 16 - 4
src/main/java/com/goafanti/common/mapper/ExpenseAccountMapper.xml

@@ -560,7 +560,12 @@
       and a.type= #{type}
     </if>
     <if test="checkNo != null " >
-      and a.check_no like concat('%',#{checkNo},'%')
+      <if test="expenseMain ==0">
+        and mea.check_no like concat('%',#{checkNo},'%')
+      </if>
+      <if test="expenseMain ==1">
+        and a.check_no like concat('%',#{checkNo},'%')
+      </if>
     </if>
     <if test="username != null" >
       and  tm.buyer_name  like concat('%',#{username},'%')
@@ -574,6 +579,7 @@
     <if test="contractNo != null">
       and e.contract_no = #{contractNo}
     </if>
+
     <if test="applyDep != null">
       and a.apply_dep  = #{applyDep}
     </if>
@@ -581,7 +587,7 @@
       and a.pay_dep = #{payDep}
     </if>
     <if test="expenseMain != null">
-      and a.expense_main = #{expenseMain}
+      and a.expense_main= #{expenseMain}
     </if>
     <if test="secondaryType != null">
       and a.secondary_type= #{secondaryType}
@@ -626,7 +632,12 @@
       and a.type= #{type}
     </if>
     <if test="checkNo != null " >
-      and a.check_no like concat('%',#{checkNo},'%')
+      <if test="expenseMain ==0">
+        and mea.check_no like concat('%',#{checkNo},'%')
+      </if>
+      <if test="expenseMain ==1">
+        and a.check_no like concat('%',#{checkNo},'%')
+      </if>
     </if>
     <if test="username != null" >
       and  tm.buyer_name  like concat('%',#{username},'%')
@@ -640,6 +651,7 @@
     <if test="contractNo != null">
       and e.contract_no = #{contractNo}
     </if>
+
     <if test="applyDep != null">
       and a.apply_dep  = #{applyDep}
     </if>
@@ -647,7 +659,7 @@
       and a.pay_dep = #{payDep}
     </if>
     <if test="expenseMain != null">
-      and a.expense_main = #{expenseMain}
+      and a.expense_main= #{expenseMain}
     </if>
     <if test="secondaryType != null">
       and a.secondary_type= #{secondaryType}