This commit is contained in:
高飞 2025-06-26 11:17:04 +08:00
parent 96d3f45076
commit 3a4d247d3d
2 changed files with 4 additions and 4 deletions

View File

@ -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);
}

View File

@ -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;