import request from '@/utils/request'
import { method } from 'lodash-es'

const baseUrl = import.meta.env.VITE_APP_PRODUCTION_API
const sysUrl = import.meta.env.VITE_APP_BASE_API

/**
 * 获取 生产批次 列表
 * @param {*} data
 * @returns
 */
export function listCheckoutInspection(query) {
  return request({
    url: baseUrl + '/business/beforeCheckoutVerify/list',
    method: 'get',
    params: query
  })
}

export function confirmInspection(data) {
  return request({
    url: baseUrl + '/business/beforeCheckoutVerify/confirm',
    method: 'post',
    data: data
  })
}

export function rejectInspection(data) {
  return request({
    url: baseUrl + '/business/beforeCheckoutVerify/reject',
    method: 'post',
    data: data
  })
}

export function checkFurnace(data) {
  return request({
    url: baseUrl + '/business/beforeCheckoutVerify/checkFurnace',
    method: 'post',
    data: data
  })
}
export function checkMultiplyFurnace(data) {
  return request({
    url: baseUrl + '/business/beforeCheckoutVerify/checkMultiplyFurnace',
    method: 'post',
    data: data
  })
}

// 异步导出excel
export function exportAsync(data) {
  return request({
    url: sysUrl + '/business/asyncExport/processInspectionexport',
    method: 'post',
    data: data
  })
}

export function getExportCount(params) {
  return request({
    url: baseUrl + '/business/inspecion/getExportCount',
    method: 'get',
    params: params
  })
} 