1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- using Microsoft.EntityFrameworkCore;
- using Quartz;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Threading.Tasks;
- using wispro.sp.api.Job;
- using wispro.sp.share;
- namespace wispro.sp.api.AppealHandler
- {
- public class MissingCaseAppealHandler : IDoAppealObject
- {
-
- public void DoAppeal(AppealObject appeal, int appealRecordid, DbContext spContext)
- {
- var trigger = TriggerBuilder.Create()
- .WithDescription("获取案件信息")
- .WithSimpleSchedule(x => x.WithIntervalInSeconds(5).WithRepeatCount(0))
- .Build();
- var job = JobBuilder.Create(typeof(GetPerformanceItemJob))
- .WithIdentity("获取案件任务")
- .Build();
- foreach (var iv in appeal.inputFieldValues)
- {
- if(iv.InputField == null)
- {
- iv.InputField = ((spDbContext)spContext).InputFields.FirstOrDefault(s=>s.Id == iv.InputFieldId);
- }
- if(iv.InputField.FieldName == "我方文号")
- {
- job.JobDataMap.Put("CaseNo", iv.Value);
- continue;
- }
- if(iv.InputField.FieldName =="处理事项")
- {
- job.JobDataMap.Put("DoItem", iv.Value);
- continue;
- }
- if (iv.InputField.FieldName == "案件阶段")
- {
- job.JobDataMap.Put("CaseStage", iv.Value);
-
- continue;
- }
- }
- _ = QuartzUtil.Add(job, trigger);
- }
- }
- }
|