import { request } from 'umi';
import type { ExaminationRuleType } from './data.d';
import {TableListItem} from "../../../../admin/src/pages/course/option/data";
/**
 * 获取考試規則
 * http://10.10.14.252:8080/workspace/myWorkspace.do?projectId=382#6426
 * @param params
 * @returns
 */
export async function queryExaminationRule(params: {
  examination_id: number;
  //count: number;
})
  // : Promise<{ data: { list: CardListItemDataType[] } }>
{
  return request('/dsideal_yy/zygh/training/person/getExaminationRuleById', {
    params,
  });
}

// export async function queryPersonInfo(params: {
//   identity_id: number;
//   person_id:number
//   //count: number;
// })
// // : Promise<{ data: { list: CardListItemDataType[] } }>
// {
//   return request('/dsideal_yy/person/getPersonInfo', {
//     params,
//   });
// }

// 获取人员信息
export async function queryPersonInfo(params: {
  identity_id: number;
  person_id: number;
  //count: number;
}) {
  return request('/dsideal_yy/person/getPersonInfo', {
    params,
  });
}

//保存报名
export async function savePersonSignUpInfo(data: { [key: string]: any }, options?: { [key: string]: any }) {
  return request('/dsideal_yy/zygh/training/person/savePersonSignUpInfo', {
    data,
    method: 'POST',
    requestType: "form",
    ...(options || {}),
  });
}

//身份证重复校验/dsideal_yy/zygh/training/person/checkExaminationPersonID
export async function checkExaminationPersonID(params: {
}) {
  return request('/dsideal_yy/zygh/training/person/checkExaminationPersonID', {
    params,
  });
}
