Browse Source

pdfData接口无论是否过载,均返回data、pageSize、overload

sunyj 8 years ago
parent
commit
4167645d9b
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/main/java/com/uas/report/controller/PrintController.java

+ 3 - 2
src/main/java/com/uas/report/controller/PrintController.java

@@ -307,16 +307,17 @@ public class PrintController {
 				otherParameters, 1);
 		Integer pageSize = null;
 		if (result != null && result.containsKey("data") && result.containsKey("pageSize")) {
-			pageSize = (Integer) result.remove("pageSize");
+			pageSize = (Integer) result.get("pageSize");
 		}
 		if (pageSize == null) {
 			throw new ReportException("获取预览数据失败");
 		}
 		if (pageSize > MAX_PAGE_SIZE) {
-			result = new HashMap<>();
+			result.put("data", "");
 			result.put("overload", "true");
 		} else {
 			result = printService.preview(userName, profile, reportName, whereCondition, otherParameters, null);
+			result.put("overload", false);
 		}
 		return result;
 	}