import request from '@/utils/request'

export function findNextSequenceFlowList(params) {
  return request({
    useResponseData: true,
    url: '/xrActivity/findNextSequenceFlowList',
    method: 'get',
    params
  })
}

export function taskInfo(params) {
  return request({
    useResponseData: true,
    url: '/xrTaskList/taskInfo',
    method: 'get',
    params
  })
}

/**
 * 根据主体id查询主体信息
 * @param params
 * @returns {AxiosPromise}
 */
export function getEBaseinfo(params) {
  return request({
    useResponseData: true,
    url: '/baseinfo/getEBaseinfo',
    method: 'get',
    params
  })
}

/**
 * 查询主体信息列表
 * @param data
 * @returns {AxiosPromise}
 */
export function baseinfoList(data) {
  return request({
    useResponseData: true,
    url: '/baseinfo/baseinfoList',
    method: 'post',
    data
  })
}

export function marketEntities(data) {
  return request({
    useResponseData: true,
    url: '/xr-claim/marketEntities',
    method: 'post',
    data
  })
}
export function fetchAicorgUrl(params) {
  return request({
    useResponseData: true,
    url: '/user/fetchAicorgUrl',
    method: 'post',
    params
  })
}

export function isTaskCreater(params) {
  return request({
    useResponseData: true,
    url: '/xrTaskList/isTaskCreater',
    method: 'get',
    params
  })
}

export function findCurrentNode(params) {
  return request({
    useResponseData: true,
    url: '/xrActivity/findCurrentNode',
    method: 'get',
    params
  })
}
/**
 * 查询主体信息列表
 * @param data
 * @returns {AxiosPromise}
 */
export function listBaseinfo(data) {
  return request({
    useResponseData: true,
    url: '/baseinfo/list',
    method: 'post',
    data
  })
}

/**
 * 查询主体信息列表
 */
export function pageBaseinfo(data) {
  return request({
    url: '/eBaseinfo/pageBaseinfo',
    method: 'post',
    data
  })
}

/**
 * 通过机构编号查询TOrgunits
 * @param params
 * @returns {AxiosPromise}
 */
export function getTOrgunitsByOrgnumber(params) {
  return request({
    useResponseData: true,
    url: '/tOrgunits/getTOrgunitsByOrgnumber',
    method: 'get',
    params
  })
}

export function getEntTSAbnListPage(data) {
  return request({
    useResponseData: true,
    url: '/baseinfo/getEntTSAbnListPage',
    method: 'post',
    data
  })
}

export function getEntIllegalPage(data) {
  return request({
    useResponseData: true,
    url: '/baseinfo/getEntIllegalPage',
    method: 'post',
    data
  })
}
export function getOrgunits(orgNumber, orgLevel) {
  return request({
    url: '/tOrgunits/getAllOrgunits',
    method: 'post',
    params: {
      orgNumber,
      orgLevel
    }
  })
}

export function updateBaseinfoSuperviseDept(data) {
  return request({
    url: '/eBaseinfo/updateBaseinfoSuperviseDept',
    method: 'post',
    data
  })
}
