估值接收邮件发送处理
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user