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 eSignFormAttachmentController() { parentId = System.currentPageReference().getParameters().get('parentId'); //parentId = 'a421000000367mz'; acccData = new List(); System.debug('tiaoshiListjiheparentId==='+parentId); } public void init() { 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); if(eSignFormData!=null){ eSignForm = eSignFormData[0]; } System.debug('eSignForm==='+eSignForm); } public void getAccessory(){ 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