修改定时任务

This commit is contained in:
李超 2025-04-12 11:52:50 +08:00
parent ec680493c9
commit 3838a87918
3 changed files with 18 additions and 16 deletions

View File

@ -18,7 +18,7 @@ namespace BLL
/// </summary>
public static void StartMonitor()
{
int adTimeJ = Funs.GetNewInt(ConfigurationManager.AppSettings["Intervaltime"]) ?? 30;
int adTimeJ = Funs.GetNewInt(ConfigurationManager.AppSettings["Intervaltime"]) ?? 60;
//var getSynchroSet = Funs.DB.RealName_SynchroSet.FirstOrDefault();
//if (getSynchroSet != null && getSynchroSet.Intervaltime.HasValue)
//{
@ -86,6 +86,8 @@ namespace BLL
SynchroSetService.InsertRealNamePushLog(null, item.ProCode, "实名制定时器", "sucess", "200", item.ProName, "成功", null);
SynchroSetService.PushProCollCompany(item.ProCode);
SynchroSetService.PushAttendance(item.ProCode);
UpdateSitePerson(null, null);
//SynchroSetService.updatePersonsExitTime(item.ProCode);
}
}

View File

@ -1533,9 +1533,9 @@ namespace BLL
{
getPerson.RealNameUpdateTime = DateTime.Now;
}
db.SubmitChanges();
db.SubmitChanges();
}
}
}
}
}
else
@ -1565,7 +1565,7 @@ namespace BLL
db.SubmitChanges();
}
}
}
}
}
}
}
@ -1768,7 +1768,7 @@ namespace BLL
// var getPersonS = getData.Select(x => x.idcardNumber).Distinct().ToList();
// foreach (var pitem in getPersonS)
// {
// PushPersonsByIdentityCard(Const.BtnAdd, proCode, pitem, false);
// PushPersonsByIdentityCard(Const.BtnAdd, proCode, pitem, false);
// PushPersonsByIdentityCard(Const.BtnModify, proCode, pitem, false);
// }
//}

View File

@ -69,17 +69,17 @@
{
ErrLogInfo.WriteLog("实名制同步定时器启动失败!", ex);
}
////根据考勤记录修改人员状态定时器
try
{
BLL.RealNameMonitorService.StartUpdateSitePerson();
// BLL.RealNameMonitorService.StartMonitorProject();
SynchroSetService.InsertRealNamePushLog(null, null, "根据考勤记录修改人员状态定时器开始启动", "sucess", "200", null, "成功", null);
}
catch (Exception ex)
{
ErrLogInfo.WriteLog("根据考勤记录修改人员状态定时器启动失败!", ex);
}
//////根据考勤记录修改人员状态定时器 此任务放入推送实名制定时任务中,同时操作人员表,导致死锁
//try
//{
// //BLL.RealNameMonitorService.StartUpdateSitePerson();
// // BLL.RealNameMonitorService.StartMonitorProject();
// //SynchroSetService.InsertRealNamePushLog(null, null, "根据考勤记录修改人员状态定时器开始启动", "sucess", "200", null, "成功", null);
//}
//catch (Exception ex)
//{
// ErrLogInfo.WriteLog("根据考勤记录修改人员状态定时器启动失败!", ex);
//}
///实名制出入记录去重
try
{