// 系统专项设置api文件
import request from '@/utils/request'
import qs from 'qs'
let api = '/api-web'
// 分页查询教师列表
export function teacherQueryPage (data) {
  return request({
    url: api + '/teacher/queryPage',
    method: 'get',
    params: data
  })
}

// 根据教师编号查询教师基本信息
export function teacherGet (data) {
  return request({
    url: api + '/teacher/get',
    method: 'get',
    params: data
  })
}

// 获取老师乐团课程信息列表
export function getTeacherMusicClass (data) {
  return request({
    url: api + '/teacher/getTeacherMusicClass',
    method: 'get',
    params: data
  })
}

// 获取老师VIP课程信息列表
export function getTeacherVipClass (data) {
  return request({
    url: api + '/teacher/getTeacherVipClass',
    method: 'get',
    params: data
  })
}

// 获取教师试听课安排列表
export function findTeacherDemoGroups (data) {
  return request({
    url: api + '/demoGroup/findTeacherDemoGroups',
    method: 'get',
    params: data
  })
}

// 查询教师签到记录
export function getTeacherPersonalAttendances (data) {
  return request({
    url: api + '/teacherAttendance/getTeacherPersonalAttendances',
    method: 'get',
    params: data
  })
}

// 获取教师上课结算列表
export function teacherQueryCloses (data) {
  return request({
    url: api + '/teacher/queryCloses',
    method: 'get',
    params: data
  })
}

// 分页查询教师请假记录列表
export function teacherLeaveRecordQuery (data) {
  return request({
    url: api + '/teacherLeaveRecord/queryPage',
    method: 'get',
    params: data
  })
}

// 获取教师上课课酬未结算总额
export function sumTeacherNoPay (data) {
  return request({
    url: api + '/teacher/sumTeacherNoPay',
    method: 'get',
    params: data
  })
}

// 获取教师的vip课酬列表
export function vipGroupSalaryList (data) {
  return request({
    url: api + '/teacherDefaultVipGroupSalary/queryPageByTeacherId',
    method: 'get',
    params: data
  })
}

// 修改教师vip课酬
export function vipGroupSalarySet (data) {
  return request({
    url: api + '/teacherDefaultVipGroupSalary/upSet',
    method: 'post',
    data: data
  })
}

// 分页查询教师薪酬
export function teacherSalaryList (data) {
  return request({
    url: api + '/teacherDefaultMusicGroupSalary/queryPage',
    method: 'get',
    params: data
  })
}

// 批量新增、修改、删除教师乐团课薪酬
export function teacherSalaryBatchUpset (data) {
  return request({
    url: api + '/teacherDefaultMusicGroupSalary/batchUpset',
    method: 'post',
    data: data
  })
}

// 课酬调整
export function updateTeacherCoursesSalary (data) {
  return request({
    url: api + '/courseSchedule/updateTeacherCoursesSalary',
    method: 'post',
    data: qs.stringify(data)
  })
}

//获取教师vip课教学点
export function getTeachSchool (data) {
  return request({
    url: api + '/school/findVipSchoolByTeacher',
    method: 'get',
    params: data
  })
}

//新增教师
export function teacherAdd (data) {
  return request({
    url: api + '/teacher/add',
    method: 'post',
    data: qs.stringify(data)
  })
}

//修改教师信息
export function teacherUpdate (data) {
  return request({
    url: api + '/teacher/update',
    method: 'post',
    data: qs.stringify(data)
  })
}
// 根据科目id获取相应的老师
export function getTeacherBySubject (data) {
  return request({
    url: api + '/teacher/findOrganTeacherBySubject',
    method: 'get',
    params: data
  })
}
// 获取老师网管课信息 
export function teacherFreeTime (data) {
  return request({
    url: api + '/teacherFreeTime/query',
    method: 'get',
    params: data
  })
}

// 修改网管课信息 /teacherFreeTime/updateSet
export function resetTeacherFreeTime (data) {
  return request({
    url: api + '/teacherFreeTime/updateSet',
    method: 'post',
     data:qs.stringify(data)
  })
}

// 查询默认网管课课酬 teacherDefaultPracticeGroupSalary/queryByTeacherId
export function teacherDefaultPracticeGroupSalary (data) {
  return request({
    url: api + '/teacherDefaultPracticeGroupSalary/queryPageByTeacherId',
    method: 'get',
    params: data
  })
}

// 修改网管课课酬
export function PracticeGroupSalaryUpdate (data) {
  return request({
    url: api + '/teacherDefaultPracticeGroupSalary/update',
    method: 'post',
     data
  })
}