import request from '@/utils/httpRequest'

export default class CollectService {
  updateStatusById (param) {
    return request({
      url: '/material/collect/updateStatusById',
      method: 'post',
      data: param
    })
  }
  remove (id) {
    return request({
      url: '/material/collect/remove',
      method: 'get',
      params: {id: id}
    })
  }
  save (param) {
    return request({
      url: '/material/collect/save',
      method: 'post',
      data: param
    })
  }
  findById (id) {
    return request({
      url: '/material/collect/findById',
      method: 'get',
      params: {id: id}
    })
  }
  list (param) {
    return request({
      url: '/material/collect/list',
      method: 'get',
      params: param
    })
  }
  wareHouseList (params) {
    return request({
      url: '/material/collect/wareHouseList',
      method: 'get',
      params: params
    })
  }
  createReturnData (param) {
    return request({
      url: '/material/collect/createReturnData',
      method: 'post',
      data: param
    })
  }
  saveReturn (param) {
    return request({
      url: '/material/collect/saveReturn',
      method: 'post',
      data: param
    })
  }
  saveReturnAgree (param) {
    return request({
      url: '/material/collect/saveReturnAgree',
      method: 'post',
      data: param
    })
  }
  updateStatusByIdReturn (param) {
    return request({
      url: '/material/collect/updateStatusByIdReturn',
      method: 'post',
      data: param
    })
  }
  findByReturnId (id) {
    return request({
      url: '/material/collect/findByReturnId',
      method: 'get',
      params: {returnId: id}
    })
  }
  returnRequest (param) {
    return request({
      url: '/material/collect/returnRequest',
      method: 'post',
      data: param
    })
  }
  findHiById (id) {
    return request({
      url: '/material/collect/findHiById',
      method: 'get',
      params: {collectId: id}
    })
  }
  findHiByHiId (id) {
    return request({
      url: '/material/collect/findHiByHiId',
      method: 'get',
      params: {id: id}
    })
  }
  findLastHiByid (id) {
    return request({
      url: '/material/collect/findLastHiByid',
      method: 'get',
      params: {collectId: id}
    })
  }
}
