|
@@ -27,7 +27,6 @@ import com.onemap.system.api.SpatialService;
|
|
|
import com.onemap.system.api.domain.PolygonDataVo;
|
|
|
import com.onemap.system.api.domain.WktsVo;
|
|
|
import org.apache.commons.io.FileUtils;
|
|
|
-import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
|
|
|
import org.apache.poi.util.Units;
|
|
|
import org.apache.poi.xwpf.usermodel.*;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
@@ -98,7 +97,8 @@ public class ReportServiceImpl implements IReportService {
|
|
|
String reportPath = "选址报告_" + timeStamp + ".docx";
|
|
|
createReport(res, allPath + "/" + reportPath, dkIds);
|
|
|
// 生成返回结果
|
|
|
- fzxzReport.setReportfile(filePath + "/" + reportPath);
|
|
|
+ fzxzReport.setReportFile(filePath + "/" + reportPath);
|
|
|
+ fzxzReport.setReportPdfFile(filePath + "/" + reportPath.replace(".docx", ".pdf"));
|
|
|
fzxzReport.setBsm(bsm);
|
|
|
// fzxzReport.setFxbg(fzxzReport.getReportfile());
|
|
|
fzxzReport.setJsdw(res.getJsdw());
|
|
@@ -453,7 +453,7 @@ public class ReportServiceImpl implements IReportService {
|
|
|
}
|
|
|
// 转PDF
|
|
|
String outfilepath = reportPath.replace(".docx", ".pdf");
|
|
|
- // NpoiHelper.doc2pdf(reportPath, outfilepath);
|
|
|
+ NpoiHelper.doc2pdf(reportPath, outfilepath);
|
|
|
System.out.println(outfilepath);
|
|
|
}
|
|
|
|