import request from '@/utils/request'

// 查询项目成本产值列表
export function listCostOutput(query) {
  return request({
    url: '/project/costOutput/list',
    method: 'get',
    params: query
  })
}

// 查询项目成本产值详细
export function getCostOutput(id) {
  return request({
    url: '/project/costOutput/' + id,
    method: 'get'
  })
}

// 新增项目成本产值
export function addCostOutput(data) {
  return request({
    url: '/project/costOutput',
    method: 'post',
    data: data
  })
}

// 修改项目成本产值
export function updateCostOutput(data) {
  return request({
    url: '/project/costOutput',
    method: 'put',
    data: data
  })
}

// 删除项目成本产值
export function delCostOutput(id) {
  return request({
    url: '/project/costOutput/' + id,
    method: 'delete'
  })
}


export function listByProjectId(projectId){
  return request({
    url: '/project/costOutput/listByProjectId?projectId=' + projectId,
    method: 'get'
  })
}

export function addYearInvestment(data){
  return request({
    url: '/project/costOutput/addYearInvestment',
    method: 'post',
    data:data
  })
}

export function addMonthInvestment(data){
  return request({
    url: '/project/costOutput/addMonthInvestment',
    method: 'post',
    data:data
  })
}

export function batchUpdate(datas){
  return request({
    url: '/project/costOutput/batchUpdate',
    method: 'post',
    data:datas
  })
}