diff --git a/HJGL_DS/FineUIPro.Web/Global.asax.cs b/HJGL_DS/FineUIPro.Web/Global.asax.cs index da9ad4f..15cc3d3 100644 --- a/HJGL_DS/FineUIPro.Web/Global.asax.cs +++ b/HJGL_DS/FineUIPro.Web/Global.asax.cs @@ -54,7 +54,7 @@ //定义一个定时器,并开启和配置相关属性 System.Timers.Timer Wtimer = new System.Timers.Timer(); //执行任务的周期 ,20分钟 - Wtimer.Interval = 1000 * 60 * 60; + Wtimer.Interval = 1000 * 60 * 40; Wtimer.Enabled = true; Wtimer.Start(); Wtimer.Elapsed += new System.Timers.ElapsedEventHandler(Wtimer_Elapsed); @@ -67,7 +67,7 @@ int intMinute = e.SignalTime.Minute; // 要执行的代码 var welders = from x in Funs.DB.OAM_User where (x.IsSync == null || x.IsSync == false) && x.MID_Code != null && x.MID_Code != string.Empty select x; - var quas = from x in Funs.DB.OAM_UesrQualified where x.IsSync == null || x.IsSync == false select x; + var quas = from x in Funs.DB.OAM_UesrQualified where (x.IsSync == null || x.IsSync == false) && (x.IsDelete == false || x.IsDelete == null) select x; foreach (var q in welders) { @@ -195,7 +195,7 @@ foreach (string c in codes) { var oldCode = (from x in Funs.DB.HJGL_BS_WelderQualifiedProject where x.WED_ID == s.WED_ID && x.QualifiedProjectCode == c && x.LimitDate.Value.Date == q.MIDWelder_LimitDate.Value.Date select x).FirstOrDefault(); - if (oldCode!=null) + if (oldCode != null) { BLL.HJGL_WelderQualifiedProjectService.DeleteWelderQualifiedProjectByWelderQualifiedProjectId(oldCode.WelderQualifiedProjectId); } diff --git a/HJGL_DS/FineUIPro.Web/Welder/WelderManage.aspx.cs b/HJGL_DS/FineUIPro.Web/Welder/WelderManage.aspx.cs index 09a28e7..45b02b2 100644 --- a/HJGL_DS/FineUIPro.Web/Welder/WelderManage.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/Welder/WelderManage.aspx.cs @@ -163,7 +163,7 @@ namespace FineUIPro.Web.Welder if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.Welder_WelderMenuId, Const.BtnSync)) { var welders = from x in Funs.DB.OAM_User where (x.IsSync == null || x.IsSync == false) && x.MID_Code != null && x.MID_Code != string.Empty select x; - var quas = from x in Funs.DB.OAM_UesrQualified where x.IsSync == null || x.IsSync == false select x; + var quas = from x in Funs.DB.OAM_UesrQualified where (x.IsSync == null || x.IsSync == false) && (x.IsDelete == false || x.IsDelete == null) select x; int a = 0; int b = 0; int m = 0;