package com.dayou.service.workflow;
import com.dayou.dto.AssetsSelectDTO;
import com.dayou.entity.WorkFlowNodeInstance;
import com.dayou.entity.WorkNodeTask;
import com.dayou.entity.WorkTaskRecord;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dayou.vo.*;
import com.dayou.workflow.config.WorkNodeProcessable;

import java.util.List;

/**
 * <p>
 * 工作流任务记录 服务类
 * </p>
 *
 * @author wucl
 * @since 2023-10-17
 */
public interface IWorkTaskRecordService extends IService<WorkTaskRecord> {

        Page<WorkTaskRecord> selectPage(Page page,WorkTaskRecord workTaskRecord);

        WorkTaskRecord detail(Long id);

        Boolean add(WorkTaskRecord workTaskRecord);

        Boolean update(WorkTaskRecord workTaskRecord);

        Boolean delete(Long id);

        Boolean doCreateNodeTaskRecord(WorkNodeProcessable workNodeProcessable,List<WorkNodeTask> tasks, WorkFlowNodeInstance nextInstanceNode, Long handlerId);

    List<WorkTaskRecordVO> getInstanceTask(Long instanceId);

        Page<TaskTodoVO> majorTaskTodoPage(TaskTodoVO todoVO, Page page,String keyword);

    Page<MajorTaskDoneVO> majorTaskDonePage(MajorTaskDoneVO doneVO, Page page,String keyword);

    Page<PersonalTodoVO> personalTodoPage(PersonalTodoVO todoVO, Page page, String keyword);

    Page<PersonalTaskDoneVO> personalTaskDonePage(PersonalTaskDoneVO doneVO, Page page, String keyword);

    List<TaskTodoVO> majorTodoSimpleList();

    List<PersonalTodoVO> personalTodoSimpleList();

    List<BusinessTodoNum> getTodoTotalNum();

    /**
     * 获取资产业务已办列表
     * @param assetsSelectDTO 查询dto
     * @param page 分页
     * @return List<AssetsTaskDoneVO>
     */
    Page<AssetsTaskDoneVO> getAssetsTaskDoneList(AssetsSelectDTO assetsSelectDTO, Page page);

    /**
     * 查询提醒信息
     * @param instanceNodeId
     * @return
     */
    TaskReminderVO getTaskReminderInfo(Long instanceNodeId);

    /**
     * 根据节点信息查询正在进行节点的处理人
     * @param businessType
     * @param businessId
     * @param businessSubId
     * @param businessMinId
     * @return
     */
    Long getHandlerIdByLastNode(String businessType,Long businessId,String businessSubId,String businessMinId);

    List<PersonalTodoVO> personalInRepTodoList(String nodeCode,String clientName);

    List<PersonalTodoVO> personalOutRepTodoList(String nodeCode,String clientName);
}
