//public ScheduleCtrl(IJobEnvManager jobEnvManager)
        //{
        //    __JobEnvManager = jobEnvManager;
        //}

        /// <summary>
        ///     查询job信息
        /// </summary>
        /// <param name="search"></param>
        /// <returns></returns>
        public JobInfoOutput GetJobInfo(JobSearchInput search)
        {
            var allJobInfo = GetAllJobInfo();

            if (search.JobName != null)
            {
                allJobInfo = allJobInfo.Where(x => x.JobName.Equals(search.JobName)).ToList();
            }
            if (search.State != null)
            {
                allJobInfo = allJobInfo.Where(x => x.State == (search.State ?? JobStateEnum.Open)).ToList();
            }
            if (search.SupportOnceJob != null)
            {
                allJobInfo = allJobInfo.Where(x => x.SupportOnceJob == (search.SupportOnceJob ?? true)).ToList();
            }
            if (search.ShowOnceJob != null)
            {
                allJobInfo = allJobInfo.Where(x => !string.IsNullOrEmpty(x.JobId) == search.ShowOnceJob.Value).ToList();
            }

            var totalJobsCount = allJobInfo.Count;

            allJobInfo = allJobInfo.Skip((search.PageCurrent - 1) * search.PageSize).Take(search.PageSize).ToList();

            return(new JobInfoOutput
            {
                DataList = allJobInfo,
                PageCurrent = search.PageCurrent,
                Total = totalJobsCount
            });
        }
        /// <summary>
        ///     获取job详情
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public JobMeta GetDetail(string name)
        {
            var jSInput = new JobSearchInput();

            jSInput.JobName     = name;
            jSInput.PageCurrent = 1;
            jSInput.PageSize    = 1;
            return(GetJobInfo(jSInput).DataList.FirstOrDefault());
        }