| | |
| | | public String Id {get; set;} |
| | | |
| | | public List<EmailInfo> mailList {get; set;} |
| | | public List<String> awsDataIdList{get; set;}// 20220512 PI改造 by zhj |
| | | public String awsDataIdStr{get{return JSON.serialize(awsDataIdList);} set;}// 20220512 PI改造 by zhj |
| | | |
| | | public String baseUrl { get; set; } |
| | | public String rtUrl { get; set; } |
| | |
| | | |
| | | public String staticResource { get; private set; }// 20220311 PI改造 by Bright |
| | | public String contactstaticResource { get; private set; }// 20220311 PI改造 by Bright |
| | | public String staticResourceMailMerge { get; private set; }// 20220512 PI改造 by zhj |
| | | |
| | | public NEWCreateSWOQuoteController() { |
| | | swoId = System.currentPageReference().getParameters().get('swoId'); |
| | |
| | | |
| | | staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Quotes__c'));// 20220221 PI改造 by Bright |
| | | contactstaticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact'));// 20220221 PI改造 by Bright |
| | | staticResourceMailMerge = JSON.serialize(PIHelper.getPIIntegrationInfo('Mail_Merge__c'));// 20220512 PI改造 by zhj |
| | | } |
| | | |
| | | public NEWCreateSWOQuoteController(ApexPages.StandardController controller) { |
| | |
| | | // Mail 页面初始化 Start |
| | | List<String> mailIdList = new List<String>(); |
| | | |
| | | List<Attachment> attList = new List<Attachment>(); |
| | | Map<String, List<Attachment>> attMap = new Map<String, List<Attachment>>(); |
| | | List<FileAddress__c> attList = new List<FileAddress__c>(); |
| | | Map<String, List<FileAddress__c>> attMap = new Map<String, List<FileAddress__c>>(); |
| | | |
| | | Map<String, Mail_Merge__c> mailMap = new Map<String, Mail_Merge__c>([select id, FROM__c, ccName__c, SUBJECT__c, MESSAGE__c, DATE__c, toName__c, EMAIL_SENT__c from Mail_Merge__c where Quotes__c = :Id order by id]); |
| | | Map<String, Mail_Merge__c> mailMap = new Map<String, Mail_Merge__c>([select id, FROM__c, ccName__c, SUBJECT__c, MESSAGE__c, DATE__c, toName__c, EMAIL_SENT__c,AWS_Data_Id__c from Mail_Merge__c where Quotes__c = :Id order by id]); |
| | | |
| | | |
| | | if (mailMap != null) { |
| | | mailIdList.addAll(mailMap.keySet()); |
| | | |
| | | attList = [select id, Name, ParentId from Attachment where ParentId in :mailIdList order by ParentId, id]; |
| | | attList = [select id, Name, FileName__c,ParentRecordId__c from FileAddress__c where ParentRecordId__c in :mailIdList order by ParentRecordId__c, id]; |
| | | if (attList.size() > 0) { |
| | | for (Attachment att : attList) { |
| | | if (attMap.containsKey(att.ParentId)) { |
| | | attMap.get(att.ParentId).add(att); |
| | | for (FileAddress__c att : attList) { |
| | | if (attMap.containsKey(att.ParentRecordId__c)) { |
| | | attMap.get(att.ParentRecordId__c).add(att); |
| | | } else { |
| | | List<Attachment> a = new List<Attachment>(); |
| | | List<FileAddress__c> a = new List<FileAddress__c>(); |
| | | a.add(att); |
| | | attMap.put(att.ParentId, a); |
| | | attMap.put(att.ParentRecordId__c, a); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | // Mail 页面初始化 End |
| | | |
| | | //zhj 20220514 start PIPL start |
| | | //awsDataIdList |
| | | awsDataIdList = new List<String>(); |
| | | for (Integer i = 0; i < mailList.size(); i++) { |
| | | awsDataIdList.add(mailList[i].mm.AWS_Data_Id__c); |
| | | } |
| | | //zhj 20220514 start PIPL end |
| | | } |
| | | //首先是从swo创建quotes,有了swoid,就是用新的静态资源显示的免责申明。 |
| | | //之后,编辑已经创建完了的quotes,15号之前创建的,显示的是旧的。旧的就是aftORbef==false。 |
| | |
| | | public class EmailInfo { |
| | | |
| | | public Mail_Merge__c mm {get; set; } |
| | | public List<Attachment> attList {get; set; } |
| | | public List<FileAddress__c> attList {get; set; } |
| | | public String haveAtt {get; set;} |
| | | public EmailInfo() { |
| | | |
| | | } |
| | | public EmailInfo(Mail_Merge__c mm_in, List<Attachment> attList_in) { |
| | | public EmailInfo(Mail_Merge__c mm_in, List<FileAddress__c> attList_in) { |
| | | mm = mm_in; |
| | | if (attList_in == null || attList_in.size() == 0) { |
| | | haveAtt = 'No'; |
| | | attList = new List<Attachment>(); |
| | | attList = new List<FileAddress__c>(); |
| | | } else { |
| | | attList = attList_in; |
| | | haveAtt = 'Yes'; |