import request from '@/utils/request'

// 开始盘点
export function getTaskCount(data) {
  return request({
    // url: '/statistics/count',
    url: '/MatchScan/countByWarehouseAndScene',
    method: 'post',
    data: data
  })
}

// 开始盘点
export function getScan(query) {
  return request({
    url: '/AutoInventory/scan',
    method: 'get',
    params: query
  })
}
// 统计
export function getTotalStatistics(data) {
  return request({
    url: '/MatchScan/statistics',
    method: 'post',
    data: data
  })
}
// 开始匹配
export function getMatch(data) {
  return request({
    url: '/AutoInventory/matchPure',
    method: 'post',
    data: data
  })
}

// 停止盘点
export function stopScan(query) {
  return request({
    url: '/AutoInventory/stop',
    method: 'get',
    params: query
  })
}

// 获取盘点结果
export function getScanResult(query) {
  return request({
    url: '/MatchScan/countList',
    method: 'get',
    params: query
  })
}
// 获取盘点结果 - 最新再用
export function inventoryList(data) {
  return request({
    url: '/MatchScan/inventoryList',
    method: 'post',
    data: data
  })
}


// 获取图表
export function getChart(data) {
  return request({
    url: '/AutoInventory/chart',
    method: 'post',
    data: data
  })
}

// 根据盘点结果，用存放位置查看具体内容
export function getStockList(id) {
  return request({
    url: '/wisdom/stock/pcode/' + id,
    method: 'get',
  })
}

