package com.ruoyi.flowable.service;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.invest.domain.*;
import com.ruoyi.invest.domain.vo.ProjectTerminationVo;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * 项目池Service接口
 * 
 * @author ruoyi
 * @date 2024-02-21
 */
public interface ITerminationService
{
    List<ProjectTerminationVo> selectAllTerminationList(TProjectTermination tProjectTermination);
    List<ProjectTerminationVo> getMyTaskList(String userId, TProjectTermination tProjectTermination);
    List<ProjectTerminationVo> getMyDoneTaskList(String userId, TProjectTermination tProjectTermination);
    List<ProjectTerminationVo> getMyList(String userId,TProjectTermination tProjectTermination);

    TProjectTermination selectTProjectTerminationByProcInstId(String pInstId);
    /**
     * 新增投决申请
     *
     * @param tProjectTermination 投决申请
     * @return 结果
     */

    AjaxResult start(TProjectTermination tProjectTermination);
    AjaxResult complete(TProjectTermination tProjectTermination, FlowBaseInfo flow, HttpServletRequest request) throws Exception ;

    TProjectMeeting selectTProjectMeetingByProcInstId(String pInstId);

    /**
     * 根据pInstId查询汇总分数和平均分数
     * @param pInstId
     * @return
     */
    Map<String,String> selectSumScore(String pInstId);

    /**
     * 根据项目ID获取最新终止申请
     * @param projectPoolId
     * @return
     */
    public TProjectTermination listProjectPoolIdNew(String projectPoolId);


}
