import request from '@/utils/request'

// 查询列表
export function listMapping(query) {
  return request({
    url: '/shipMapping/list',
    method: 'get',
    params: query
  })
}

// 查询详细
export function getMapping(id) {
  return request({
    url: '/shipMapping/' + id,
    method: 'get'
  })
}

// 新增
export function addMapping(data) {
  return request({
    url: '/shipMapping',
    method: 'post',
    data: data
  })
}

// 修改
export function updateMapping(data) {
  return request({
    url: '/shipMapping',
    method: 'put',
    data: data
  })
}

// 删除
export function delMapping(id) {
  return request({
    url: '/shipMapping/' + id,
    method: 'delete'
  })
}

// 查询在线船列表
export function getShipRoute() {
  return request({
    url: '/shipMapping/shipRoute',
    method: 'get'
  })
}

// 查询在线船详情
export function getGpsByDid(did) {
  return request({
    url: '/shipMapping/getGpsByDid/' + did,
    method: 'get'
  })
}
