import request from '@/utils/request'

// 查询调度任务列表
export function listTask(query) {
  return request({
    url: '/wisdom/dispatch/list',
    method: 'get',
    params: query
  })
}

// 查询调度任务详细
export function getTask(id) {
  return request({
    url: '/wisdom/dispatch/' + id,
    method: 'get'
  })
}

// 新增调度任务
export function addTask(data) {
  return request({
    url: '/wisdom/dispatch',
    method: 'post',
    data: data
  })
}

// 修改调度任务
export function updateTask(data) {
  return request({
    url: '/wisdom/dispatch',
    method: 'put',
    data: data
  })
}

// 删除调度任务
export function delTask(id) {
  return request({
    url: '/wisdom/dispatch/' + id,
    method: 'delete'
  })
}
// 执行调度任务 下架
export function executeTask1(data) {
  return request({
    url: '/wisdom/dispatch/execute',
    method: 'post',
    data: data
  })
}
// 执行调度任务 上架
export function wcsTask(data) {
  return request({
    url: '/wisdom/upGoods',
    method: 'post',
    data: data
  })
}
//定时任务 查询立库执行状态
export function wcsStatus(query) {
  return request({
    url: '/wisdom/wcs/query',
    method: 'get',
    params: query
  })
}