DFCJob.cs 966 B

123456789101112131415161718192021222324252627282930313233343536
  1. using Business.KJH;
  2. using Business.Util;
  3. using Cache;
  4. using Common;
  5. using Quartz;
  6. using System;
  7. using System.Collections.Generic;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Threading.Tasks;
  11. namespace JobService.Job
  12. {
  13. [DisallowConcurrentExecution]
  14. [PersistJobDataAfterExecution]
  15. public class DFCJob : IJob
  16. {
  17. public void Execute(IJobExecutionContext context)
  18. {
  19. try
  20. {
  21. var typelist = LottryDataHandle.GetLotteryCode();
  22. var Runlist = typelist.Where(w => w.lotteryCode.Contains("DF")).ToList();
  23. jobServiceBLL bll = new Business.KJH.jobServiceBLL();
  24. var list = bll.GetLotteryListAsync(Runlist);
  25. AppCtrl.GetObj().GetLotteryCache().SetLotteryCache(list);
  26. }
  27. catch (Exception ee)
  28. {
  29. LogHelper.Error(typeof(QGCJob), ee.Message + ":QTJob"); throw;
  30. }
  31. }
  32. }
  33. }