Browse Source

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@723 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d

administrator 11 years ago
parent
commit
e3e184c074

+ 5 - 16
src/main/java/com/uas/platform/b2b/controller/UsageLogController.java

@@ -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);
 	}
 
 }

+ 2 - 2
src/main/java/com/uas/platform/b2b/controller/VendorController.java

@@ -59,13 +59,13 @@ public class VendorController {
 	
 
 	/**
-	 * 分页查找平台使用日志
+	 * 导出
 	 * 
 	 * @param params
 	 * @return
 	 */
 	@RequestMapping(value = "/customer/xls", method = RequestMethod.GET)
-	public ModelAndView exportUsageLogs() {
+	public ModelAndView exportVendors() {
 		Map<String, Object> map = new HashMap<String, Object>();
 		PageInfo pageInfo = new PageInfo(1, JxlsExcelView.MAX_SIZE, 0);
 		pageInfo.sorting("myEnUU", Direction.ASC);

+ 1 - 1
src/main/java/com/uas/platform/b2b/erp/model/ErpLog.java

@@ -152,7 +152,7 @@ public class ErpLog extends BufferedLogable implements Serializable {
 	public void setUser(User user) {
 		this.user = user;
 	}
-	
+
 	@JsonIgnore
 	public String getTimeString() {
 		return DateFormatUtils.DATETIME_FORMAT.format(getTime());

+ 1 - 1
src/main/java/com/uas/platform/b2b/support/JxlsExcelView.java

@@ -38,7 +38,7 @@ public class JxlsExcelView extends AbstractExcelView {
 
 	private static final String EXTENSION = ".xls";
 
-	public JxlsExcelView(String tplPath, String fileName, String author) {
+	public JxlsExcelView(String tplPath, String fileName) {
 		super();
 		setUrl(tplPath);
 		this.fileName = fileName;