Browse Source

报销列表BUG修复

anderx 2 years ago
parent
commit
ef2e80a79e

+ 4 - 0
src/main/java/com/goafanti/common/constant/AFTConstants.java

@@ -1,5 +1,7 @@
 package com.goafanti.common.constant;
 
+import com.goafanti.core.shiro.token.TokenManager;
+
 public class AFTConstants {
 	public static final String	YYYYMMDDHHMMSS						= "yyyy-MM-dd HH:mm:ss";
 	public static final String	YYYYMMDDHHMMSS_OUT					= "yyyy-MM-dd_HH_mm_ss";
@@ -210,4 +212,6 @@ public class AFTConstants {
 	public static final String DEFAULT_RESULT="签单-自动触发";
 
     public static final long DUN_START_LIMIT_MS						= 24*3600*1000*900L;
+
+
 }

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

@@ -356,11 +356,12 @@
 
   <select id="selectExpenseAccountList" resultType="com.goafanti.expenseAccount.bo.OutExpenseAccountBo">
     select a.id,a.total_amount totalAmount,a.`type`,a.process_status processStatus,a.status,a.examine_name examineName,
+    a.attachment_url attachmentUrl,a.target_type targetType , e.contract_no contractNo,tm.buyer_name buyerName ,
     <if test="processStatus ==1">
       eae.type eaeType,
     </if>
-    a.target_type targetType , e.contract_no contractNo,tm.buyer_name buyerName ,f.name depName,d2.name financeName,
-    date_format(a.create_time,'%Y-%m-%d %H:%i:%S')createTimeStr,a.aname, b.name appDepName, c.name payDepName
+    f.name depName,d2.name financeName, date_format(a.create_time,'%Y-%m-%d %H:%i:%S')createTimeStr,a.aname,
+    b.name appDepName, c.name payDepName
     from expense_account a left join department b on a.apply_dep =b.id left join department c on a.pay_dep =c.id
     left join admin d on a.aid =d.id left join t_order_new e on a.order_no =e.order_no
     left join t_order_mid tm on a.order_no =tm.order_no left join department f on d.department_id =f.id

+ 18 - 0
src/main/java/com/goafanti/common/utils/PurviewUtils.java

@@ -0,0 +1,18 @@
+package com.goafanti.common.utils;
+
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.core.shiro.token.TokenManager;
+
+public class PurviewUtils {
+
+    /**
+     * 超级权限,超管,董事长,管理员
+     * @return
+     */
+    public static boolean  superPurview(){
+        if (TokenManager.hasRole(AFTConstants.SUPERADMIN)||TokenManager.hasRole(AFTConstants.APPROVAL_DECISION)||TokenManager.hasRole(AFTConstants.CED)){
+            return true;
+        }
+        return false;
+    }
+}

+ 9 - 0
src/main/java/com/goafanti/expenseAccount/bo/OutExpenseAccountBo.java

@@ -20,6 +20,15 @@ public class OutExpenseAccountBo {
     private String buyerName;
     private String depName;
     private String financeName;
+    private String attachmentUrl;
+
+    public String getAttachmentUrl() {
+        return attachmentUrl;
+    }
+
+    public void setAttachmentUrl(String attachmentUrl) {
+        this.attachmentUrl = attachmentUrl;
+    }
 
     public Integer getEaeType() {
         return eaeType;

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

@@ -9,10 +9,7 @@ import com.goafanti.common.enums.NoticeStatus;
 import com.goafanti.common.enums.NoticeTypes;
 import com.goafanti.common.error.BusinessException;
 import com.goafanti.common.model.*;
-import com.goafanti.common.utils.AsyncUtils;
-import com.goafanti.common.utils.DateUtils;
-import com.goafanti.common.utils.LoggerUtils;
-import com.goafanti.common.utils.WeChatUtils;
+import com.goafanti.common.utils.*;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.expenseAccount.Enums.EAProcessStatus;
@@ -579,7 +576,9 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
         }
         if (in.getStatus()!=null)param.put("status",in.getStatus());
         if (in.getProcessStatus()==null){
-            param.put("processStatus",0);
+            if(!PurviewUtils.superPurview()){
+                param.put("processStatus",0);
+            }
         }else {
             param.put("processStatus",in.getProcessStatus());
         }