|
|
@@ -2,7 +2,6 @@ package com.uas.platform.b2b.controller;
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
|
-import java.util.concurrent.Callable;
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.domain.Page;
|
|
|
@@ -24,7 +23,7 @@ import com.uas.platform.core.model.PageParams;
|
|
|
* 平台使用日志
|
|
|
*
|
|
|
* @author yingp
|
|
|
- *
|
|
|
+ *
|
|
|
*/
|
|
|
@Controller
|
|
|
@RequestMapping(value = "/log/usage")
|
|
|
@@ -54,23 +53,13 @@ public class UsageLogController {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/xls", method = RequestMethod.GET)
|
|
|
- public Callable<ModelAndView> exportUsageLogs() {
|
|
|
+ public ModelAndView exportUsageLogs() {
|
|
|
final PageInfo pageInfo = new PageInfo(1, JxlsExcelView.MAX_SIZE, 0);
|
|
|
pageInfo.sorting("time", Direction.DESC);
|
|
|
pageInfo.filter("enUU", SystemSession.getUser().getEnterprise().getUu());
|
|
|
- final String author = SystemSession.getUser().getUserName();
|
|
|
- return new Callable<ModelAndView>() {
|
|
|
-
|
|
|
- @Override
|
|
|
- public ModelAndView call() throws Exception {
|
|
|
- Map<String, Object> map = new HashMap<String, Object>();
|
|
|
- long t1 = System.currentTimeMillis();
|
|
|
- map.put("data", usageLogSerice.findAllByPageInfo(pageInfo).getContent());
|
|
|
- System.out.println(System.currentTimeMillis() - t1);
|
|
|
- return new ModelAndView(new JxlsExcelView("classpath:jxls-tpl/UsageLog", "平台使用日志", author), map);
|
|
|
- }
|
|
|
-
|
|
|
- };
|
|
|
+ Map<String, Object> map = new HashMap<String, Object>();
|
|
|
+ map.put("data", usageLogSerice.findAllByPageInfo(pageInfo).getContent());
|
|
|
+ return new ModelAndView(new JxlsExcelView("classpath:jxls-tpl/UsageLog", "平台使用日志"), map);
|
|
|
}
|
|
|
|
|
|
}
|