From 7c7cb195462c2ded7bfe4105959ea36d1dd68ded Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期三, 11 十月 2023 19:26:36 +0800
Subject: [PATCH] 近期修改

---
 force-app/main/default/classes/ConsumTrialPDFController.cls |   30 +++++++++++++++++-------------
 1 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/force-app/main/default/classes/ConsumTrialPDFController.cls b/force-app/main/default/classes/ConsumTrialPDFController.cls
index ef43365..ffdac9d 100644
--- a/force-app/main/default/classes/ConsumTrialPDFController.cls
+++ b/force-app/main/default/classes/ConsumTrialPDFController.cls
@@ -21,9 +21,9 @@
     public Integer consumApplySetDetailListSize { get; set; }  // 鑰楁潗澶囧搧鎬绘暟閲�
     public String errorMsg { get; set; }  // 閿欒淇℃伅
 
-    public string staticResource { get; private set; }
-    public string staticResourceCon { get; private set; }
-    public string staticResourceFile { get; private set; }
+    //public string staticResource { get; private set; }
+    //public string staticResourceCon { get; private set; }
+    //public string staticResourceFile { get; private set; }
     public string BRSrc{get;private set;}
     public string QRSrc{get;private set;}
 
@@ -33,9 +33,9 @@
             throw new ControllerUtil.myException('鍙傛暟閿欒锛氳鎸囧畾Id銆�');
         }
         pdfPageList = new List<PdfPageClass>();
-        staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Consum_Apply_Equipment_Set_Detail__c'));
-        staticResourceCon = JSON.serialize(PIHelper.getPIIntegrationInfo('Consum_Apply__c'));
-        staticResourceFile = JSON.serialize(PIHelper.getPIIntegrationInfo('Document'));
+        //staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Consum_Apply_Equipment_Set_Detail__c'));
+        //staticResourceCon = JSON.serialize(PIHelper.getPIIntegrationInfo('Consum_Apply__c'));
+        //staticResourceFile = JSON.serialize(PIHelper.getPIIntegrationInfo('Document'));
     }
 
     /**
@@ -91,7 +91,7 @@
                      , Post_Code__c  // 閭紪
                      , Loaner_received_staff__c  // 鎺ユ敹浜哄鍚�
                      , Loaner_received_staff_phone__c  // 鎺ユ敹浜虹數璇�
-            		,AWS_Data_Id__c
+            		 //,AWS_Data_Id__c    //deloitte-zhj 20231010 PIPL杩樺師
                   FROM Consum_Apply__c
                  WHERE Id = :targetConsumApplyId
         ];
@@ -153,7 +153,7 @@
                      , Follower_User__r.Name
                      , Spare__c  // 澶囩敤
                      , Comment__c  // 澶囨敞
-                     , AWS_Data_Id__c
+                     //, AWS_Data_Id__c    //deloitte-zhj 20231010 PIPL杩樺師
                      , ManagementCode__c  // 绠$悊缂栫爜 yc 鑰楁潗杩芥函
                      , EquipmentManagementCode__c  // 澶囧搧绠$悊鐮� yc 鑰楁潗杩芥函
                   FROM Consum_Apply_Equipment_Set_Detail__c
@@ -223,12 +223,16 @@
         }
     }
 
+    
+
     public static string GetImageBase64(string id){
-        List<ContentVersion> version = [select VersionData from ContentVersion where Id =: id];
-        // List<Attachment> atts = [SELECT Id, IsDeleted, ParentId, Name, IsPrivate, ContentType, BodyLength, Body, OwnerId, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, Description FROM Attachment where id=:id];
-        if (version.size()==0) {
-            return null;
+        List<ContentVersion> version =new List<ContentVersion>();
+        version = [select VersionData from ContentVersion where Id =: id];
+        if(version.size() > 0){
+            return 'data:image/png;base64,' + EncodingUtil.base64Encode(version[0].VersionData);
+        }else{
+            return '';
         }
-        return 'data:image/png;base64,' + EncodingUtil.base64Encode(version[0].VersionData);
+        
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1