Browse Source

冲压件接口优化 主表作废不发邮件

SCP_CYJ
qian 5 months ago
parent
commit
68825d4a2e
  1. 50
      UniApiGroup/Controller/OdbcApiQadController.cs

50
UniApiGroup/Controller/OdbcApiQadController.cs

@ -1697,7 +1697,7 @@ namespace CK.SCP.GrupUniApi.Controller
{ {
if (p.PURDOCITEMNO == Ditem.PURDOCITEMNO) if (p.PURDOCITEMNO == Ditem.PURDOCITEMNO)
{ {
p.Ctype = Ditem.CTYPE; p.Ctype = Ditem.DI_OPERTYPE;
p.AcceptStatus = (int)GeneralMaterialOrderState.Cancel; p.AcceptStatus = (int)GeneralMaterialOrderState.Cancel;
PoDetailList.Add(p); PoDetailList.Add(p);
@ -1741,31 +1741,31 @@ namespace CK.SCP.GrupUniApi.Controller
p.Ctype = "D"; p.Ctype = "D";
PoList.Add(p); PoList.Add(p);
}); });
// 主表变状态 现改成不发邮件
#region #region
// 添加发邮件数据 //// 添加发邮件数据
TS_Email email = new TS_Email(); //TS_Email email = new TS_Email();
email.EmailToUser = Ditem.VENDORDESC; //email.EmailToUser = Ditem.VENDORDESC;
string mailbody = ""; //string mailbody = "";
mailbody += "尊敬的 供应商<br>"; //mailbody += "尊敬的 供应商<br>";
mailbody += "你好!<br><br>"; //mailbody += "你好!<br><br>";
mailbody += "一般材料订单 <b>" + Ditem.PURDOCNO + "</b> 进行了物料行作废的操作,请登录供应商协同网站进行订单查看。<br>"; //mailbody += "一般材料订单 <b>" + Ditem.PURDOCNO + "</b> 进行了物料行作废的操作,请登录供应商协同网站进行订单查看。<br>";
mailbody += "登录账号:<b>" + Ditem.VENDORNO + "@W21" + "</b><br>"; //mailbody += "登录账号:<b>" + Ditem.VENDORNO + "@W21" + "</b><br>";
mailbody += "登录地址:" + wwadres + "<br><br>"; //mailbody += "登录地址:" + wwadres + "<br><br>";
mailbody += "<br><br><br><br>日期:" + DateTime.Now; //mailbody += "<br><br><br><br>日期:" + DateTime.Now;
email.EmailString = mailbody; //email.EmailString = mailbody;
var user = authdb.Users.FirstOrDefault(q => q.Name.Contains(Ditem.VENDORNO)); //var user = authdb.Users.FirstOrDefault(q => q.Name.Contains(Ditem.VENDORNO));
if (user == null) //if (user == null)
{ //{
email.EmailSendState = 2; // email.EmailSendState = 2;
email.EmailSendFailReason = "该供应商邮箱未维护"; // email.EmailSendFailReason = "该供应商邮箱未维护";
} //}
else //else
{ //{
email.EmailAddress = user.Email; // email.EmailAddress = user.Email;
email.EmailSendState = 0; // email.EmailSendState = 0;
} //}
emails.Add(email); //emails.Add(email);
#endregion #endregion
} }
else //否则将主表变成新建状态 else //否则将主表变成新建状态

Loading…
Cancel
Save