import request from '@/utils/request'

/**
 * 企业黑名单查询
 * @param {String} searchCode 统一码/注册号
 * @param {String} entName 主体名称
 */
export function getEntBlacklistInfo(searchCode, entname) {
  const form = new FormData()
  form.append('searchCode', searchCode)
  form.append('entname', entname)
  return request({
    url: '/entBlacklist/getEntBlacklistInfo',
    method: 'post',
    data: form
  })
}
/**
 * 获取企业黑名单详情
 * @param {String} abnIds 异常名录ids
 * @param {String} illegalIds 严重违法ids
 */
export function getBlackInfoDetails(abnIds, illegalIds) {
  const form = new FormData()
  form.append('abnIds', abnIds)
  form.append('illegalIds', illegalIds)
  return request({
    url: '/entBlacklist/getBlackInfoDetails',
    method: 'post',
    data: form
  })
}
/**
 * 列严黑名单查询
 * @param {object} data 分页查询参数
 */
export function getBlackForEnt(params) {
  return request({
    url: '/entBlacklist/getBlackForEnt',
    method: 'get',
    params
  })
}

export function getBlackForPerson(params) {
  return request({
    url: '/entBlacklist/getBlackForPerson',
    method: 'get',
    params
  })
}

export function getEntBlackForPerson(params) {
  return request({
    url: '/entBlacklist/getEntBlackForPerson',
    method: 'get',
    params
  })
}
