Browse Source

列表BUG修复

anderx 2 years ago
parent
commit
a0e1f56f6b

+ 6 - 7
src/main/java/com/goafanti/common/mapper/ExpenseAccountMapper.xml

@@ -368,10 +368,10 @@
     left join admin d2 on f.finance_id =d2.id
     <if test="processStatus ==1">
     inner join (select eaid ,auditor,min(process_status)`type` from expense_account_examine
-      where auditor= #{aid} group by eaid) eae on a.id=eae.eaid
+      where auditor= #{auditor} group by eaid) eae on a.id=eae.eaid
     </if>
     where 1=1
-      <if test="superShiro ==1">
+      <if test="superShiro ==2">
         and a.process_status>0
       </if>
     <if test=" aid !=null">
@@ -423,10 +423,10 @@
     left join t_order_mid tm on a.order_no =tm.order_no
     <if test="processStatus ==1">
       inner join (select eaid ,auditor,min(process_status)`type` from expense_account_examine
-      where auditor= #{aid} group by eaid) eae on a.id=eae.eaid
+      where auditor= #{auditor} group by eaid) eae on a.id=eae.eaid
     </if>
     where 1=1
-    <if test="superShiro ==1">
+    <if test="superShiro ==2">
       and a.process_status>0
     </if>
     <if test=" aid !=null">
@@ -474,12 +474,11 @@
     left join t_order_mid tm on a.order_no =tm.order_no
     <if test="processStatus ==1">
       inner join (select eaid ,auditor,min(process_status)`type` from expense_account_examine
-      where auditor= #{aid} group by eaid) eae on a.id=eae.eaid
+      where auditor= #{auditor} group by eaid) eae on a.id=eae.eaid
     </if>
     where 1=1
-    <if test="superShiro ==1">
+    <if test="superShiro ==2">
       and a.process_status>0
-
     </if>
     <if test=" aid !=null">
       and a.aid= #{aid}

+ 10 - 11
src/main/java/com/goafanti/expenseAccount/service/impl/ExpenseAccountServiceImpl.java

@@ -637,22 +637,21 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
         if (in.getStatus()!=null)param.put("status",in.getStatus());
         //如果前端未传 0自己 1审核的参数,默认自己,在审核列表的时候判断Aid,在
         if (in.getProcessStatus()==null) in.setProcessStatus(0);
-        if (in.getProcessStatus()==1){
-            param.put("processStatus",in.getProcessStatus());
-            if (in.getAid()!=null){
-                param.put("aid",in.getAid());
-            }
-        }else {
-            if(PurviewUtils.superPurview()){
-                param.put("superShiro",1);
+        param.put("processStatus",in.getProcessStatus());
+         if(in.getProcessStatus()==2){
                 if (in.getAid()!=null){
                     param.put("aid",in.getAid());
                 }
-            }else {
-                param.put("aid",TokenManager.getAdminId());
-            }
+        }else if(in.getProcessStatus()==1) {
+             param.put("auditor",TokenManager.getAdminId());
+             if (in.getAid()!=null){
+                 param.put("aid",in.getAid());
+             }
+         }else {
+            param.put("aid",TokenManager.getAdminId());
         }
 
+
         if (in.getExamineStatus()!=null){
             param.put("examineStatus",in.getExamineStatus());
         }else {