12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using Autofac;
- using Bowin.Common.Log;
- using EMIS.CommonLogic.UniversityManage.AdministrativeOrgan;
- using EMIS.CommonLogic.SystemServices;
- namespace EMIS.Services.ScheduleJob
- {
- public class SysHROrgUserJob : EAPServiceJob
- {
-
- /// <summary>
- /// 重写 MyJob 方法
- /// </summary>
- /// <returns></returns>
- protected override bool MyJob()
- {
- var result = true;
- try
- {
- LogHelper.WriteLog(LogType.ServiceLog, "----开始同步工作流人员及组织架构-----");
- using (var scop = Program.AutofacContainer.BeginLifetimeScope())
- {
- IDepartmentServices DepartmentServices = scop.Resolve<IDepartmentServices>();
- IUserServices UserServices = scop.Resolve<IUserServices>();
- DepartmentServices.SynHRServices();
- UserServices.SynHRServices();
- }
- LogHelper.WriteLog(LogType.ServiceLog, "----结束同步工作流人员及组织架构-----");
- }
- catch (System.Exception err)
- {
- LogHelper.WriteLog(LogType.ServiceLog, "----同步工作流人员及组织架构处理异常-----");
- LogHelper.WriteLog(LogType.ServiceLog, err.Message);
- result = false;
- }
- return result;
- }
- }
- }
|