anderx лет назад: 2
Родитель
Сommit
4ff3de7fde

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

@@ -864,7 +864,7 @@
       left join department adDep on ad.department_id=adDep.id
     <if test="roleType > 0">
       inner join (select eaid ,auditor,min(process_status)`type` from expense_account_examine
-      where auditor= #{aid} group by eaid) eae on b.id=eae.eaid
+      where auditor= #{aid} and status=0 group by eaid) eae on b.id=eae.eaid
     </if>
     <if test="username !=null">
       left join expense_relationship er on er.id=b.id
@@ -903,11 +903,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
+            and (b.process_status =eae.type or b.process_status=8)
           </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))
+            and ((b.process_status &gt; eae.type and  b.process_status &gt; 8) or (b.process_status =8 and b.status=2))
           </if>
         </if>
     </if>

+ 1 - 2
src/main/java/com/goafanti/common/utils/HttpUtils.java

@@ -2,7 +2,6 @@ package com.goafanti.common.utils;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
-import com.goafanti.common.error.BusinessException;
 import org.apache.http.HttpResponse;
 import org.apache.http.HttpStatus;
 import org.apache.http.ParseException;
@@ -86,7 +85,7 @@ public class HttpUtils {
 			try {
 				resultString = EntityUtils.toString(response.getEntity());
 			} catch (ParseException | IOException e) {
-				throw new BusinessException("网路通讯异常,请稍后再试。");
+				e.printStackTrace();
 			}
 			JSONObject jsonObj = JSONObject.parseObject(resultString);
 			return jsonObj;

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

@@ -498,13 +498,13 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
                 newEa.setStatus(status);
                 newEa.setExamineName("");
             }else {
-                //新的流程是当前流程+1
-                newEa.setProcessStatus(useEa.getProcessStatus()+1);
-                if (newEa.getApproval()==null)newEa.setApproval(useEa.getApproval());
                 //添加后续流程
                 if(newEa.getProcessStatus()==EAProcessStatus.CWSH.getCode()){
                     addExpenseAccountExamineFollow(in);
                 }
+                //新的流程是当前流程+1
+                newEa.setProcessStatus(useEa.getProcessStatus()+1);
+                if (newEa.getApproval()==null)newEa.setApproval(useEa.getApproval());
                 List<ExpenseAccountExamine> list=examineByprocess(newEa,admin);
                 StringBuffer aname =new StringBuffer();
                 for (ExpenseAccountExamine e : list) {
@@ -616,8 +616,7 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
                 addFinanceCount(admin.getDepFinance(),newEa.getCreateTime());
             }
             newEa.setProcessStatus(newEa.getProcessStatus()+1);
-            //在跳过的时候如果小于财务继续跳
-            if (newEa.getProcessStatus()<EAProcessStatus.CWFS.getCode())examineByprocess(newEa,admin);
+            examineByprocess(newEa,admin);
             list=expenseAccountExamineMapper.selectByEaidAndProcessStatus(newEa.getId(), newEa.getProcessStatus());
         }
         return list;
@@ -652,7 +651,11 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
                 list.add(notice);
                 EmailBo emailBo=new EmailBo(NoticeStatus.getValueByCode(noticeStatus),a.getEmail(),str);
                 asyncUtils.send(emailBo);
-                weChatUtils.addExpenseAccountWeChatNotice(a.getExpenseOpenId(),status,in.getId(),date,aname,str);
+                try {
+                    weChatUtils.addExpenseAccountWeChatNotice(a.getExpenseOpenId(),status,in.getId(),date,aname,str);
+                }catch (Exception e){
+                    throw new BusinessException("网络通信异常,请稍后再试。");
+                }
             }
         asyncUtils.addNoticeBatch(list);
         }