From fd9df05c48c09b4d7f39a3b401882bda226dedea Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期二, 31 十月 2023 20:38:18 +0800
Subject: [PATCH] 近期修改
---
force-app/main/default/classes/ConsumTrialPDFController.cls | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/force-app/main/default/classes/ConsumTrialPDFController.cls b/force-app/main/default/classes/ConsumTrialPDFController.cls
index 7c8c801..ec2f267 100644
--- a/force-app/main/default/classes/ConsumTrialPDFController.cls
+++ b/force-app/main/default/classes/ConsumTrialPDFController.cls
@@ -91,7 +91,7 @@
, Post_Code__c // 閭紪
, Loaner_received_staff__c // 鎺ユ敹浜哄鍚�
, Loaner_received_staff_phone__c // 鎺ユ敹浜虹數璇�
- ,AWS_Data_Id__c
+ ,AWS_Data_Id__c
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
, ManagementCode__c // 绠$悊缂栫爜 yc 鑰楁潗杩芥函
, EquipmentManagementCode__c // 澶囧搧绠$悊鐮� yc 鑰楁潗杩芥函
FROM Consum_Apply_Equipment_Set_Detail__c
@@ -223,11 +223,18 @@
}
}
+
+
public static string GetImageBase64(string 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 (atts.size()==0) {
- return null;
+ // 20231103 Lightning鏂囦欢淇敼 Start
+ 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(atts[0].body);
+ // 20231103 Lightning鏂囦欢淇敼 End
}
}
\ No newline at end of file
--
Gitblit v1.9.1