import request from '@/utils/request'
import {praseStrEmpty} from "@/utils/ruoyi";

// 新增开票
export function addTicket(data) {
  return request({
    url: '/ticket/hazardworks',
    method: 'post',
    data: data
  })
}

// 关联火票
export function addFireTicket(data) {
  return request({
    url: '/ticket/hazardworks/addFire',
    method: 'post',
    data: data
  })
}

// 修改票据
export function updateTicket(data) {
  return request({
    url: '/ticket/hazardworks',
    method: 'put',
    data: data
  })
}

// 查询票据列表
export function listTicket(query) {
  return request({
    url: '/ticket/hazardworks/list',
    method: 'get',
    params: query
  })
}

// 查询用户详细
export function getInfo(aId) {
  return request({
    url: '/ticket/hazardworks/' + praseStrEmpty(aId),
    method: 'get'
  })
}
