| | |
| | | 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; |
| | |
| | | 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列表 |
| | |
| | | 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("文件不存在!"); |
| | |
| | | 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("文件不存在!"); |