|
@@ -5,7 +5,6 @@ import java.io.File;
|
|
|
import java.io.FileOutputStream;
|
|
import java.io.FileOutputStream;
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
|
import java.io.OutputStream;
|
|
import java.io.OutputStream;
|
|
|
-import java.net.URISyntaxException;
|
|
|
|
|
import java.sql.Connection;
|
|
import java.sql.Connection;
|
|
|
import java.sql.PreparedStatement;
|
|
import java.sql.PreparedStatement;
|
|
|
import java.sql.ResultSet;
|
|
import java.sql.ResultSet;
|
|
@@ -33,7 +32,6 @@ import com.itextpdf.text.pdf.PdfCopy;
|
|
|
import com.itextpdf.text.pdf.PdfReader;
|
|
import com.itextpdf.text.pdf.PdfReader;
|
|
|
import com.uas.report.core.exception.ReportException;
|
|
import com.uas.report.core.exception.ReportException;
|
|
|
import com.uas.report.service.PrintService;
|
|
import com.uas.report.service.PrintService;
|
|
|
-import com.uas.report.service.ResourceService;
|
|
|
|
|
import com.uas.report.support.SysConf;
|
|
import com.uas.report.support.SysConf;
|
|
|
import com.uas.report.util.ContextUtils;
|
|
import com.uas.report.util.ContextUtils;
|
|
|
import com.uas.report.util.ReportConstants;
|
|
import com.uas.report.util.ReportConstants;
|
|
@@ -66,8 +64,8 @@ public class PrintServiceImpl implements PrintService {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private SysConf sysConf;
|
|
private SysConf sysConf;
|
|
|
|
|
|
|
|
- @Autowired
|
|
|
|
|
- private ResourceService resourceService;
|
|
|
|
|
|
|
+ // @Autowired
|
|
|
|
|
+ // private ResourceService resourceService;
|
|
|
|
|
|
|
|
private Logger logger = Logger.getLogger(getClass());
|
|
private Logger logger = Logger.getLogger(getClass());
|
|
|
|
|
|
|
@@ -296,11 +294,12 @@ public class PrintServiceImpl implements PrintService {
|
|
|
*/
|
|
*/
|
|
|
private Map<String, Object> print(String userName, String reportName, String whereCondition, String otherParameters,
|
|
private Map<String, Object> print(String userName, String reportName, String whereCondition, String otherParameters,
|
|
|
String exportFileType, Integer pageIndex, DataSource dataSource) {
|
|
String exportFileType, Integer pageIndex, DataSource dataSource) {
|
|
|
- try {
|
|
|
|
|
- resourceService.syncResources(userName);
|
|
|
|
|
- } catch (URISyntaxException | IOException e) {
|
|
|
|
|
- throw new ReportException(e).setDetailedMessage(e);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // TODO 重新实现jasperserver接口
|
|
|
|
|
+ // try {
|
|
|
|
|
+ // resourceService.syncResources(userName);
|
|
|
|
|
+ // } catch (URISyntaxException | IOException e) {
|
|
|
|
|
+ // throw new ReportException(e).setDetailedMessage(e);
|
|
|
|
|
+ // }
|
|
|
|
|
|
|
|
// 报表路径为报表根路径REPORT_DIR + 当前账套用户名userName
|
|
// 报表路径为报表根路径REPORT_DIR + 当前账套用户名userName
|
|
|
String reportDir = new StringBuilder(sysConf.getLocalBaseDir()).append("/").append(userName).toString();
|
|
String reportDir = new StringBuilder(sysConf.getLocalBaseDir()).append("/").append(userName).toString();
|