Commit 9b1ff9ea authored by 盖献康's avatar 盖献康

去除不必要的引用

parent fcf10238
package com.ruoyi.service;
import javax.servlet.http.HttpServletResponse;
/**
* PDF模板管理Service接口
* @author gxk
......
......@@ -17,11 +17,9 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.lang.reflect.Field;
import java.util.*;
import java.util.List;
......@@ -62,8 +60,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
ByteArrayOutputStream bos = null;
try {
// 模板绝对路径--服务器
// String fileName = "/template/receipt_template_02_27.pdf";
String fileName = "E:/文件/PDF模板/receipt_template_02_27.pdf";
String fileName = "/template/receipt_template_02_27.pdf";
// 读取现有模板内容
reader = new PdfReader(fileName);
// 创建输出流
......@@ -102,40 +99,6 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
return uploadMinio(bos, "检验报告_" + taskId);
}
private InspectionReportPdfVO requireData() {
InspectionReportPdfVO inspectionReportPdfVO = InspectionReportPdfVO.builder()
.reportNumber("报告编号")
.productName("产品名称")
.productModel("产品型号")
.entrustedUnit("委托单位")
.inspectionCenterName("检验中心名称")
.inspectionCenterAddress("检验中心地址")
.inspectionCenterTelephone("检验中心电话")
.inspectionCenterPostcode("检验中心邮编")
.clientAddress("委托单位地址")
.entrustedUnitTelephone("委托单位电话")
.clientPostalCode("委托单位邮编")
.sampleName("样品名称")
.typeSpecification("型号规格")
.productionEnterprise("生产企业")
.sampleSender("送养着")
.sampleDeliveryDate("送样日期")
.sampleQuantity("样品数量")
.productionDate("生产日期")
.inspectionItem("检验项目")
.testConclusion("检验结论")
.issueDate("签发日期")
.remark("备注")
.taskNumber("任务编号")
.sampleSum("样品数量")
.vehicleType("车辆类型")
.vehicleModel("车辆型号")
.vehicleIdentificationNumber("车辆识别码")
.sampleNumberSummary("样品编号汇总")
.build();
return inspectionReportPdfVO;
}
/**
* 企业留档文件PDF下载
* @param taskId
......@@ -232,6 +195,44 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
return StringUtils.format("{}/{}.pdf", DateUtils.datePath(), name);
}
/**
* 模拟数据
* @return
*/
private InspectionReportPdfVO requireData() {
InspectionReportPdfVO inspectionReportPdfVO = InspectionReportPdfVO.builder()
.reportNumber("报告编号")
.productName("产品名称")
.productModel("产品型号")
.entrustedUnit("委托单位")
.inspectionCenterName("检验中心名称")
.inspectionCenterAddress("检验中心地址")
.inspectionCenterTelephone("检验中心电话")
.inspectionCenterPostcode("检验中心邮编")
.clientAddress("委托单位地址")
.entrustedUnitTelephone("委托单位电话")
.clientPostalCode("委托单位邮编")
.sampleName("样品名称")
.typeSpecification("型号规格")
.productionEnterprise("生产企业")
.sampleSender("送养着")
.sampleDeliveryDate("送样日期")
.sampleQuantity("样品数量")
.productionDate("生产日期")
.inspectionItem("检验项目")
.testConclusion("检验结论")
.issueDate("签发日期")
.remark("备注")
.taskNumber("任务编号")
.sampleSum("样品数量")
.vehicleType("车辆类型")
.vehicleModel("车辆型号")
.vehicleIdentificationNumber("车辆识别码")
.sampleNumberSummary("样品编号汇总")
.build();
return inspectionReportPdfVO;
}
/**
* 渲染数据
* @param fields
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment