From 2bb4a2bc34048f49815846db354b5c8994669a3c Mon Sep 17 00:00:00 2001 From: buli <137736985@qq.com> Date: 星期一, 09 五月 2022 17:48:43 +0800 Subject: [PATCH] SF PIPL Page Backup --- force-app/main/default/classes/NEWCreateSWOQuoteController.cls | 22 +++++++++++----------- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/force-app/main/default/classes/NEWCreateSWOQuoteController.cls b/force-app/main/default/classes/NEWCreateSWOQuoteController.cls index d547fe6..8762845 100644 --- a/force-app/main/default/classes/NEWCreateSWOQuoteController.cls +++ b/force-app/main/default/classes/NEWCreateSWOQuoteController.cls @@ -298,8 +298,8 @@ // 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]); @@ -307,15 +307,15 @@ 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); } } } @@ -730,16 +730,16 @@ 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'; -- Gitblit v1.9.1