namespace BPA.MES.Base.Application.Services
{
    /// <summary>
    /// 名    称 ：工单服务  
    /// 创 建 人 ：yangxiao  
    /// 创建时间 ：  2023/7/20 14:39:28 
    /// 描    述 ：  
    /// </summary>
    public interface IWorkInfoService
    {
        /// <summary>
        /// 增加
        /// </summary>
        /// <returns></returns>
        Task<bool> Add(WorkInfoAddInput input);
        /// <summary>
        /// 移除
        /// </summary>
        /// <returns></returns>
        Task<bool> Del(WorkInfoDelInput input);
        /// <summary>
        /// 更新
        /// </summary>
        /// <returns></returns>
        Task<bool> Update(WorkInfoUpdateInput input);

        Task<WorkInfoEditDetailOutput> EditDetail(string Id);
        /// <summary>
        /// 不分页列表
        /// </summary>
        /// <returns></returns>
        Task<List<WorkInfoOutput>> List(WorkInfoQueryInput input);
        /// <summary>
        /// 分页列表
        /// </summary>
        /// <returns></returns>
        Task<SqlSugarPagedList<WorkInfoOutput>> PagedList(WorkInfoQueryPageInput input);
        /// <summary>
        /// 下拉列表
        /// </summary>
        /// <returns></returns>
        Task<dynamic> SelectList();
        /// <summary>
        /// 查询单条
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Task<WorkInfoDetailOutput> Detail(string Id);
        /// <summary>
        /// 更改状态
        /// </summary>
        /// <returns></returns>
        Task<bool> UpdateStatus(WorkInfoStatusUpdateInput input);

        /// <summary>
        /// 工单下发
        /// </summary>
        /// <param name="input">工单Id</param>
        /// <returns></returns>
        Task<bool> Publish(PublishInput input);
        /// <summary>
        /// 批次工单下发
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<bool> Publishs(BatchInput input);
        /// <summary>
        /// 强制结束
        /// </summary>
        /// <param name="workId">工单Id</param>
        /// <returns></returns>
        Task<bool> ForcedEnd(string workId);
        /// <summary>
        /// 工单状态记录
        /// </summary>
        /// <param name="workId"></param>
        /// <returns></returns>
        Task<List<WorkInfoStatusOutput>> StatusList(string workId);
        /// <summary>
        /// 修改工单步骤状态
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<bool> UpdateWorkCraftStepsStatus(WorkInfoCraftstepRecordUpdateInput input);
        /// <summary>
        /// 修改工单物料状态
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<bool> UpdateWorkMaterialStatus(WorkInfoMaterialsRecordUpdateInput input);
    }
}
