20250911 修改质量事件报告
This commit is contained in:
@@ -1143,7 +1143,42 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
{
|
||||
if (this.CurrUser.UserId == fc.Main_CoordinatorId && type == BLL.Const.BtnSubmit)
|
||||
{
|
||||
if (rblPass.SelectedValue == "True")
|
||||
if (rblPass.SelectedValue == "False")
|
||||
{
|
||||
//最终审核未通过通知
|
||||
pun.States = "7";//已拒绝
|
||||
|
||||
Model.EmailPop pops = Funs.DB.EmailPop.FirstOrDefault(x => x.EmailID == BLL.Const.EmailPopId);
|
||||
if (pops == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
string[] mailTo = null;
|
||||
//string[] mailCC = null;
|
||||
string resultMessage = "";
|
||||
|
||||
var emailTemplate = Funs.DB.SendEmailTemplate.Where(x => x.EmailName.Contains("主协调员填写完成后审批未通过通知"));
|
||||
if (emailTemplate.Count() > 0)
|
||||
{
|
||||
var userTo = from x in Funs.DB.View_EMail_UserTo
|
||||
where ((x.PunishmentId == this.PunishmentId && x.AuditDate != null) || x.UserId.Contains(pun.Violation_Inspector))
|
||||
&& x.Email != null && x.Email != ""
|
||||
select x;
|
||||
if (userTo != null)
|
||||
{
|
||||
mailTo = userTo.Select(x => x.Email).Distinct().ToArray();
|
||||
}
|
||||
if (mailTo.Length > 0)
|
||||
{
|
||||
NameValueCollection myPram = new NameValueCollection();
|
||||
myPram.Add("发现日期", pun.PunishDate != null ? pun.PunishDate.Value.ToString("yyyy-MM-dd") : "");
|
||||
myPram.Add("位置", pun.Location);
|
||||
myPram.Add("质量事件描述", pun.Description);
|
||||
MailHelper.SendPunishSesMail(pops, myPram, "主协调员填写完成后审批未通过通知", mailTo, null, out resultMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pun.UserDepStartDate = DateTime.Now;//用户部门审批到达时间
|
||||
pun.Pause = false;//如果审核通过,取消暂停
|
||||
@@ -1197,40 +1232,6 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
else//最终审核未通过通知
|
||||
{
|
||||
pun.States = "7";//已拒绝
|
||||
|
||||
Model.EmailPop pops = Funs.DB.EmailPop.FirstOrDefault(x => x.EmailID == BLL.Const.EmailPopId);
|
||||
if (pops == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
string[] mailTo = null;
|
||||
//string[] mailCC = null;
|
||||
string resultMessage = "";
|
||||
|
||||
var emailTemplate = Funs.DB.SendEmailTemplate.Where(x => x.EmailName.Contains("主协调员填写完成后审批未通过通知"));
|
||||
if (emailTemplate.Count() > 0)
|
||||
{
|
||||
var userTo = from x in Funs.DB.View_EMail_UserTo
|
||||
where ((x.PunishmentId == this.PunishmentId && x.AuditDate != null) || x.UserId.Contains(pun.Violation_Inspector))
|
||||
&& x.Email != null && x.Email != ""
|
||||
select x;
|
||||
if (userTo != null)
|
||||
{
|
||||
mailTo = userTo.Select(x => x.Email).Distinct().ToArray();
|
||||
}
|
||||
if (mailTo.Length > 0)
|
||||
{
|
||||
NameValueCollection myPram = new NameValueCollection();
|
||||
myPram.Add("发现日期", pun.PunishDate != null ? pun.PunishDate.Value.ToString("yyyy-MM-dd") : "");
|
||||
myPram.Add("位置", pun.Location);
|
||||
myPram.Add("质量事件描述", pun.Description);
|
||||
MailHelper.SendPunishSesMail(pops, myPram, "主协调员填写完成后审批未通过通知", mailTo, null, out resultMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -1994,6 +1995,7 @@ namespace FineUIPro.Web.ContractorQuality
|
||||
pun.PauseDate = DateTime.Now;
|
||||
Funs.DB.SubmitChanges();
|
||||
ShowNotify("已暂停,请联合发起人及承包商调查审核!", MessageBoxIcon.Information);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user