ComplianceServer/oldcode/CRMServices/SSO/SSO_Organization_Download.cs

47 lines
983 B
C#

using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WX.CRM.BLL.Base;
using WX.CRM.BLL.SSO;
using WX.CRM.Common;
using WX.CRM.Common.Employee;
using WX.CRM.Model.SSO;
namespace WX.CRM.CRMServices.SSO
{
/// <summary>
/// 下载员工组织结构数据
/// </summary>
public class SSO_Organization_Download_Job : IJob
{
static bool isRuning = false;
public void Execute(JobExecutionContext context)
{
if (isRuning)
return;
isRuning = true;
try
{
new SSO_Organization_BL().StartDownLoad();
}
catch (Exception e)
{
WX.CRM.Common.LogHelper.Error("SSO下载组织结构出现错误: " + e.ToString());
}
finally
{
isRuning = false;
}
}
}
}