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

// 查询申请审核列表
export function listApplicationReview(query) {
  return request({
    url: '/system/user/unauditList',
    method: 'get',
    params: query
  })
}

// 查询申请审核详细
export function getApplicationReview(userId) {
  return request({
    url: '/system/user/' + praseStrEmpty(userId),
    method: 'get'
  })
}

// 新增申请审核
export function addApplicationReview(data) {
  return request({
    url: '/system/ApplicationReview',
    method: 'post',
    data: data
  })
}

// 修改申请审核
export function updateApplicationReview(data) {
  return request({
    url: '/system/ApplicationReview',
    method: 'put',
    data: data
  })
}

// 删除申请审核
export function delApplicationReview(userId) {
  return request({
    url: '/system/ApplicationReview/' + userId,
    method: 'delete'
  })
}

// 导出申请审核
export function exportApplicationReview(query) {
  return request({
    url: '/system/ApplicationReview/export',
    method: 'get',
    params: query
  })
}





// 新的查询申请审核列表
export function listtestercert(query) {
  return request({
    url: '/tester/cert/list',
    method: 'get',
    params: query
  })
}

// 查询申请审核详细
export function gettestercert(applyId) {
  return request({
    url: '/tester/cert/' + praseStrEmpty(applyId),
    method: 'get'
  })
}

// 新增申请审核
// export function addtestercert(data) {
//   return request({
//     url: '/system/testercert',
//     method: 'post',
//     data: data
//   })
// }

// 修改申请审核状态
export function updatetestercert(data) {
  return request({
    url: '/tester/cert/audited',
    method: 'post',
    data: data
  })
}

// 删除申请审核
export function deltestercert(applyId) {
  return request({
    url: '/tester/cert/' + praseStrEmpty(applyId),
    method: 'delete'
  })
}

// 导出申请审核
export function exporttestercert(query) {
  return request({
    url: '/system/testercert/export',
    method: 'get',
    params: query
  })
}


// 公司审核列表
export function companyList(query) {
  return request({
    url: '/companyApply/admin/unaudit',
    method: 'get',
    params: query
  })
}

// 详情
export function companyDetail(id) {
  return request({
    url: '/companyApply/admin/'+id,
    method: 'get',
  })
}
// 删除
export function companyDelete(id) {
  return request({
    url: '/companyApply/admin/delete/'+id,
    method: 'delete',
  })
}
// 审核
export function companyApplyPost(data) {
  return request({
    url: '/companyApply/admin/audit',
    method: 'post',
    data
  })
}