This commit is contained in:
毕文静 2025-06-26 17:15:40 +08:00
commit 3fa01b6206
2 changed files with 4 additions and 4 deletions

View File

@ -54,7 +54,7 @@
//定义一个定时器,并开启和配置相关属性 //定义一个定时器,并开启和配置相关属性
System.Timers.Timer Wtimer = new System.Timers.Timer(); System.Timers.Timer Wtimer = new System.Timers.Timer();
//执行任务的周期 ,20分钟 //执行任务的周期 ,20分钟
Wtimer.Interval = 1000 * 60 * 60; Wtimer.Interval = 1000 * 60 * 40;
Wtimer.Enabled = true; Wtimer.Enabled = true;
Wtimer.Start(); Wtimer.Start();
Wtimer.Elapsed += new System.Timers.ElapsedEventHandler(Wtimer_Elapsed); Wtimer.Elapsed += new System.Timers.ElapsedEventHandler(Wtimer_Elapsed);
@ -67,7 +67,7 @@
int intMinute = e.SignalTime.Minute; 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 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) foreach (var q in welders)
{ {
@ -195,7 +195,7 @@
foreach (string c in codes) 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(); 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); BLL.HJGL_WelderQualifiedProjectService.DeleteWelderQualifiedProjectByWelderQualifiedProjectId(oldCode.WelderQualifiedProjectId);
} }

View File

@ -163,7 +163,7 @@ namespace FineUIPro.Web.Welder
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.Welder_WelderMenuId, Const.BtnSync)) 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 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 a = 0;
int b = 0; int b = 0;
int m = 0; int m = 0;