public without sharing class eSignFormAttachmentController { //存放所有的附件 public List acccData { get; set; } //存放所有的附件的状态 public eSignForm__c eSignForm { get; set; } //区分医院经销商标识符 public String identifier { get; set; } public String identifier2 { get; set; } //附件表的parentId public String parentId; public String baseUrl { get; private set; } // 阿里云迁移 by DTT-亚楠 20240107 public eSignFormAttachmentController() { parentId = System.currentPageReference().getParameters().get('parentId'); //parentId = 'a421000000367mz'; acccData = new List(); System.debug('tiaoshiListjiheparentId==='+parentId); } public void init() { this.baseUrl = URL.getOrgDomainURL().toExternalForm(); getAccessory(); String soql = 'SELECT agencyAutoSignUpStatus__c,id,HPSignUpStatus__c,Group_purchase_PCL__c,OCM_man_province_cus__c,agencySignUpDate__c,Sales_Root_Formula__c,HPSignUpDate__c from eSignForm__c where id = :parentId '; List eSignFormData = Database.query(soql); eSignForm = eSignFormData[0]; System.debug('eSignForm==='+eSignForm); } public void getAccessory(){ //zzm 20231026 start // parentId = 'a2K0l000000wyICEAY'; //lwc改造 List cdlList = [SELECT ContentDocumentId FROM ContentDocumentLink WHERE LinkedEntityId = :parentId]; List fileIDs = new List(); for (ContentDocumentLink docLink : cdlList) { fileIDs.add(docLink.ContentDocumentId); } List acc = [SELECT Id,Title,VersionData, ContentDocumentId,FileType FROM ContentVersion WHERE ContentDocumentId IN : fileIDs]; // String soql = 'SELECT Name,id,parentId,ContentType from Attachment where parentId = :parentId order by createddate desc'; // List acc = Database.query(soql); Map identifierMap = new Map(); if(acc != null && acc.size() > 0){ for(Integer i = 0;i