From 34ad9812153ce25d7a1a6dbffc4865f04d565b5e Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Thu, 11 Sep 2025 16:32:39 +0800 Subject: [PATCH] =?UTF-8?q?20250911=20=E4=BF=AE=E6=94=B9=E8=B4=A8=E9=87=8F?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E6=8A=A5=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FCL/BLL/BaseInfo/ViolationClauseService.cs | 2 +- .../IncidentInvestigationEdit.aspx.cs | 72 ++++++++++--------- .../Evaluation/EvaluationNew.aspx.cs | 2 + .../Evaluation/SafetyEvaluation.aspx.cs | 2 + FCL/FineUIPro.Web/Global.asax.cs | 2 +- FCL/Model/Model.cs | 48 +++++++++++++ 6 files changed, 91 insertions(+), 37 deletions(-) diff --git a/FCL/BLL/BaseInfo/ViolationClauseService.cs b/FCL/BLL/BaseInfo/ViolationClauseService.cs index e3e0349..149d023 100644 --- a/FCL/BLL/BaseInfo/ViolationClauseService.cs +++ b/FCL/BLL/BaseInfo/ViolationClauseService.cs @@ -17,7 +17,7 @@ namespace BLL public static List 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(); } /// diff --git a/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationEdit.aspx.cs b/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationEdit.aspx.cs index 4cb021c..a4a8488 100644 --- a/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationEdit.aspx.cs +++ b/FCL/FineUIPro.Web/ContractorQuality/IncidentInvestigationEdit.aspx.cs @@ -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 diff --git a/FCL/FineUIPro.Web/Evaluation/EvaluationNew.aspx.cs b/FCL/FineUIPro.Web/Evaluation/EvaluationNew.aspx.cs index c0ebab3..2c56a79 100644 --- a/FCL/FineUIPro.Web/Evaluation/EvaluationNew.aspx.cs +++ b/FCL/FineUIPro.Web/Evaluation/EvaluationNew.aspx.cs @@ -834,6 +834,7 @@ namespace FineUIPro.Web.Evaluation if (punish != null) { punish.IsUserEvaluated = true; + punish.IsUserEvaluatedTime = DateTime.Now; Funs.DB.SubmitChanges(); } @@ -965,6 +966,7 @@ namespace FineUIPro.Web.Evaluation if (punish != null) { punish.IsDepEvaluated = true; + punish.IsDepEvaluatedTime = DateTime.Now; Funs.DB.SubmitChanges(); } } diff --git a/FCL/FineUIPro.Web/Evaluation/SafetyEvaluation.aspx.cs b/FCL/FineUIPro.Web/Evaluation/SafetyEvaluation.aspx.cs index e1d6b19..9b39ae3 100644 --- a/FCL/FineUIPro.Web/Evaluation/SafetyEvaluation.aspx.cs +++ b/FCL/FineUIPro.Web/Evaluation/SafetyEvaluation.aspx.cs @@ -835,6 +835,7 @@ namespace FineUIPro.Web.Evaluation if (punish != null) { punish.IsUserEvaluated = true; + punish.IsUserEvaluatedTime = DateTime.Now; Funs.DB.SubmitChanges(); } } @@ -964,6 +965,7 @@ namespace FineUIPro.Web.Evaluation if (punish != null) { punish.IsDepEvaluated = true; + punish.IsDepEvaluatedTime = DateTime.Now; Funs.DB.SubmitChanges(); } } diff --git a/FCL/FineUIPro.Web/Global.asax.cs b/FCL/FineUIPro.Web/Global.asax.cs index 49f7c51..4f27433 100644 --- a/FCL/FineUIPro.Web/Global.asax.cs +++ b/FCL/FineUIPro.Web/Global.asax.cs @@ -1611,7 +1611,7 @@ /// 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) { foreach (var fo in foData) diff --git a/FCL/Model/Model.cs b/FCL/Model/Model.cs index 70eea38..236e49d 100644 --- a/FCL/Model/Model.cs +++ b/FCL/Model/Model.cs @@ -9940,6 +9940,10 @@ namespace Model private System.Nullable _ModifyDate; + private System.Nullable _IsUserEvaluatedTime; + + private System.Nullable _IsDepEvaluatedTime; + private EntityRef _Base_Depart; private EntityRef _Sys_User; @@ -10076,6 +10080,10 @@ namespace Model partial void OnModifyerChanged(); partial void OnModifyDateChanging(System.Nullable value); partial void OnModifyDateChanged(); + partial void OnIsUserEvaluatedTimeChanging(System.Nullable value); + partial void OnIsUserEvaluatedTimeChanged(); + partial void OnIsDepEvaluatedTimeChanging(System.Nullable value); + partial void OnIsDepEvaluatedTimeChanged(); #endregion public EMC_Punishment() @@ -11354,6 +11362,46 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsUserEvaluatedTime", DbType="DateTime")] + public System.Nullable 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 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)] public Base_Depart Base_Depart {