package com.erp.print.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.erp.print.dto.request.PrintTaskQueryRequest;
import com.erp.print.dto.request.PrintTaskRequest;
import com.erp.common.core.model.PageResponse;
import com.erp.print.dto.response.PrintTaskResponse;
import com.erp.print.entity.PrintTask;

import java.util.List;

public interface PrintTaskService {

    PageResponse<PrintTask> listTasks(Integer page, Integer limit, PrintTaskQueryRequest request);

    PrintTask getTaskById(Long id);

    PrintTask getTaskByTaskNo(String taskNo);

    PrintTask createTask(PrintTaskRequest request);

    void cancelTask(Long id);

    void retryTask(Long id);

    void deleteTask(Long id);

    IPage<PrintTask> selectTaskPage(com.baomidou.mybatisplus.extension.plugins.pagination.Page<PrintTask> page, PrintTaskQueryRequest request);

    PrintTask processTask(Long taskId);

    void markTaskCompleted(String taskNo);

    void markTaskFailed(String taskNo, String errorMessage);

    List<PrintTask> getPendingTasks(Integer limit);
}
