| | |
| | | private IDictCompService dictCompService; |
| | | @Resource |
| | | private ITjReportTemplateService reportTemplateService; |
| | | @Value("${path.filePath}") |
| | | private String value; |
| | | // @Value("${path.filePath}") |
| | | // private String value; |
| | | @Value("${path.reportServer}") |
| | | private String urlValue; |
| | | @Resource |
| | |
| | | return shengchengbgmoban(tjNumber, tjOrder, tjCustomer, reportTemplate,zongJianYiShiQianMing); |
| | | } catch (Exception e) { |
| | | // throw new Exception(e); |
| | | // log.error("生成报告失败:"+e.getMessage(),String.valueOf(e)); |
| | | log.error("生成报告失败:"+e.getMessage(),String.valueOf(e)); |
| | | e.printStackTrace(); |
| | | tjOrder.setReportTime(null); |
| | | tjOrder.setCheckTime(null); |
| | |
| | | } |
| | | |
| | | public AjaxResult shengchengbgmoban(String tjNumber, TjOrder tjOrder, TjCustomer tjCustomer, TjReportTemplate reportTemplate,TjReportTemplate zongJianYiShiQianMing) throws Exception { |
| | | String value = configService.selectConfigByKey("path_filePath"); |
| | | AjaxResult ajaxResult = null; |
| | | try { |
| | | ajaxResult = hisPDFUtil.hisPDFNew2(tjOrder, tjCustomer, reportTemplate,zongJianYiShiQianMing); |
| | |
| | | // if (one == null) { |
| | | // return; |
| | | // } |
| | | String value = configService.selectConfigByKey("path_filePath"); |
| | | String key = DataSourceContextHolder.getDataSourceKey(); |
| | | key = key.replace("ltkjpeis10_",""); |
| | | // String userId = SecurityUtils.getLoginUser().getUsername(); |
| | |
| | | } |
| | | String key = DataSourceContextHolder.getDataSourceKey(); |
| | | key = key.replace("ltkjpeis10_",""); |
| | | |
| | | String value = configService.selectConfigByKey("path_filePath"); |
| | | // String userId = SecurityUtils.getLoginUser().getUsername(); |
| | | // PDFBinaryUtil.base64StringToPDF(one.getReport(), FileUtil.mkdir(value).getPath() + File.separator + key + File.separator + tjCustomer.getCusId() + tjNumber + tjCustomer.getCusName() + "_体检报告.pdf"); |
| | | String filePath = value + File.separator + key + File.separator + tjCustomer.getCusId() + tjNumber + tjCustomer.getCusName() + "_报告.pdf"; |
| | |
| | | public AjaxResult preview(@RequestBody String data) { |
| | | String is_batch_report_use_sql = configService.selectConfigByKey("is_batch_report_use_sql"); |
| | | List<String> tjNumbers = Arrays.stream(data.split(",")).collect(Collectors.toList()); |
| | | String value = configService.selectConfigByKey("path_filePath"); |
| | | if ("true".equals(is_batch_report_use_sql)) { |
| | | return tjReportService.makeBatchReport(tjNumbers); |
| | | return tjReportService.makeBatchReport(tjNumbers, value); |
| | | } else { |
| | | return makeReport(tjNumbers); |
| | | } |