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)) {