From 02ddc35714cbd1688b7cb057f770f1410de79dab Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期五, 11 三月 2022 12:19:33 +0800
Subject: [PATCH] PIPL Updated Code 20220311
---
force-app/main/default/classes/ConsumTrialPDFController.cls | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/force-app/main/default/classes/ConsumTrialPDFController.cls b/force-app/main/default/classes/ConsumTrialPDFController.cls
index 906ec62..265e304 100644
--- a/force-app/main/default/classes/ConsumTrialPDFController.cls
+++ b/force-app/main/default/classes/ConsumTrialPDFController.cls
@@ -21,12 +21,17 @@
public Integer consumApplySetDetailListSize { get; set; } // 鑰楁潗澶囧搧鎬绘暟閲�
public String errorMsg { get; set; } // 閿欒淇℃伅
+ public string staticResource { get; private set; }
+ public string BRSrc{get;private set;}
+ public string QRSrc{get;private set;}
+
public ConsumTrialPDFController() {
targetConsumApplyId = ApexPages.currentPage().getParameters().get('id');
if (String.isBlank(targetConsumApplyId)) {
throw new ControllerUtil.myException('鍙傛暟閿欒锛氳鎸囧畾Id銆�');
}
pdfPageList = new List<PdfPageClass>();
+ staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Consum_Apply_Equipment_Set_Detail__c'));
}
/**
@@ -40,6 +45,10 @@
ApexPages.addMessage(new ApexPages.Message(ApexPages.severity.ERROR, errorMsg));
return;
}
+
+ BRSrc = GetImageBase64(targetConsumApply.BRId__c);
+ QRSrc = GetImageBase64(targetConsumApply.QRId__c);
+
// 鑾峰彇鑰楁潗澶囧搧閰嶅涓�瑙堟槑缁�
List<Consum_Apply_Equipment_Set_Detail__c> targetConsumSetDetailList = getTargetConsumSetDetailList();
@@ -139,6 +148,7 @@
, Follower_User__r.Name
, Spare__c // 澶囩敤
, Comment__c // 澶囨敞
+ , AWS_Data_Id__c
, ManagementCode__c // 绠$悊缂栫爜 yc 鑰楁潗杩芥函
, EquipmentManagementCode__c // 澶囧搧绠$悊鐮� yc 鑰楁潗杩芥函
FROM Consum_Apply_Equipment_Set_Detail__c
@@ -207,4 +217,12 @@
equipSetDetailList = new List<Consum_Apply_Equipment_Set_Detail__c>();
}
}
+
+ 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;
+ }
+ return 'data:image/png;base64,' + EncodingUtil.base64Encode(atts[0].body);
+ }
}
\ No newline at end of file
--
Gitblit v1.9.1