估值接收邮件发送处理

This commit is contained in:
汤旺
2024-06-06 13:53:55 +08:00
parent 712563a455
commit 08eb622ca1
4 changed files with 25 additions and 10 deletions
@@ -234,7 +234,7 @@ namespace YLErp.Modules.ClientModule
/// </summary>
/// <param name="clientId"></param>
/// <returns>多个邮件地址,用分号隔开</returns>
public static IEnumerable<string> GetClientEmails(int clientId, bool includeClientMail = false, List<string> receiver = null)
public static IEnumerable<string> GetClientEmails(int clientId, bool includeClientMail = false, List<string> receiver = null,bool isEodValue = false)
{
if (clientId < 1)
{
@@ -248,7 +248,7 @@ namespace YLErp.Modules.ClientModule
&& (x.DeadLine == null || x.DeadLine > DateTime.Now)
&& x.IsReceiveEmail == 1 && x.Email != null)
.ToList();
if (receiver != null && receiver.Count > 0)
{
foreach (var item in clientContacts)
@@ -262,7 +262,22 @@ namespace YLErp.Modules.ClientModule
}
else
{
clientContactMails = clientContacts.Select(o => o.Email).ToList();
if (isEodValue)
{
foreach (var item in clientContacts)
{
var ids = item.ContactTypeId.Split(',');
//1 是估值接收人
if (ids.Contains("1"))
{
clientContactMails.Add(item.Email);
}
}
}
else
{
clientContactMails = clientContacts.Select(o => o.Email).ToList();
}
}
if (includeClientMail)