import request from '@/utils/request'
// 4. 选科

//4.1 学校选科轮次
export function getSchoolRounds(params) {
  return request({
    url: '/front/report/getSchoolRounds',
    method: 'get',
    params
  })
}

//4.2 选科报表
export function getSelectReport(params) {
  return request({
    url: '/front/report/getSelectReport',
    method: 'get',
    params
  })
}

//4.3 选科组合轮次详情 {roundId:'',groupId:''}
export function getSelectDetail(params) {
  return request({
    url: '/front/report/getSelectDetail',
    method: 'get',
    params
  })
}

//4.4 选科历史
export function getSelectHistory(params) {
  return request({
    url: '/front/report/getSelectHistory',
    method: 'get',
    params
  })
}

//4.5 当前选科
export function getStudentSelected() {
  return request({
    url: '/front/report/getStudentSelected',
    method: 'post'
  })
}

//4.6 选科保存
export function saveStudentSelected(data) {
  return request({
    url: '/front/report/saveStudentSelected',
    method: 'post',
    data
  })
}

//4.7 校长选课轮次列表
export function roundList(params) {
  return request({
    url: '/front/selected/round/list',
    method: 'get',
    params
  })
}

// 4.8 校长选课轮次增加 /front/selected/round
export function addRound(data) {
  return request({
    url: '/front/selected/round',
    method: 'post',
    data
  })
}

// 4.9 校长选课轮次修改
export function updateRound(data) {
  return request({
    url: '/front/selected/round',
    method: 'put',
    data
  })
}

// 4.10 校长选课轮次删除
export function deleteRound(idArr) {
  return request({
    url: '/front/selected/round/' + idArr.toString(),
    method: 'delete'
  })
}

// 4.11 查询所有可选科目组件 /front/report/listGroups
export function listGroups() {
  return request({
    url: '/front/report/listGroups',
    method: 'get'
  })
}

// 学年列表
export function listYears() {
  return request({
    url: '/front/report/listYears',
    method: 'get'
  })
}

//4.13 给未选科的发送消息  /front/report/sendSelectedNotice
export function sendSelectedNotice(data) {
  return request({
    url: '/front/report/sendSelectedNotice',
    method: 'post',
    data
  })
}

// /prod-api/front/selected/scoreImport/config
// 查询选科配置
export function getScoreImportConfig(roundId) {
  return request({
    url: '/front/selected/scoreImport/config',
    method: 'get',
    params: { roundId }
  })
}

// /prod-api/front/selected/scoreImport/config
// 保存选科配置
export function saveScoreImportConfig(data) {
  return request({
    url: '/front/selected/scoreImport/config',
    method: 'post',
    data
  })
}

// /prod-api/front/selected/scoreImport/details
// 查询选科成绩明细
export function queryScoreImportDetails(data) {
  return request({
    url: '/front/selected/scoreImport/details',
    method: 'post',
    data
  })
}

///prod-api/front/selected/scoreImport/generateFaculties
// 查询默认科目表格
export function generateFaculties() {
  return request({
    url: '/front/selected/scoreImport/generateFaculties',
    method: 'post'
  })
}

// /prod-api/front/selected/scoreImport/calculate
// 计算选科配置
export function calculateFaculties(data) {
  return request({
    url: '/front/selected/scoreImport/calculate',
    method: 'post',
    data
  })
}

// 选科大数据分析
export function getSelectCourseBigdata(params) {
  return request({
    url: 'front/selectCourse/bigdata/getSelectCourseBigdata',
    method: 'get',
    params
  })
}

