import request from '@/utils/request'

// 查询会议记录列表
export function listMeeting(query) {
  return request({
    url: '/invest/meeting/list',
    method: 'get',
    params: query
  })
}

// 查询会议记录详细
export function getMeeting(id) {
  return request({
    url: '/invest/meeting/' + id,
    method: 'get'
  })
}

// 新增会议记录
export function addMeeting(data) {
  return request({
    url: '/invest/meeting',
    method: 'post',
    data: data
  })
}

// 修改会议记录
export function updateMeeting(data) {
  return request({
    url: '/invest/meeting',
    method: 'put',
    data: data
  })
}

// 删除会议记录
export function delMeeting(id) {
  return request({
    url: '/invest/meeting/' + id,
    method: 'delete'
  })
}


// 新增打分
export function addScoring(data) {
  return request({
    url: '/invest/scoring',
    method: 'post',
    data: data
  })
}

// 获取打分详细信息
export function getScoring(id) {
  return request({
    url: '/invest/scoring/' + id,
    method: 'get'
  })
}


// 根据会议ID查询是否打分和打分数据
export function getCanScoringMeetingId(id) {
  return request({
    url: '/invest/scoring/getCanScoringMeetingId',
    method: 'get',
    params: { meetingId: id }

  })
}

// 根据会议ID查询汇总分数和平均分数
export function selectMeetingId(id) {
  return request({
    url: '/invest/scoring/selectMeetingId',
    method: 'get',
    params: { meetingId: id }

  })
}



// 新增立项申请​/dev-api​/invest​/approval
export function addApproval(data) {
  return request({
    url: '/invest/approval',
    method: 'post',
    data: data
  })
}
//修改立项申请 /dev-api/invest/approval
export function updateApproval(data) {
  return request({
    url: '/invest/approval',
    method: 'put',
    data: data
  })
}
// 删除立项申请
export function delApproval(id) {
  return request({
    url: '/invest/approval/' + id,
    method: 'delete'
  })
}
//查询立项申请列表
export function getApprovalList() {
  return request({
    url: '/invest/approval/list',
    method: 'get'
  })
}
// 根据项目ID获取最新立项申请  /dev-api/invest/approval/listProjectPoolIdNew
export function listProjectPoolIdNewApproval(id) {
  return request({
    url: '/invest/approval/listProjectPoolIdNew',
    method: 'get',
    params: { projectPoolId: id }

  })
}


// 新增投决申请​/dev-api​/invest​/decision
export function addDecision(data) {
  return request({
    url: '/invest/decision',
    method: 'post',
    data: data
  })
}
//修改投决申请 ​/dev-api​/invest​/decision
export function updateDecision(data) {
  return request({
    url: '/invest/decision',
    method: 'put',
    data: data
  })
}
// 删除投决申请
export function delDecision(id) {
  return request({
    url: '/invest/decision/' + id,
    method: 'delete'
  })
}
//查询投决申请列表
export function getDecisionList() {
  return request({
    url: '/invest/decision/list',
    method: 'get'
  })
}
// 根据项目ID获取最新投决申请  ​/dev-api​/invest​/decision​/listProjectPoolIdNew
export function listProjectPoolIdNewDecision(id) {
  return request({
    url: '/invest/decision/listProjectPoolIdNew',
    method: 'get',
    params: { projectPoolId: id }

  })
}



// 查询打分列表 ​/dev-api​/invest​/scoring​/list
export function getScoringListById(id) {
  return request({
    url: '/invest/scoring/list',
    method: 'get',
    params: { meetingId: id }

  })
}

// 根据项目ID获取最新终止申请  /dev-api/invest/approval/listProjectPoolIdNew
export function listProjectPoolIdNewTermination(id) {
  return request({
    url: '/project/termination/listProjectPoolIdNew',
    method: 'get',
    params: { projectPoolId: id }

  })
}
