import request from '@/utils/request';


// 查询筛查项目列表-不包含子集
export function queryVisionExamineItemList(params:any){
  return request({
    url: '/base/vision-examine-item/queryVisionExamineItemList' ,
    method: 'get',
    params: params
  });
}
//查询视力筛查-检查计划分页
export function queryExaminePlanPage(params:any){
  return request({
    url: '/vision_examine/examine-plan/queryExaminePlanPage' ,
    method: 'get',
    params: params
  });
}


//新增视力筛查-检查计划
export function addExaminePlan(data:any){
  return request({
    url:'/vision_examine/examine-plan/addExaminePlan' ,
    method: 'post',
    data: data
  });
}
//修改视力筛查-检查计划
export function updateExaminePlan(data:any){
  return request({
    url:'/vision_examine/examine-plan/updateExaminePlan' ,
    method: 'post',
    data: data
  });
}
//删除视力筛查-检查计划
export function delExaminePlan(queryParams:any){
  return request({
    url:'/vision_examine/examine-plan/delExaminePlan' ,
    method: 'post',
    params: queryParams
  });
}
//获取计划学年个数
export function queryPlanNum(queryParams:any){
  return request({
    url:'/vision_examine/examine-plan/queryPlanNum' ,
    method: 'get',
    params: queryParams
  });
}


//获取计划编号
export function getPlanCode(queryParams:any){
  return request({
    url:'/vision_examine/examine-plan/getPlanCode' ,
    method: 'get',
    params: queryParams
  });
}


// 视力筛查-检查计划-关联学校
export function queryExamineSchoolPage(params:any){
  return request({
    url: '/vision_examine/examine-plan-school/queryExamineSchoolPage' ,
    method: 'get',
    params: params
  });
}
//新增视力筛查-检查计划
export function addExamineSchool(data:any){
  return request({
    url:'/vision_examine/examine-plan-school/addExamineSchool' ,
    method: 'post',
    params: data
  });
}

//添加普检计划已关联学校所有未关联的学生
export function addAllExamineStudent(data:any){
  return request({
    url:'/vision_examine/examine-plan-school/addAllExamineStudent' ,
    method: 'post',
    params: data
  });
}

//抽检规则-添加检查计划-关联学校
export function addSpotCheckExamineSchool(data:any){
  return request({
    url:'/vision_examine/examine-plan-school/addSpotCheckExamineSchool' ,
    method: 'post',
    params: data
  });
}
//删除视力筛查-检查计划
export function delExamineSchool(queryParams:any){
  return request({
    url:'/vision_examine/examine-plan-school/delExamineSchool' ,
    method: 'post',
    params: queryParams
  });
}


// 查询检查计划关联学校区域结构树
export function queryExamineSchoolTree(params:any){
  return request({
    url: '/vision_examine/examine-plan-school/queryExamineSchoolTree' ,
    method: 'get',
    params: params
  });
}
// 现状分析-普查区域学校班级结构树
export function queryExamineSchoolGradeTree(params:any){
  return request({
    url: '/vision_examine/examine-plan-school/queryExamineSchoolGradeTree' ,
    method: 'get',
    params: params
  });
}


// 查询普检关联学生列表分页
export function queryExamineResultPage(params:any){
  return request({
    url: '/vision_examine/examine-result/queryExamineResultPage' ,
    method: 'get',
    params: params
  });
}
// 检查进度学生完成率
export function queryCompletionRate(params:any){
  return request({
    url: '/vision_examine/examine-result/queryCompletionRate' ,
    method: 'get',
    params: params
  });
}


// 近视统计
export function queryMyopiaStatistics(params:any){
  return request({
    url: '/vision_examine/examine-result/queryMyopiaStatistics' ,
    method: 'get',
    params: params
  });
}


// 视力不良统计
export function queryAbnormalStatistics(params:any){
  return request({
    url: '/vision_examine/examine-result/queryAbnormalStatistics' ,
    method: 'get',
    params: params
  });
}
// 远视储备率统计
export function queryFarSightednessStatistics(params:any){
  return request({
    url: '/vision_examine/examine-result/queryFarSightednessStatistics' ,
    method: 'get',
    params: params
  });
}
// 抽检对比分析
export function querySamplingComparison(params:any){
  return request({
    url: '/vision_examine/examine-result/querySamplingComparison' ,
    method: 'get',
    params: params
  });
}
// 查询普检报告年级列表分页
export function queryPlanGradePage(params:any){
  return request({
    url: '/vision_examine/examine-result/queryPlanGradePage' ,
    method: 'get',
    params: params
  });
}


// 查询普检报告年级列表分页
export function queryStudentVisdataPage(params:any){
  return request({
    url: '/vision_examine/examine-result/queryStudentVisdataPage' ,
    method: 'get',
    params: params
  });
}

// 查询普检报告年级列表分页
export function queryStudentVisdataList(params:any){
  return request({
    url: '/vision_examine/examine-result/queryStudentVisdataList' ,
    method: 'get',
    params: params
  });
}

//学生视力数据档案列表
export function queryVisionChangeTrend(params:any){
  return request({
    url: 'vision_examine/examine-result/queryVisionChangeTrend' ,
    method: 'get',
    params: params
  });
}
//报告导出
export function exportVisionForm(params: any) {
  return request({
      url: '/vision_examine/examine-result/exportVisionForm',
      method: 'get',
      params: params,
      responseType: 'arraybuffer',
  });
}

//批量报告导出
export function exportMultipleVisionForm(params: any) {
  return request({
      url: '/vision_examine/examine-result/exportMultipleVisionForm',
      method: 'get',
      params: params,
      responseType: 'arraybuffer',
  });
}
//导出生物报告600模版
export function exportStudentSwan(params: any) {
  return request({
      url: '/vision_examine/examine-result/exportStudentSwan',
      method: 'get',
      params: params,
      responseType: 'arraybuffer',
  });
}




// 通过学校id查找检查计划
export function querySchoolIdExamineList(params:any){
  return request({
    url: '/vision_examine/examine-plan-school/querySchoolIdExamineList' ,
    method: 'get',
    params: params
  });
}

// 查询抽检规则学校列表
export function queryRulesSchoolList(params:any){
  return request({
    url: '/vision_examine/examine-plan-school/queryRulesSchoolList' ,
    method: 'get',
    params: params
  });
}


// 查询抽检规则学校列表
export function studentQRCode(params:any){
  return request({
    url: '/vision_examine/examine-plan/studentQRCode' ,
    method: 'post',
    params: params
  });
}


//导出预览二维码
export function downloadQRCode(queryParams: any) {
  return request({
    url: '/vision_examine/examine-plan/downloadQRCode',
    method: 'get',
    params: queryParams,
    responseType: 'arraybuffer'
  });
}

//导出预览二维码
export function examineResultStudentQRCode(queryParams: any) {
  return request({
    url: '/vision_examine/examine-result/examineResultStudentQRCode',
    method: 'get',
    params: queryParams,
    responseType: 'arraybuffer'
  });
}



//选择导出预览二维码
export function downloadSelectedQRCode(queryParams: any) {
  return request({
    url: '/vision_examine/examine-plan/downloadSelectedQRCode',
    method: 'get',
    params: queryParams,
    responseType: 'arraybuffer'
  });
}
//导出个人二维码
export function studentPersonQRCode(queryParams: any) {
  return request({
    url: '/vision_examine/examine-plan/studentPersonQRCode',
    method: 'get',
    params: queryParams,
    responseType: 'arraybuffer'
  });
}
//导出多人二维码
export function studentMultiplePersonQRCode(data: any) {
  return request({
    url: '/vision_examine/examine-plan/studentMultiplePersonQRCode',
    method: 'post',
    data: data,
    responseType: 'arraybuffer'
  });
}
//导出全部二维码
export function studentAllPersonQRCode(params: any) {
  return request({
    url: '/vision_examine/examine-plan/studentAllPersonQRCode',
    method: 'get',
    params: params,
    responseType: 'arraybuffer'
  });
}

//导出全部检查单
export function AllSchoolPersonQRCode(params: any) {
  return request({
    url: '/vision_examine/examine-plan/AllSchoolPersonQRCode',
    method: 'get',
    params: params,
    responseType: 'arraybuffer'
  });
}


//导出未检学生检查单
export function exportNotInspectedQRCode(params: any) {
  return request({
    url: '/vision_examine/examine-plan/exportNotInspectedQRCode',
    method: 'get',
    params: params,
    responseType: 'arraybuffer'
  });
}


//查询学校列表
export function queryRegionPlan(params:any){
  return request({
    url: '/vision_examine/examine-plan/queryRegionPlan' ,
    method: 'get',
    params: params
  });
}
//根据id查询普检计划
export function queryExaminePlanById(params:any){
  return request({
    url: '/vision_examine/examine-plan/queryExaminePlanById' ,
    method: 'get',
    params: params
  });
}
//根据普查id学校id查询检查学生信息
export function schoolIdsPlanIdQueryStudent(params:any){
  return request({
    url: '/vision_examine/examine-result/schoolIdsPlanIdQueryStudent' ,
    method: 'get',
    params: params
  });
}

//下载检查学生信息模版
export function exportExamineResultStudent(queryParams: any) {
  return request({
    url: '/vision_examine/examine-result/exportExamineResultStudent',
    method: 'post',
    params: queryParams,
    responseType: 'arraybuffer'
  });
}





//数据管理-查询普检关联学生列表分页
export function queryExamineResultDataPage(params:any){
  return request({
    url: '/vision_examine/examine-result/queryExamineResultDataPage' ,
    method: 'get',
    params: params
  });
}

//通过普检id导出学生检查数据
export function exportExamineStudent(queryParams: any) {
  return request({
    url: '/vision_examine/examine-result/exportExamineStudent',
    method: 'post',
    params: queryParams,
    responseType: 'arraybuffer'
  });
}

//通过普检id导出学生体质健康网模板
export function exportStudentHealthNetwork(queryParams: any) {
  return request({
    url: '/vision_examine/examine-result/exportStudentHealthNetwork',
    method: 'post',
    params: queryParams,
    responseType: 'arraybuffer'
  });
}


//删除视力筛查-检查计划
export function delExamineStudentResult(queryParams:any){
  return request({
    url:'/vision_examine/examine-result/delExamineStudentResult' ,
    method: 'post',
    params: queryParams
  });
}

//修改学生视力数据档案
export function updateExamineResult(data:any){
  return request({
    url:'/vision_examine/examine-result/updateExamineResult' ,
    method: 'post',
    data: data
  });
}

//修改复查学生视力数据档案
export function updateRecheckExamineResult(data:any){
  return request({
    url:'/vision_examine/examine-result/updateRecheckExamineResult' ,
    method: 'post',
    data: data
  });
}



//下载常态化-学生信息
export function exportStudentResult(queryParams: any) {
  return request({
    url: '/vision_examine/examine-result/exportStudentResult',
    method: 'post',
    params: queryParams,
    responseType: 'arraybuffer'
  });
}

//下载常态化-学生信息
export function exportSchoolHealthNetwork(queryParams: any) {
  return request({
    url: '/vision_examine/examine-result/exportSchoolHealthNetwork',
    method: 'post',
    params: queryParams,
    responseType: 'arraybuffer'
  });
}

//下载常态化-学生信息
export function exportStatistics(queryParams: any) {
  return request({
    url: '/vision_examine/examine-result/exportStatistics',
    method: 'post',
    params: queryParams,
    responseType: 'arraybuffer'
  });
}
// 根据学校ID获取学校视力筛查报告所需数据
export function getSchoolCheckReportData(params:any){
  return request({
    url: '/vision_examine/examine-plan/getSchoolCheckReportData' ,
    method: 'get',
    params: params
  });
}
// 根据区域获取学校视力筛查报告所需数据
export function getRegionCheckReportData(params:any){
  return request({
    url: '/vision_examine/examine-plan/getRegionCheckReportData' ,
    method: 'get',
    params: params
  });
}


// 通过检查计划Id查询未关联的学生
export function queryPlanStudentList(params:any){
  return request({
    url: '/vision_examine/examine-plan-school/queryPlanStudentList' ,
    method: 'get',
    params: params
  });
}

// 通过检查计划Id查询未关联的学生
export function addExamineStudent(params:any){
  return request({
    url: '/vision_examine/examine-plan-school/addExamineStudent' ,
    method: 'post',
    data: params
  });
}



//根据普查id学校id查询检查学生信息
export function recheckStudentList(params:any){
  return request({
    url: '/vision_examine/examine-result/recheckStudentList' ,
    method: 'get',
    params: params
  });
}

//新增复查学生视力数据档案
export function addRecheckExamineResult(data:any){
  return request({
    url:'/vision_examine/examine-result/addRecheckExamineResult' ,
    method: 'post',
    data: data
  });
}


//根据普查id学生id查询复查学生详情
export function recheckStudentInfo(params:any){
  return request({
    url: '/vision_examine/examine-result/recheckStudentInfo' ,
    method: 'get',
    params: params
  });
}

//下载复查全部学生信息模版
export function exportRecheckTemplate(queryParams: any) {
  return request({
    url: '/vision_examine/examine-result/exportRecheckTemplate',
    method: 'post',
    params: queryParams,
    responseType: 'arraybuffer'
  });
}


//下载复查全部学生信息模版
export function exportRecheckExamineResultStudent(queryParams: any) {
  return request({
    url: '/vision_examine/examine-result/exportRecheckExamineResultStudent',
    method: 'post',
    params: queryParams,
    responseType: 'arraybuffer'
  });
}
//导出复查全部学生复查通知书
export function studentRecheckNotice(queryParams: any) {
  return request({
    url: '/vision_examine/examine-result/studentRecheckNotice',
    method: 'post',
    data: queryParams,
    responseType: 'arraybuffer'
  });
}

//导出复查全部学生复查通知书-大于1000
export function exportSchoolRecheckNotice(queryParams: any) {
  return request({
    url: '/vision_examine/examine-result/exportSchoolRecheckNotice',
    method: 'post',
    params: queryParams,
    responseType: 'arraybuffer'
  });
}


//生成队列
export function exportStudentQueueDataTemplate(params: any) {
  return request({
    url: '/vision_examine/examine-result/exportStudentQueueDataTemplate',
    method: 'post',
    params: params,
    responseType: 'arraybuffer'
  });
}

//删除视力筛查-检查计划
export function delExamineResult(queryParams:any){
  return request({
    url:'/vision_examine/examine-result/delExamineResult' ,
    method: 'post',
    params: queryParams
  });
}


//修改学生视力数据档案的年级班级
export function updateGradeClassExamineResult(data:any){
  return request({
    url:'/vision_examine/examine-result/updateGradeClassExamineResult' ,
    method: 'post',
    data: data
  });
}


// 查询筛查项目列表-不包含子集
export function uploadDataToBureau(params:any){
  return request({
    url: '/eyeapi/uploadDataToBureau' ,
    method: 'post',
    params: params
  });
}
