Pārlūkot izejas kodu

修改试验系统检测样品模块留样样品查看pdf返回提示语

lvy 2 nedēļas atpakaļ
vecāks
revīzija
70cc0076e8

+ 3 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialSelfInspectionRecordServiceImpl.java

@@ -2186,6 +2186,9 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
     public R getSamplePdfUrl(String id, String contrctId) {
         try {
             String pdf = this.getMergePdfToTrial(Func.toLong(contrctId), Func.toLong(id));
+            if (pdf == null || pdf.isEmpty()) {
+                return R.fail("获取pdf文件失败");
+            }
             return R.data(pdf);
         } catch (FileNotFoundException e) {
             throw new RuntimeException(e);