import request from '@/utils/request'

// 查询分流结果列表
export function listAdjustResult(query) {
  return request({
    url: '/major/adjustResult/list',
    method: 'get',
    params: query
  })
}

// 查询分流结果详细
export function getAdjustResult(batchId) {
  return request({
    url: '/major/adjustResult/' + batchId,
    method: 'get'
  })
}

// 新增分流结果
export function addAdjustResult(data) {
  return request({
    url: '/major/adjustResult',
    method: 'post',
    data: data
  })
}

// 修改分流结果
export function updateAdjustResult(data) {
  return request({
    url: '/major/adjustResult',
    method: 'put',
    data: data
  })
}

// 删除分流结果
export function delAdjustResult(batchId) {
  return request({
    url: '/major/adjustResult/' + batchId,
    method: 'delete'
  })
}

// 审批发布分流结果
export function audit(data){
  return request({
    url: '/major/adjustResult/audit',
    method:'put',
    data: data
  })
}

// 进行分流
export function startAdjust(data) {
  return request({
    url: '/major/adjustResult/startAdjust',
    method: 'post',
    data: data,
    timeout: 3 * 60 * 1000
  })
}
