Browse Source

新流程财务BUG修复,新流程审核列表修改,详情审核判定修改

anderx 2 years ago
parent
commit
569c0f3cd4

+ 2 - 0
src/main/java/com/goafanti/common/mapper/ExpenseAccountMapper.xml

@@ -901,9 +901,11 @@
         <if test="roleType ==3">
           <if test="listStatus ==0">
             and b.process_status in (3,4,8) and b.status=1
+            and b.process_status =eae.type
           </if>
           <if test="listStatus ==1">
             and b.process_status &gt; 3
+            and (b.process_status &gt; eae.type or (b.process_status =8 and b.status=2))
           </if>
         </if>
     </if>

+ 5 - 6
src/main/java/com/goafanti/expenseAccount/service/impl/ExpenseAccountServiceImpl.java

@@ -587,6 +587,10 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
      * @param newEa
      */
     private List<ExpenseAccountExamine> examineByprocess( ExpenseAccount newEa,AdminListBo admin) {
+        //在跳入董事长审核的时候非特批直接跳过,原则上下个流程不可再跳过
+        if (newEa.getProcessStatus()==EAProcessStatus.DSZSH.getCode()&&newEa.getApproval()!=1){
+            newEa.setProcessStatus(newEa.getProcessStatus()+1);
+        }
         //获取当前流程审核人,如果有已审核则跳过当前审核
         List<ExpenseAccountExamine> list = expenseAccountExamineMapper.selectByEaidAndProcessStatus(newEa.getId(), newEa.getProcessStatus());
         boolean flag=false;
@@ -602,7 +606,6 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
                 break;
             }
         }
-
         if (flag&&newEa.getProcessStatus()<6){
             String str=String.format("重复审核人跳过[%s]。",EAProcessStatus.getDesc(newEa.getProcessStatus()));
             Date date=new Date();
@@ -613,11 +616,7 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
             }
             newEa.setProcessStatus(newEa.getProcessStatus()+1);
             //在跳过的时候如果小于财务继续跳
-            if (newEa.getProcessStatus()<EAProcessStatus.CWSH.getCode())examineByprocess(newEa,admin);
-            //在跳入董事长审核的时候非特批直接跳过,原则上下个流程不可再跳过
-            if (newEa.getProcessStatus()==EAProcessStatus.DSZSH.getCode()&&newEa.getApproval()!=1){
-                newEa.setProcessStatus(newEa.getProcessStatus()+1);
-            }
+            if (newEa.getProcessStatus()<EAProcessStatus.CWFS.getCode())examineByprocess(newEa,admin);
             list=expenseAccountExamineMapper.selectByEaidAndProcessStatus(newEa.getId(), newEa.getProcessStatus());
         }
         return list;