|
@@ -4,18 +4,23 @@ import com.goafanti.common.bo.Result;
|
|
|
import com.goafanti.common.constant.ErrorConstants;
|
|
import com.goafanti.common.constant.ErrorConstants;
|
|
|
import com.goafanti.common.controller.CertifyApiController;
|
|
import com.goafanti.common.controller.CertifyApiController;
|
|
|
import com.goafanti.common.utils.ParamUtils;
|
|
import com.goafanti.common.utils.ParamUtils;
|
|
|
|
|
+import com.goafanti.common.utils.excel.NewExcelUtil;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
|
import com.goafanti.expenseAccount.bo.InputExpenseAccount;
|
|
import com.goafanti.expenseAccount.bo.InputExpenseAccount;
|
|
|
import com.goafanti.expenseAccount.bo.InputExpenseAccountDetails;
|
|
import com.goafanti.expenseAccount.bo.InputExpenseAccountDetails;
|
|
|
import com.goafanti.expenseAccount.bo.InputPageListBo;
|
|
import com.goafanti.expenseAccount.bo.InputPageListBo;
|
|
|
|
|
+import com.goafanti.expenseAccount.bo.OutExpenseAccountStatistics;
|
|
|
import com.goafanti.expenseAccount.service.ExpenseAccountService;
|
|
import com.goafanti.expenseAccount.service.ExpenseAccountService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.validation.BindingResult;
|
|
import org.springframework.validation.BindingResult;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
+
|
|
|
@RestController
|
|
@RestController
|
|
|
@RequestMapping("/api/admin/expenseAccount")
|
|
@RequestMapping("/api/admin/expenseAccount")
|
|
|
public class ExpenseAccountController extends CertifyApiController {
|
|
public class ExpenseAccountController extends CertifyApiController {
|
|
@@ -23,6 +28,9 @@ public class ExpenseAccountController extends CertifyApiController {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ExpenseAccountService expenseAccountService;
|
|
private ExpenseAccountService expenseAccountService;
|
|
|
|
|
|
|
|
|
|
+ @Value(value = "${upload.path}")
|
|
|
|
|
+ private final String uploadPath = null;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 新增私有报销帐号
|
|
* 新增私有报销帐号
|
|
|
* @param in
|
|
* @param in
|
|
@@ -199,6 +207,13 @@ public class ExpenseAccountController extends CertifyApiController {
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @RequestMapping(value = "/statistics/evict",method = RequestMethod.GET)
|
|
|
|
|
+ public Result statisticsEvict(String name,String depId,String startTime,String endTime){
|
|
|
|
|
+ Result res=new Result();
|
|
|
|
|
+ expenseAccountService.statisticsEvict( name, depId, startTime, endTime);
|
|
|
|
|
+ return res.data(1);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 获取后台统计数据
|
|
* 获取后台统计数据
|
|
@@ -206,7 +221,9 @@ public class ExpenseAccountController extends CertifyApiController {
|
|
|
*/
|
|
*/
|
|
|
@RequestMapping(value = "/statistics/export",method = RequestMethod.GET)
|
|
@RequestMapping(value = "/statistics/export",method = RequestMethod.GET)
|
|
|
public Result statisticsExport(String name,String depId,String startTime,String endTime){
|
|
public Result statisticsExport(String name,String depId,String startTime,String endTime){
|
|
|
- return expenseAccountService.statisticsExport( name, depId, startTime, endTime);
|
|
|
|
|
|
|
+ List<OutExpenseAccountStatistics> list = expenseAccountService.statistics( name, depId, startTime, endTime);
|
|
|
|
|
+ NewExcelUtil<OutExpenseAccountStatistics> newExcelUtil=new NewExcelUtil<>(OutExpenseAccountStatistics.class);
|
|
|
|
|
+ return newExcelUtil.exportExcel(list,"报销统计",uploadPath);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|