소스 검색

删除createPdfFile方法

sunyj 8 년 전
부모
커밋
c438336fba
2개의 변경된 파일0개의 추가작업 그리고 43개의 파일을 삭제
  1. 0 23
      src/main/java/com/uas/report/service/PrintService.java
  2. 0 20
      src/main/java/com/uas/report/service/impl/PrintServiceImpl.java

+ 0 - 23
src/main/java/com/uas/report/service/PrintService.java

@@ -54,29 +54,6 @@ public interface PrintService {
 	public Map<String, Object> preview(String userName, String profile, String reportName, String whereCondition,
 			String otherParameters, Integer pageIndex);
 
-	/**
-	 * 获取第pageIndex页的pdf数据并写入pdfFilePath路径下
-	 * 
-	 * @param userName
-	 *            不为null;当前账套用户名
-	 * @param profile
-	 *            可选(UAS等系统不必传递该参数),用于标识请求源(B2C、B2B)是正式、测试还是开发版本:prod、test、dev
-	 * @param reportName
-	 *            不为null;需要预览的报表的名称,不带任何后缀(如预览采购单,即为"Purchase")
-	 * @param whereCondition
-	 *            可为null;where之后的条件(包括where)
-	 * @param otherParameters
-	 *            若模板已指定需要的参数,则不可为null;其他参数,区别于whereCondition,报表某些字段的值取决于这些参数;
-	 *            JSON格式,数据为键值对
-	 * @param pdfFilePath
-	 *            该报表对应的pdf绝对路径
-	 * @param pageIndex
-	 *            页码
-	 * @return 总页数
-	 */
-	public Integer createPdfFile(String userName, String profile, String reportName, String whereCondition,
-			String otherParameters, String pdfFilePath, Integer pageIndex);
-
 	/**
 	 * 获取模板对应的账套
 	 * 

+ 0 - 20
src/main/java/com/uas/report/service/impl/PrintServiceImpl.java

@@ -47,9 +47,7 @@ import com.uas.report.jasperreports.engine.export.CustomJRXlsExporter;
 import com.uas.report.model.Master;
 import com.uas.report.service.FileService;
 import com.uas.report.service.PrintService;
-import com.uas.report.util.ArrayUtils;
 import com.uas.report.util.CollectionUtils;
-import com.uas.report.util.FileUtils;
 import com.uas.report.util.MasterManager;
 import com.uas.report.util.Platform;
 import com.uas.report.util.ReportConstants;
@@ -593,24 +591,6 @@ public class PrintServiceImpl implements PrintService {
 		jasperDesign.setRightMargin(0);
 	}
 
-	@Override
-	public Integer createPdfFile(String userName, String profile, String reportName, String whereCondition,
-			String otherParameters, String pdfFilePath, Integer pageIndex) {
-		File file = new File(pdfFilePath);
-		Map<String, Object> result = preview(userName, profile, reportName, whereCondition, otherParameters, pageIndex);
-		byte[] data = null;
-		Integer pageSize = null;
-		if (result != null && result.containsKey("data") && result.containsKey("pageSize")) {
-			data = (byte[]) result.remove("data");
-			pageSize = (Integer) result.remove("pageSize");
-		}
-		if (ArrayUtils.isEmpty(data) || pageSize == null) {
-			throw new ReportException("获取预览数据失败");
-		}
-		FileUtils.write(file.getPath(), data);
-		return pageSize;
-	}
-
 	@Override
 	public String getMasterOfJrxml(String userName, String reportName) {
 		ReportUtils.checkParameters(userName, reportName);