import request from '@/utils/request'

// 查询项目列表
export function listProject(query) {
  return request({
    url: '/bst/project/list',
    method: 'get',
    params: query
  })
}

// 查询所有项目
export function listAllProject() {
  return request({
    url: '/bst/project/listAll',
    method: 'get'
  })
}

// 查询项目详细
export function getProject(id) {
  return request({
    url: '/bst/project/' + id,
    method: 'get'
  })
}

// 新增项目
export function addProject(data) {
  return request({
    url: '/bst/project',
    method: 'post',
    data: data
  })
}

// 修改项目
export function updateProject(data) {
  return request({
    url: '/bst/project',
    method: 'put',
    data: data
  })
}

// 删除项目
export function delProject(id) {
  return request({
    url: '/bst/project/' + id,
    method: 'delete'
  })
}

// 完成项目
export function completeProject(id) {
  return request({
    url: '/bst/project/complete/' + id,
    method: 'put'
  })
}

// 开始开发
export function startProject(data) {
  return request({
    url: '/bst/project/start',
    method: 'put',
    data
  })
}

// 验收
export function acceptProject(id) {
  return request({
    url: '/bst/project/accept/' + id,
    method: 'put'
  })
}

// 维护
export function maintenanceProject(data) {
  return request({
    url: '/bst/project/maintenance',
    method: 'put',
    data
  })
}
