|
|
@@ -3,6 +3,7 @@ package com.goafanti.expenseAccount.service.impl;
|
|
|
import com.goafanti.admin.bo.AdminListBo;
|
|
|
import com.goafanti.common.bo.AdminNoticeBo;
|
|
|
import com.goafanti.common.bo.EmailBo;
|
|
|
+import com.goafanti.common.bo.Result;
|
|
|
import com.goafanti.common.constant.AFTConstants;
|
|
|
import com.goafanti.common.dao.*;
|
|
|
import com.goafanti.common.enums.NoticeStatus;
|
|
|
@@ -12,12 +13,15 @@ import com.goafanti.common.model.*;
|
|
|
import com.goafanti.common.utils.AsyncUtils;
|
|
|
import com.goafanti.common.utils.DateUtils;
|
|
|
import com.goafanti.common.utils.WeChatUtils;
|
|
|
+import com.goafanti.common.utils.excel.NewExcelUtil;
|
|
|
import com.goafanti.core.mybatis.BaseMybatisDao;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
|
import com.goafanti.expenseAccount.Enums.EAProcessStatus;
|
|
|
import com.goafanti.expenseAccount.bo.*;
|
|
|
import com.goafanti.expenseAccount.service.ExpenseAccountService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.cache.annotation.Cacheable;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
@@ -44,6 +48,9 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
@Autowired
|
|
|
private ExpenseAccountExamineMapper expenseAccountExamineMapper;
|
|
|
|
|
|
+ @Value(value = "${upload.path}")
|
|
|
+ private final String uploadPath = null;
|
|
|
+
|
|
|
|
|
|
|
|
|
@Override
|
|
|
@@ -588,7 +595,8 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
|
|
|
|
|
|
@Override
|
|
|
- public Object statistics(String name,String depId,String startTime,String endTime) {
|
|
|
+ @Cacheable(value = "expenseAccountStatistics#300", key = "'page:'+#name+',depId'+#depId+',startTime'+#startTime+',endTime'+#endTime")
|
|
|
+ public List<OutExpenseAccountStatistics> statistics(String name,String depId,String startTime,String endTime) {
|
|
|
if (endTime!=null)endTime=endTime+" 23:59:59";
|
|
|
List<OutMyEAStatistics> list = expenseAccountMapper.selectStatistics(name, depId, startTime, endTime);
|
|
|
List<OutExpenseAccountStatistics> results=new ArrayList<>();
|
|
|
@@ -660,4 +668,11 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
}
|
|
|
return results;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Result statisticsExport(String name, String depId, String startTime, String endTime) {
|
|
|
+ List<OutExpenseAccountStatistics> list = statistics( name, depId, startTime, endTime);
|
|
|
+ NewExcelUtil<OutExpenseAccountStatistics> newExcelUtil=new NewExcelUtil<>(OutExpenseAccountStatistics.class);
|
|
|
+ return newExcelUtil.exportExcel(list,"报销统计",uploadPath);
|
|
|
+ }
|
|
|
}
|