using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using wispro.sp.api.Controllers;

namespace wispro.sp.api.Job
{
    public class GetPerformanceItemJob : IJob
    {
        public Task Execute(IJobExecutionContext context)
        {

            string CaseNo = context.JobDetail.JobDataMap.Get("CaseNo").ToString();
            string DoItem = context.JobDetail.JobDataMap.Get("DoItem").ToString();
            string caseStage = null;
            var temCaseStage = context.JobDetail.JobDataMap.Get("CaseStage");
            if (temCaseStage != null)
            {
                caseStage = temCaseStage.ToString();
            }

            _ = new PerformanceItemController(new spDbContext(),new Services.FileTaskCacheService()).GetItemInfoByCaseStage(CaseNo, DoItem, caseStage);
            return Task.CompletedTask;
        }
    }
}
