import request from '@/utils/request'

export function getPatrolPage(data) {
  return request({
    url: '/js-rest-inspection/page',
    method: 'get',
    params: data
  })
}

export function getPatrolList(data) {
  return request({
    url: '/js-rest-inspection/list',
    method: 'post',
    data: data
  })
}

export function getPatrolDetail(data) {
  return  request({
    url: '/js-rest-inspection/listById',
    method: 'post',
    data: data
  })
}

export function getPatrolById(data) {
  return request({
    url: '/js-rest-inspection/listByDivideCircleId',
    method: 'post',
    data: data
  })
}

export function addPatrolPage(data) {
  return request({
    url: '/js-rest-inspection/add',
    method: 'post',
    data: data
  })
}

export function editPatrolPage(data) {
  return request({
    url: '/js-rest-inspection/edit',
    method: 'post',
    data: data
  })
}

export function delPatrolPage(data) {
  return request({
    url: '/js-rest-inspection/delete',
    method: 'post',
    data: data
  })
}

// 静养 选择待宰圈号后自动填充当前的批次号
export function getPigpenByBatch(data) {
  return request({
    url: '/js-rest-inspection/listByPigpen',
    method: 'get',
    params: data
  })
}


// 最新记录
export function lastRecord() {
  return request({
    url: '/js-rest-inspection/lastRecord',
    method: 'get'
  })
}
