Li Jun
2022-04-25 784f9cec56eef3c7ac0ba02de98fdbf341c6a7b3
force-app/main/default/classes/RepairAndQISToPDFController.cls
@@ -120,12 +120,18 @@
                }
                setImgSrcs(qis, apiName);
                pdfPage = new PageReference('/apex/repairandqistopdf?api=qis&id='+qis.Id+'&field='+apiName);
                System.debug('lt123pdfPage !'+pdfPage);
                Blob pdfBody;
                if(Test.isRunningTest()) { 
                    pdfBody = blob.valueOf('Unit.Test');
                } else {
                   pdfBody = pdfPage.getContentAsPDF();
                }
                System.debug('lt123pdfBody图片'+pdfBody);
                Attachment attach = new Attachment();
                attach.Body = pdfBody;
                if ('problem_detail_photo__c'.equals(apiName)) {