import request from "@/util/oaRequest"

// 查询库存管理列表
export function listOaWarehouse(query) {
  return request({
    url: '/oa/oaWarehouse/list',
    method: 'get',
    params: query
  })
}
// 查询库存管理列表
export function recentWarehouse(query) {
  return request({
    url: '/oa/oaWarehouse/recent',
    method: 'get',
    params: query
  })
}

// 查询库存管理列表
export function listThreshold(query) {
  return request({
    url: '/oa/oaWarehouse/listThreshold',
    method: 'get',
    params: query
  })
}// 查询库存管理列表
export function listNotThreshold(query) {
  return request({
    url: '/oa/oaWarehouse/listNotThreshold',
    method: 'get',
    params: query
  })
}
// 查询库存管理列表
export function listByMultiQuery(query) {
  return request({
    url: '/oa/oaWarehouse/listByMultiQuery',
    method: 'get',
    params: query
  })
}

// 查询库存管理详细
export function getOaWarehouse(id) {
  return request({
    url: '/oa/oaWarehouse/' + id,
    method: 'get'
  })
}

// 新增库存管理
export function addOaWarehouse(data) {
  return request({
    url: '/oa/oaWarehouse',
    method: 'post',
    data: data
  })
}
// 新增库存管理
export function addOaWarehouseBatch(data) {
  return request({
    url: '/oa/oaWarehouse/insert',
    method: 'post',
    data: data
  })
}

// 修改库存管理
export function updateOaWarehouse(data) {
  return request({
    url: '/oa/oaWarehouse',
    method: 'put',
    data: data
  })
}

// 删除库存管理
export function delOaWarehouse(id) {
  return request({
    url: '/oa/oaWarehouse/' + id,
    method: 'delete'
  })
}

export function getSummaryData(query) {
  return request({
    url: '/oa/oaWarehouse/cards',
    method: 'get',
    params: query
  })
}

export function monthDataAnalysis(query) {
  return request({
    url: '/oa/oaWarehouse/monthly',
    method: 'get',
    params: query
  })
}
