using MadRunFabric.Common;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;

namespace Api.SignToken
{
    public interface IHangfireService
    {

        /// <summary>
        /// 保养计划
        /// </summary>
        /// <param name="id">设备id</param>
        /// <param name="action"></param>
        /// <param name="day">周期天数</param>
        /// <param name="hour">周期小时</param>
        /// <returns></returns>
        Task<string> AddWoMaintainBase(string proname, string sysname, string equipname, string id, string expirytime, int advancelong, string content,string maintype, int plancycle, int plandate, int planhour);
        Task<string> AddWoMaintainBase(string id, int plancycle, int planinterval, int plantimes);

        /// <summary>
        /// 设备运行计划
        /// </summary>
        /// <param name="projectid">设备id</param>
        /// <param name="sysnameid">系统id</param>
        /// <param name="equipmentid">设备id</param>
        /// <param name="id">计划id</param>
        /// <param name="plancycle"></param>
        /// <param name="plandate"></param>
        /// <param name="planhour"></param>
        /// <returns></returns>
        Task<string> AddWoEquipmentRunning(string projectid, string sysnameid, string equipmentid, string id, string expirytime, int advancelong, int plancycle, int plandate, int planhour);
        Task<string> AddWoEquipmentRunning(string id, int plancycle, int planinterval, int plantimes);

        /// <summary>
        /// 超时工单
        /// </summary>
        /// <param name="woid"></param>
        /// <param name="wotype"></param>
        /// <returns></returns>
        Task<string> SaveTimeOutRunning(string id, int wotype, int plancycle, int planinterval);

        /// <summary>
        /// 根据id删除定时任务
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<string> RemovePlan(string id);

        /// <summary>
        /// 获取基本信息
        /// </summary>
        /// <returns></returns>
        string GetInfo();

        #region 配送物品计划
        /// <summary>
        /// 添加配送计划 - 来源 DistriWorkOrderPlanController
        /// </summary>
        /// <param name="id"></param>
        /// <param name="plancycle"></param>
        /// <param name="planinterval"></param>
        /// <param name="plantimes"></param>
        /// <returns></returns>
        Task<string> AddDistriWorkOrderPlan(string id, int plancycle, int planinterval, int plantimes,string extensiontime);

        /// <summary>
        /// 删除配送计划 - 删除定时任务 - 来源 DistriWorkOrderPlanController
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<string> RemoveDistriWorkOrderPlan(string id);

        /// <summary>
        /// 自动定时计划 - 自动分配
        /// </summary>
        /// <param name="woid"></param>
        /// <param name="wotype"></param>
        /// <returns></returns>
        Task<string> SaveAutoAssign(string id, int wotype, int plancycle, int planinterval);
        #endregion
    }
}
