import request from '@/utils/request'

// 解析线报消息
export function parseLineReport(data) {
  return request({
    url: '/jarvis/batchPublish/parse',
    method: 'post',
    data: data
  })
}

// 批量发品
export function batchPublish(data) {
  return request({
    url: '/jarvis/batchPublish/publish',
    method: 'post',
    data: data
  })
}

// 查询批量发品任务列表
export function listTasks(query) {
  return request({
    url: '/jarvis/batchPublish/task/list',
    method: 'get',
    params: query
  })
}

// 查询批量发品任务详情
export function getTask(taskId) {
  return request({
    url: '/jarvis/batchPublish/task/' + taskId,
    method: 'get'
  })
}

// 查询批量发品明细列表
export function listItems(taskId) {
  return request({
    url: '/jarvis/batchPublish/item/list/' + taskId,
    method: 'get'
  })
}

// 手动重试任务
export function retryTask(taskId) {
  return request({
    url: '/jarvis/batchPublish/task/retry/' + taskId,
    method: 'post'
  })
}

