package com.dayou.service.workflow;
import com.dayou.dto.InstanceNodeDTO;
import com.dayou.dto.WorkNodeCommit;
import com.dayou.entity.WorkFlowNodeInstance;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dayou.enums.MainBusinessEnum;
import com.dayou.enums.workflow.WorkflowNodeEnum;
import com.dayou.vo.NightingaleEchartsVO;
import com.dayou.vo.WorkNodeInstanceVO;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.web.multipart.MultipartFile;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 工作流节点实例 服务类
 * </p>
 *
 * @author wucl
 * @since 2023-10-17
 */
public interface IWorkFlowNodeInstanceService extends IService<WorkFlowNodeInstance> {

        Page<WorkFlowNodeInstance> selectPage(Page page,WorkFlowNodeInstance workFlowNodeInstance);

        WorkFlowNodeInstance detail(Long id);

        Boolean add(WorkFlowNodeInstance workFlowNodeInstance);

        Boolean update(WorkFlowNodeInstance workFlowNodeInstance);

        Boolean delete(Long id);


    List<WorkNodeInstanceVO> instanceQueue(InstanceNodeDTO instance);

    WorkNodeInstanceVO instanceCurrent(InstanceNodeDTO instance);

    List<WorkNodeInstanceVO> filterWaitingNodeBeforePendingNode(InstanceNodeDTO instance);

    List<NightingaleEchartsVO> instanceNodeCountByCode(String businessType);

    Boolean activateInstanceNode(Long id);

    List<WorkNodeInstanceVO> instanceArray(InstanceNodeDTO instance);

    Boolean checkIfReverse(String productionType, String productionNo);

    Date getNodeFinishedTime(MainBusinessEnum businessEnum, WorkflowNodeEnum nodeEnum,Long businessId,String businessSubId,String businessMinId);

    Date getMajorProductionFinishedTime(Long businessId,Long nodeId);
}
