19626
2023-07-12 fbd4bea7bd57b4d4a33cb9ed0ebc15d9bf6551c0
force-app/main/default/classes/OPDNoReportApplicationController.cls
@@ -6,7 +6,7 @@
    //跳过上传附件判断 
    public Boolean IsHavFile { get; set; }
    //附件
    public List<Attachment> attachmentinfo { get; set; }
    public List<ContentDocument> attachmentinfo { get; set; }
    // //执行审批流成功标识
    public Boolean approvalFlag { get; set; }
@@ -45,7 +45,18 @@
            this.ModelLendingCodeId = opdPlan.ModelLending__c;
        }
        attachmentinfo = [SELECT Id, Name,OwnerId FROM Attachment WHERE  parentid = :paramId];
        //附件(lightning)
        List<ContentDocumentLink> cdlList = [SELECT ContentDocumentId
        FROM ContentDocumentLink
        WHERE LinkedEntityId = :paramId];
        List<ID> fileIDs = new List<ID>();
        for (ContentDocumentLink docLink : cdlList) {
        fileIDs.add(docLink.ContentDocumentId);
        }
        attachmentinfo=[SELECT Title,OwnerId,ContentModifiedDate from ContentDocument WHERE id IN :fileIDs];
        // attachmentinfo = [SELECT Id, Name,OwnerId FROM Attachment WHERE  parentid = :paramId];
        if(attachmentinfo.size()>0){
            IsHavFile =true;
        } else {