20250911 修改质量事件报告
This commit is contained in:
parent
75f7ca6c21
commit
34ad981215
|
@ -17,7 +17,7 @@ namespace BLL
|
||||||
|
|
||||||
public static List<Model.EMC_ViolationClause> GetSupViolationClause()
|
public static List<Model.EMC_ViolationClause> GetSupViolationClause()
|
||||||
{
|
{
|
||||||
return Funs.DB.EMC_ViolationClause.Where(e => e.SupViolationClause == null).ToList();
|
return Funs.DB.EMC_ViolationClause.Where(e => e.SupViolationClause == null).OrderBy(e => e.SortIndex).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -1143,7 +1143,42 @@ namespace FineUIPro.Web.ContractorQuality
|
||||||
{
|
{
|
||||||
if (this.CurrUser.UserId == fc.Main_CoordinatorId && type == BLL.Const.BtnSubmit)
|
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.UserDepStartDate = DateTime.Now;//用户部门审批到达时间
|
||||||
pun.Pause = false;//如果审核通过,取消暂停
|
pun.Pause = false;//如果审核通过,取消暂停
|
||||||
|
@ -1197,40 +1232,6 @@ namespace FineUIPro.Web.ContractorQuality
|
||||||
}
|
}
|
||||||
#endregion
|
#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
|
#endregion
|
||||||
|
@ -1994,6 +1995,7 @@ namespace FineUIPro.Web.ContractorQuality
|
||||||
pun.PauseDate = DateTime.Now;
|
pun.PauseDate = DateTime.Now;
|
||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
ShowNotify("已暂停,请联合发起人及承包商调查审核!", MessageBoxIcon.Information);
|
ShowNotify("已暂停,请联合发起人及承包商调查审核!", MessageBoxIcon.Information);
|
||||||
|
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -834,6 +834,7 @@ namespace FineUIPro.Web.Evaluation
|
||||||
if (punish != null)
|
if (punish != null)
|
||||||
{
|
{
|
||||||
punish.IsUserEvaluated = true;
|
punish.IsUserEvaluated = true;
|
||||||
|
punish.IsUserEvaluatedTime = DateTime.Now;
|
||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -965,6 +966,7 @@ namespace FineUIPro.Web.Evaluation
|
||||||
if (punish != null)
|
if (punish != null)
|
||||||
{
|
{
|
||||||
punish.IsDepEvaluated = true;
|
punish.IsDepEvaluated = true;
|
||||||
|
punish.IsDepEvaluatedTime = DateTime.Now;
|
||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -835,6 +835,7 @@ namespace FineUIPro.Web.Evaluation
|
||||||
if (punish != null)
|
if (punish != null)
|
||||||
{
|
{
|
||||||
punish.IsUserEvaluated = true;
|
punish.IsUserEvaluated = true;
|
||||||
|
punish.IsUserEvaluatedTime = DateTime.Now;
|
||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -964,6 +965,7 @@ namespace FineUIPro.Web.Evaluation
|
||||||
if (punish != null)
|
if (punish != null)
|
||||||
{
|
{
|
||||||
punish.IsDepEvaluated = true;
|
punish.IsDepEvaluated = true;
|
||||||
|
punish.IsDepEvaluatedTime = DateTime.Now;
|
||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1611,7 +1611,7 @@
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void queTimer_ViolationHandling(object sender, System.Timers.ElapsedEventArgs e)
|
private void queTimer_ViolationHandling(object sender, System.Timers.ElapsedEventArgs e)
|
||||||
{
|
{
|
||||||
var foData = (from x in Funs.DB.FC_SESRelatedData where x.FC_Status != "Closed" select x).ToList();
|
var foData = (from x in Funs.DB.FC_SESRelatedData where x.FO_NO== "4988606499" && x.FC_Status != "Closed" select x).ToList();
|
||||||
if (foData.Count() > 0)
|
if (foData.Count() > 0)
|
||||||
{
|
{
|
||||||
foreach (var fo in foData)
|
foreach (var fo in foData)
|
||||||
|
|
|
@ -9940,6 +9940,10 @@ namespace Model
|
||||||
|
|
||||||
private System.Nullable<System.DateTime> _ModifyDate;
|
private System.Nullable<System.DateTime> _ModifyDate;
|
||||||
|
|
||||||
|
private System.Nullable<System.DateTime> _IsUserEvaluatedTime;
|
||||||
|
|
||||||
|
private System.Nullable<System.DateTime> _IsDepEvaluatedTime;
|
||||||
|
|
||||||
private EntityRef<Base_Depart> _Base_Depart;
|
private EntityRef<Base_Depart> _Base_Depart;
|
||||||
|
|
||||||
private EntityRef<Sys_User> _Sys_User;
|
private EntityRef<Sys_User> _Sys_User;
|
||||||
|
@ -10076,6 +10080,10 @@ namespace Model
|
||||||
partial void OnModifyerChanged();
|
partial void OnModifyerChanged();
|
||||||
partial void OnModifyDateChanging(System.Nullable<System.DateTime> value);
|
partial void OnModifyDateChanging(System.Nullable<System.DateTime> value);
|
||||||
partial void OnModifyDateChanged();
|
partial void OnModifyDateChanged();
|
||||||
|
partial void OnIsUserEvaluatedTimeChanging(System.Nullable<System.DateTime> value);
|
||||||
|
partial void OnIsUserEvaluatedTimeChanged();
|
||||||
|
partial void OnIsDepEvaluatedTimeChanging(System.Nullable<System.DateTime> value);
|
||||||
|
partial void OnIsDepEvaluatedTimeChanged();
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public EMC_Punishment()
|
public EMC_Punishment()
|
||||||
|
@ -11354,6 +11362,46 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsUserEvaluatedTime", DbType="DateTime")]
|
||||||
|
public System.Nullable<System.DateTime> IsUserEvaluatedTime
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._IsUserEvaluatedTime;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._IsUserEvaluatedTime != value))
|
||||||
|
{
|
||||||
|
this.OnIsUserEvaluatedTimeChanging(value);
|
||||||
|
this.SendPropertyChanging();
|
||||||
|
this._IsUserEvaluatedTime = value;
|
||||||
|
this.SendPropertyChanged("IsUserEvaluatedTime");
|
||||||
|
this.OnIsUserEvaluatedTimeChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsDepEvaluatedTime", DbType="DateTime")]
|
||||||
|
public System.Nullable<System.DateTime> IsDepEvaluatedTime
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._IsDepEvaluatedTime;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._IsDepEvaluatedTime != value))
|
||||||
|
{
|
||||||
|
this.OnIsDepEvaluatedTimeChanging(value);
|
||||||
|
this.SendPropertyChanging();
|
||||||
|
this._IsDepEvaluatedTime = value;
|
||||||
|
this.SendPropertyChanged("IsDepEvaluatedTime");
|
||||||
|
this.OnIsDepEvaluatedTimeChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_EMC_Punishment_Base_Depart", Storage="_Base_Depart", ThisKey="BYC_RU", OtherKey="DepartId", IsForeignKey=true)]
|
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_EMC_Punishment_Base_Depart", Storage="_Base_Depart", ThisKey="BYC_RU", OtherKey="DepartId", IsForeignKey=true)]
|
||||||
public Base_Depart Base_Depart
|
public Base_Depart Base_Depart
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue