import request from '@/utils/request'
// 所有尽职背调列表
export function getAllInvestigateList(query) {
  return request({
    url: '/project/investigate/listAll',
    method: 'get',
    params: query
  })
}
//  查询可申请尽职背调流程列表
export function applicableListInvestigate(query) {
  return request({
    url: '/project/investigate/applicableList',
    method: 'get',
    params: query
  })
}

// 我的待办任务列表
export function getMyTaskList(query) {
  return request({
    url: '/project/investigate/getMyTaskList',
    method: 'get',
    params: query
  })
}
//我的已办任务列表
export function getMyDoneTaskList(query) {
  return request({
    url: '/project/investigate/getMyDoneTaskList',
    method: 'get',
    params: query
  })
}
//我的单据列表
export function getMyList(query) {
  return request({
    url: '/project/investigate/getMyList',
    method: 'get',
    params: query
  })
}
//启动流程
export function investigateStart(data) {
  return request({
    //url: '/invest/pool',
    url:'/project/investigate/start',
    method: 'post',
    data: data
  })
}
//审批流程
export function investigateComplete(data) {
  return request({
    url:'/project/investigate/complete',
    method: 'put',
    data: data,
  })
}
// 查询项目池详细
export function getPool(id) {
  return request({
    url: '/invest/pool/' + id,
    method: 'get'
  })
}
export function getInvestigateInfo(pInstId) {
  return request({
    url: '/project/investigate/' + pInstId,
    method: 'get'
  })
}

// 查询尽职背调待办任务列表数量
export function getMyTaskInvestigateNumber() {
  return request({
    url: '/project/investigate/getMyTaskList',
    method: 'get'
  })
}
//指定审批人需要的接口-开始
export function allUserList(query) {
  return request({
    url: '/system/approve/allUserList',
    method: 'get',
    params: query
  })
}

export function findApproveUser() {
  return request({
    url:'/system/approve/findApproveUser',
    method: 'get'
  })
}
//保存审批人员
export function saveApproveUser(data) {
  return request({
    url:'/system/approve/saveApproveUser',
    method: 'post',
    data: data
  })
}
//指定审批人需要的接口-结束

