From b03b37e1d649631e31f33704a49a46f05aa7dc9f Mon Sep 17 00:00:00 2001
From: Crunchy <3114200645@qq.com>
Date: 星期三, 03 七月 2024 16:14:21 +0800
Subject: [PATCH] 2024-7-3 标准库的导入
---
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java
index 4d1bf27..b8f0b85 100644
--- a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java
+++ b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java
@@ -171,8 +171,9 @@
String laboratory = insOrderMapper.selectById(insReport.getInsOrderId()).getLaboratory();
sealUrl = insReportMapper.getLaboratoryByName(laboratory);
}catch (Exception e){
- throw new ErrorException("鎵句笉鍒版姤鍛婄珷鍗�");
+ throw new ErrorException("鎵句笉鍒版姤鍛婁笓鐢ㄧ珷");
}
+ if(sealUrl==null) throw new ErrorException("鎵句笉鍒版姤鍛婁笓鐢ㄧ珷");
//绯荤粺鐢熸垚鎶ュ憡鍦板潃
String url = insReport.getUrl();
//鎵嬪姩涓婁紶鎶ュ憡鍦板潃
@@ -222,6 +223,18 @@
try {
//鍑瘉 涓嶇劧鍒囨崲鍚庢湁姘村嵃
// InputStream inputStream = this.getClass().getResourceAsStream("/lib/license.xml");
+ /*String url;
+ try {
+ InputStream inputStream = this.getClass().getResourceAsStream("/lib/license.xml");
+ File file = File.createTempFile("temp", ".tmp");
+ OutputStream outputStream = new FileOutputStream(file);
+ IOUtils.copy(inputStream, outputStream);
+ url = file.getAbsolutePath();
+ } catch (FileNotFoundException e) {
+ throw new ErrorException("鎵句笉鍒版ā鏉挎枃浠�");
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }*/
InputStream is = new ClassPathResource("/lib/license.xml").getInputStream();
License license = new License();
license.setLicense(is);
--
Gitblit v1.9.3