zhaowenxuan
7 天以前 0892d843cd394f383ff50f480f7f22f2ec3829bc
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjReportTemplateController.java
@@ -13,6 +13,7 @@
import com.ltkj.common.utils.SecurityUtils;
import com.ltkj.hosp.domain.TjReport;
import com.ltkj.hosp.domain.TjReservation;
import com.ltkj.system.service.ISysConfigService;
import com.ltkj.web.config.pdfutils.PDFBinaryUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -48,9 +49,11 @@
public class TjReportTemplateController extends BaseController {
    @Autowired
    private ITjReportTemplateService tjReportTemplateService;
    @Autowired
    private ISysConfigService configService;
    @Value("${path.filePath}")
    private String value;
//    @Value("${path.filePath}")
//    private String value;
    /**
     * 查询template列表
@@ -132,9 +135,10 @@
        if (one == null) {
            return;
        }
        String value = configService.selectConfigByKey("path_filePath");
        String userId = SecurityUtils.getLoginUser().getUsername();
        PDFBinaryUtil.base64StringToPDF(one.getTemplate(), FileUtil.mkdir(value).getPath() + "\\" + userId + reportTemId + "_模板预览.pdf");
        String filePath = value + "\\" + userId + reportTemId + "_模板预览.pdf";
        PDFBinaryUtil.base64StringToPDF(one.getTemplate(), FileUtil.mkdir(value).getPath() + File.separator + userId + reportTemId + "_模板预览.pdf");
        String filePath = value + File.separator + userId + reportTemId + "_模板预览.pdf";
        File f = new File(filePath);
        if (filePath.isEmpty()) {
            System.out.println("文件不存在!");
@@ -201,9 +205,10 @@
        if (one == null) {
            return;
        }
        String value = configService.selectConfigByKey("path_filePath");
        String userId = SecurityUtils.getLoginUser().getUsername();
        PDFBinaryUtil.base64StringToPDF(one.getTemplate(), FileUtil.mkdir(value).getPath() + "\\" + userId + "_职业健康体检个人信息表.pdf");
        String filePath = value + "\\" + userId + "_职业健康体检个人信息表.pdf";
        PDFBinaryUtil.base64StringToPDF(one.getTemplate(), FileUtil.mkdir(value).getPath() + File.separator + userId + "_职业健康体检个人信息表.pdf");
        String filePath = value + File.separator + userId + "_职业健康体检个人信息表.pdf";
        File f = new File(filePath);
        if (filePath.isEmpty()) {
            System.out.println("文件不存在!");