import request from '@/utils/request'
const baseUrl = import.meta.env.VITE_APP_PRODUCTION_API

// 查询序检主表列表
export function listInspecion(query) {
  return request({
    url: baseUrl +'/business/inspecion/listInfo',
    method: 'get',
    params: query
  })
}

// 查询序检主表详细
export function getInspecion(id) {
  return request({
    url:  baseUrl +'/business/inspecion/' + id,
    method: 'get'
  })
}
export function getDayworkItemInspectionDetail(data) {
	return request({
		url: baseUrl + '/business/inspecion/getDayworkItemInspectionDetail',
		method: 'post',
		data:data
	})
}
export function getInspectionType(data) {
	return request({
		url: baseUrl + '/business/inspecion/getInspectionType',
		method: 'post',
		data:data
	})
}

// 新增序检主表
export function addInspecion(data) {
  return request({
    url: '/business/inspecion',
    method: 'post',
    data: data
  })
}

// 修改序检主表
export function updateInspecion(data) {
  return request({
    url: '/business/inspecion',
    method: 'put',
    data: data
  })
}

// 删除序检主表
export function delInspecion(id) {
  return request({
    url: '/business/inspecion/' + id,
    method: 'delete'
  })
}
