Files
YunTongJackYunTask/Reportapi/MyCode.Project.Services/IServices/IWorkProcessService.cs
2025-07-04 09:50:02 +08:00

71 lines
2.2 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using MyCode.Project.Domain.Model;
using MyCode.Project.Infrastructure.Enumeration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MyCode.Project.Services
{
public interface IWorkProcessService
{
/// <summary>
/// 批量添加
/// </summary>
/// <param name="workProcess"></param>
void Add(List<SysWorkprocess> workProcess);
/// <summary>
/// 清空历史数据
/// </summary>
/// <param name="process"></param>
//void ExecuteSingle(Guid processId);
void ClearHistoryTask();
List<SysWorkprocess> SelectInitWorkProcess(int top);
/// <summary>
/// 执行每次执行10条数据
/// </summary>
void Execute();
/// <summary>
/// 重启失败调度
/// </summary>
void RestratStopProcess();
/// <summary>
/// 重新启用某个暂停了的调度
/// </summary>
/// <param name="workprocessId"></param>
void RestartStopProcess(long workprocessId);
/// <summary>
/// 添加调度
/// </summary>
/// <typeparam name="T">命名空间类</typeparam>
/// <param name="methodName">执行方法</param>
/// <param name="remark">备注</param>
/// <param name="entity">传参</param>
/// <param name="funcType">默认为函数</param>
void Add<T>(string methodName,long companyId,object entity = null, string remark = "", FuncType funcType = FuncType.Function, Priority priority = Priority.Low);
/// <summary>
/// 取得进程
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="methodName"></param>
/// <param name="entity"></param>
/// <param name="funcType"></param>
/// <param name="priority"></param>
/// <returns></returns>
void AddQueue<T>(string methodName, long companyId, object entity = null, FuncType funcType = FuncType.Function, Priority priority = Priority.Low);
/// <summary>
/// 进程执行超时
/// </summary>
void ProcessHandleExpire();
}
}