import request from '@/utils/request'
import qs from 'qs'
let api = '/api-web'
// 获取分部
export function getSection (data) {
  return request({
    url: api + '/organization/queryPage',
    method: 'get',
    params: data
  })
}
// 获取收费类型
export function getType (data) {
  return request({
    url: api + '/chargeType/queryPage',
    method: 'get',
    params: data
  })
}
// 获取合作单位
export function getCooperation (data) {
  return request({
    url: api + '/cooperationOrgan/queryPage',
    method: 'get',
    params: data
  })
}
// 获取教学地点
export function getAddress (data) {
  return request({
    url: api + '/school/queryPage',
    method: 'get',
    params: data
  })
}
// 获取所有老师信息
export function getTeacher (data) {
  return request({
    url: api + '/teacher/findTeachers',
    method: 'get',
    params: data
  })
}

// 获取所有声部集合
export function getSubject (data) {
  return request({
    url: api + '/subject/findSubSubjects',
    method: 'get',
    params: data
  })
}
// 查询付费主体
export function getPayMaster (data) {
  return request({
    url: api + '/musicGroupPaymentEntities/queryPage',
    method: 'get',
    params: data

  })
}

// 根据收费类型获取默认科目
export function getDefaultSubject (data) {
  return request({
    url: api + '/subject/findDefaultSubByChargeTypeId',
    method: 'get',
    params: data
  })
}

// 根据科目编号查询商品或辅件
//
export function getGoods (data) {
  return request({
    url: api + '/goods/queryGoodsBySubId',
    method: 'get',
    params: data
  })
}
// 创建乐团
export function createTeam (data) {
  return request({
    url: api + '/musicGroup/createGroup',
    method: 'post',
    data
  })
}

// 查询乐团招生情况
export function getTeamRecruit (data) {
  return request({
    url: api + `/musicGroupSubjectPlan/getMusicSubjectClass`,
    method: 'get',
    params: data

  })
}

// 获取乐团单技班
export function getSingleClass (data) {
  return request({
    url: api + '/classGroup/findMusicGroupClass',
    method: 'get',
    params: data

  })
}

// 获取学生列表
export function getStudentList (data) {
  return request({
    url: api + '/studentRegistration/queryStudentApplyDetail',
    method: 'get',
    params: data

  })
}

// 分页查询收费类型
export function getPayStatus (data) {
  return request({
    url: api + '/chargeType/queryPage',
    method: 'get',
    params: data

  })
}

// 根据乐团id查询未分班的学生(根据多声部)
export function getNoClassStudent (data) {
  return request({
    url: api + '/studentRegistration/getNoClassStu',
    method: 'get',
    params: data

  })
}
// 根据乐团id查询未分班的学生(所有或单声部)
export function getNoClassStudentAll (data) {
  return request({
    url: api + '/studentRegistration/getMusicGroupNoClassStu',
    method: 'get',
    params: data

  })
}
// 新增单技课班
export function addSingleClass (data) {
  return request({
    url: api + '/classGroup/add',
    method: 'post',
    data

  })
}

// 删除单技课班
export function removeSingleClass (data) {
  return request({
    url: api + '/classGroup/delSingle',
    method: 'post',
    data: qs.stringify(data)

  })
}

// 获取未分班的单技班
export function findNoClassSingle (data) {
  return request({
    url: api + '/classGroup/findNoClassSubjects',
    method: 'get',
    params: data

  })
}
// 添加合奏班
export function addAllClass (data) {
  return request({
    url: api + '/classGroup/addMixClass',
    method: 'post',
    data: qs.stringify(data)

  })
}

// 获取所有合奏班列表
export function getAllClass (data) {
  return request({
    url: api + '/classGroup/findMixMusicGroupClass',
    method: 'get',
    params: data

  })
}

// 删除合奏班

export function removeAllClass (data) {
  return request({
    url: api + '/classGroup/delMix',
    method: 'post',
    data: qs.stringify(data)

  })
}

// 确认是否所有学生和单技能班都被分配完成
export function checkAllStudent (data) {
  return request({
    url: api + '/classGroup/addMusicGroupTeam',
    method: 'POST',
    data: qs.stringify(data)

  })
}


// 获取乐团所有班级以及老师信息
export function getEveryClass (data) {
  return request({
    url: api + '/classGroup/findMusicGroupClassTeacher',
    method: 'get',
    params: data
  })
}

// 设置乐团老师

export function setTeamTeacher (data) {
  return request({
    url: api + '/classGroup/addClassGroupTeacher',
    method: 'post',
    data
  })
}

// // 获取所有的节假日 
// export function getHolidays (data) {
//   return request({
//     url: '/jiari/',
//     method: 'post',
//     data: qs.stringify(data)
//   })
// }

// 根据合奏班获取合奏班下的所有单技能班

export function getAllSignClass (data) {
  return request({
    url: api + '/classGroup/findClassGroupAboutMix',
    method: 'get',
    params: data
  })
}

// 根据合奏班id获取单技班以及老师
export function getAllSignClassandTeacher (data) {
  return request({
    url: api + '/classGroup/classGroupAndTeacher',
    method: 'get',
    params: data
  })
}

// 乐团课排课
export function workOut (data) {
  return request({
    url: api + '/courseSchedule/batchAddCourseSchedule',
    method: 'post',
    data
  })
}

// 获取声部二级分类api +  /subject/queryPageTree
export function getSoundTree (data) {
  return request({
    url: api + '/subject/queryPageTree',
    method: 'get',
    params: data
  })
}

// 根据乐团id获取乐团声部
export function findSound (data) {
  return request({
    url: api + '/subject/querySubByMusicGroupId',
    method: 'get',
    params: data
  })
}

// 根据乐团id获取乐团老师

export function findMusicGroupClassTeacher (data) {
  return request({
    url: api + '/teacher/findMusicGroupTeachers',
    method: 'get',
    params: data
  })
}


// 乐团所有班级都排课
export function checkCourse (data) {
  return request({
    url: api + '/courseSchedule/checkMusicGroupClassCourse',
    method: 'post',
    data: qs.stringify(data)
  })
}

// 根据乐团id查询乐团
//api +  /musicGroup/get/{id}
export function getTeamDetail (data) {
  return request({
    url: api + `/musicGroup/get/`,
    method: 'get',
    params: data
  })
}

// 新增基础技能班
export function addHighClass (data) {
  return request({
    url: api + `/classGroup/addHighClass`,
    method: 'POST',
    data
  })
}
// 获取老师默认课酬表
export function findMusicGroupClassTeacherSalary (data) {
  return request({
    url: api + `/classGroup/findMusicGroupClassTeacherSalary`,
    method: 'GET',
    params: data
  })
}

// 老师课酬确认
export function setClassGroupTeacherSalary (data) {
  return request({
    url: api + `/classGroup/setClassGroupTeacherSalary`,
    method: 'post',
    data
  })
}

// 根据乐团id查询乐团详情
export function getMusicGroup (data) {
  return request({
    url: api + `/musicGroup/get`,
    method: 'get',
    params: data
  })
}

// 根据乐团id获取乐团流程
export function getMusicGroupProcess (data) {
  return request({
    url: api + `/recharge/findAll`,
    method: 'get',
    params: data
  })
}

// 乐团管理 老师列表
export function getTeamTeacherList (data) {
  return request({
    url: api + `/teacher/queryMusicGroupTeachers`,
    method: 'get',
    params: data
  })
}

// 获取乐团报名信息
export function getintoClass (data) {
  return request({
    url: api + `/subject/findSubApplyDetail`,
    method: 'get',
    params: data
  })
}

// 根据乐团id获取老师上课记录
export function getTeacheerRecord (data) {
  return request({
    url: api + `/teacher/queryTeacherAttendance`,
    method: 'get',
    params: data
  })
}

// 根据乐团id获取学员列表
export function getTeamStudentList (data) {
  return request({
    url: api + `/studentManage/queryMusicGroupStudent`,
    method: 'get',
    params: data
  })
}

// 根据乐团id获取学生列表汇总数据
export function getTeamStudentInfo (data) {
  return request({
    url: api + `/studentManage/musicGroupStudentsSum`,
    method: 'get',
    params: data
  })
}

// 学生退团
export function StudentQuit (data) {
  return request({
    url: api + `/musicGroupQuit/directQuitMusicGroup`,
    method: 'post',
    data: qs.stringify(data)
  })
}


// 班级详情列表
export function getClassList (data) {
  return request({
    url: api + `/classGroup/queryMusicGroupClassGroup`,
    method: 'get',
    params: data
  })
}

// 获取乐团课表详情
export function getCourseList (data) {
  return request({
    url: api + `/classGroup/queryMusicGroupCourseSchedule`,
    method: 'get',
    params: data
  })
}

// 获取乐团课表详情新接口
export function getCourseSchedule (data) {
  return request({
    url: api + `/classGroup/queryMusicGroupCourseScheduleDetail`,
    method: 'get',
    params: data
  })
}

// 终极课表获取
export function superFindCourseSchedules (data) {
  return request({
    url: api + `/courseSchedule/superFindCourseSchedules`,
    method: 'get',
    params: data
  })
}

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

// 课时调整 批量
export function batchAdjustment (data) {
  return request({
    url: api + `/courseSchedule/batchClassStartDateAdjust`,
    method: 'post',
    data
  })
}
// 课时调整-批量

// 根据乐团id 和声部id获取学生列表
export function teamSoundStudent (data) {
  return request({
    url: api + `/studentRegistration/getMusicGroupStu`,
    method: 'get',
    params: data
  })
}

// 通过乐团编号获取乐团基本信息
export function getTeamBaseInfo (data) {
  return request({
    url: api + `/musicGroup/findMusicGroupBasicInfo`,
    method: 'POST',
    data: qs.stringify(data)
  })
}

// 修改乐团基本信息
export function resetTeamBaseInfo (data) {
  return request({
    url: api + `/musicGroup/update`,
    method: 'POST',
    data
  })
}

// 开启乐团缴费功能
export function musicGroupOpenPay (data) {
  return request({
    url: api + `/musicGroup/openPay`,
    method: 'POST',
    data: qs.stringify(data)
  })
}

// 开启缴费(单独学生)
export function openPayment (data) {
  return request({
    url: api + `/studentRegistration/openPayment`,
    method: 'POST',
    data: qs.stringify(data)
  })
}

// 发放清单
export function getTeamDetailList (data) {
  return request({
    url: api + `/order/getMusicalList`,
    method: 'get',
    params: data
  })
}

// 基础技能班详情   data: qs.stringify(data),
export function highClassGroups (data) {
  return request({
    url: api + `/classGroup/highClassGroups`,
    method: 'get',
    params: data
  })
}

// 基础技能班调整
export function resetHighClass (data) {
  return request({
    url: api + `/classGroupStudent/adjustClassGroup`,
    method: 'POST',
    data: qs.stringify(data)
  })
}

// 确认开团
export function musicGroupFound (data) {
  return request({
    url: api + `/musicGroup/found`,
    method: 'POST',
    data: qs.stringify(data)
  })
}

// 延长缴费
export function extensionPayment (data) {
  return request({
    url: api + `/musicGroup/extensionPayment`,
    method: 'POST',
    data: qs.stringify(data)
  })
}

// 班级临时调整
export function revisionClassGroup (data) {
  return request({
    url: api + `/classGroup/revisionClassGroup`,
    method: 'POST',
    data
  })
}

// 班级调整新增班级
export function revisionAddClassGroup (data) {
  return request({
    url: api + `/classGroup/revisionAddClassGroup`,
    method: 'POST',
    data
  })
}
// 恢复乐团
export function resumeMusicGroup (data) {
  return request({
    url: api + `/musicGroup/resumeMusicGroup`,
    method: 'POST',
    data: qs.stringify(data)
  })
}

// 暂停乐团
export function pauseMusicGroup (data) {
  return request({
    url: api + `/musicGroup/pauseMusicGroup`,
    method: 'POST',
    data: qs.stringify(data)
  })
}

// 取消乐团
export function cancelMusicGroup (data) {
  return request({
    url: api + `/musicGroup/cancelMusicGroup`,
    method: 'POST',
    data: qs.stringify(data)
  })
}


// 修改乐团招生计划
export function resetPlanNum (data) {
  return request({
    url: api + `/musicGroup/updateExpectedStudentNum`,
    method: 'POST',
    data
  })
}

// 获取乐团声部设置信息
export function findMusicGroupSubjectInfo (data) {
  return request({
    url: api + `/musicGroup/findMusicGroupSubjectInfo`,
    method: 'get',
    params: data
  })
}

// 修改乐团声部信息
export function updateSubjectInfo (data) {
  return request({
    url: api + `/musicGroup/updateSubjectInfo`,
    method: 'POST',
    data
  })
}

// 修改乐团费用设置
export function resetSubjectPlan (data) {
  return request({
    url: api + `/musicGroupSubjectPlan/batchUpdateFee`,
    method: 'POST',
    data
  })
}

// 审批通过
export function auditSuccess (data) {
  return request({
    url: api + `/musicGroup/auditSuccess`,
    method: 'POST',
    data: qs.stringify(data)
  })
}

// 拒绝审批 /musicGroup/auditFailed
export function auditFailed (data) {
  return request({
    url: api + `/musicGroup/auditFailed`,
    method: 'POST',
    data: qs.stringify(data)
  })
}

// 开启乐团
export function startTeam (data) {
  return request({
    url: api + `/musicGroup/action`,
    method: 'POST',
    data: qs.stringify(data)
  })
}

// 根据班级id获取课程计划
export function getClassCOurse (data) {
  return request({
    url: api + `/courseSchedule/findCourseScheduleByClassGroup`,
    method: 'get',
    params: data
  })
}

// 获取员工所有的分部列表
export function getEmployeeOrgan (data) {
  return request({
    url: api + `/organization/queryEmployeeOrgan`,
    method: 'get',
    params: data
  })
}

// 
export function pushMessage (data) {
  return request({
    url: api + '/musicGroup/pushMessage',
    method: 'post',
    data: qs.stringify(data)
  })
}

// 课酬调整
export function getTeacherSalary (data) {
  return request({
    url: api + `/courseSchedule/queryTeacherSalary`,
    method: 'get',
    params: data
  })
}

// 获取购买方式
export function findSubjectPlan (data) {
  return request({
    url: api + `/musicGroupSubjectPlan/findSubjectPlan`,
    method: 'post',
    data: qs.stringify(data)
  })
}

// 根据部门id获取部门下的员工
//删除乐团所有未上课时 
export function deteleAllCourse (data) {
  return request({
    url: api + `/courseSchedule/batchDeleteMusicGroupNotStartCourse`,
    method: 'get',
    params: data
  })
}

// 修改密码
export function resetPassword (data) {
  return request({
    url: `/api-auth/user/updatePassword`,
    method: 'POST',
    data: qs.stringify(data)
  })
}
// 管理员修改密码
export function resetPassword2 (data) {
  return request({
    url: `/api-auth/user/updatePassword2`,
    method: 'POST',
    data: qs.stringify(data)
  })
}

// 查询是否设置课酬 checkSetSalary
export function checkSetSalary (data) {
  return request({
    url: api + `/classGroup/checkSetSalary`,
    method: 'GET',
    params: data
  })
}

// 获取节假日 
export function getHoliday (data) {
  return request({
    url: api + `/classGroupStudent/queryHoliday`,
    method: 'GET',
    params: data
  })
}

// 获取乐团(声部)的(没有某种班级类型)学生
export function getMusicGroupStuNoClassType (data) {
  return request({
    url: api + `/studentRegistration/getMusicGroupStuNoClassType`,
    method: 'GET',
    params: data
  })
}

// 调整班级(调整老师，重排课)
export function classGroupUpdate (data) {
  return request({
    url: api + `/classGroup/classGroupUpdate`,
    method: 'POST',
    data
  })
}

//  获取乐团下所有的班级
export function getMusicGroupAllClass (data) {
  return request({
    url: api + `/classGroup/findAllClassGroupByMusicGroup`,
    method: 'get',
    params: data
  })
}

// 乐团【报名中、缴费中】 学生详情列表导出
export function studentApplyDetailExport (data) {
  return request({
    // url: api + '/studentRegistration/queryStudentApplyDetailExport',
    url: api + '/export/studentApplyDetailExport',
    method: 'post',
    data: qs.stringify(data)
  })
}

// 清空班级课表 classGroup/delClassNoStartCourse
export function clearClassCourse (data) {
  return request({
    url: api + '/classGroup/delClassNoStartCourse',
    method: 'post',
    data: qs.stringify(data)
  })
}

// 课程顺延
export function coursePostpone (data) {
  return request({
    url: api + '/courseSchedule/coursePostpone',
    method: 'post',
    data: qs.stringify(data)
  })
}

// 锁定学生
export function StudentFeeIsLock (data) {
  return request({
    url: api + '/studentManage/updateStudentFeeIsLock',
    method: 'post',
    data: qs.stringify(data)
  })
}

// 修改学生缴费周期
export function updateStudentFee (data) {
  return request({
    url: api + '/studentManage/updateStudentFee',
    method: 'post',
    data: qs.stringify(data)
  })
}
// -----[-]
// 获取学员签到列表
export function findStudentAttendance (data) {
  return request({
    url: api + '/studentAttendance/findStudentAttendance',
    method: 'get',
    params: data
  })
}

// 获取签到信息
export function sumStudentAttendance (data) {
  return request({
    url: api + '/studentManage/sumStudentAttendance',
    method: 'get',
    params: data
  })
}
// 获取签到经纬度
export function getTeacherPersonalAttendance (data) {
  return request({
    url: api + '/teacherAttendance/getTeacherPersonalAttendance',
    method: 'get',
    params: data
  })
}

// 获取作业列表
export function findStudentCourseHomeworks (data) {
  return request({
    url: api + '/studentManage/findStudentCourseHomeworks',
    method: 'get',
    params: data
  })
}

// 运营预警列表
export function teacherCourseStatistics (data) {
  return request({
    url: api + '/teacherCourseStatistics/queryPage',
    method: 'get',
    params: data
  })
}

// 老师布置的作业
export function getCourseScheduleHomework (data) {
  return request({
    url: api + '/teacher/getCourseScheduleHomework',
    method: 'get',
    params: data
  })
}

// 修改考勤状态
export function updateTeacherAttendance(data) {
  return request({
    url: api + '/teacherAttendance/updateTeacherAttendance',
    method: 'post',
    data: qs.stringify(data)
  })
}

// 点名列表
export function findAttendanceStudentByCourseWithPage (data) {
  return request({
    url: api + '/studentAttendance/findAttendanceStudentByCourseWithPage',
    method: 'get',
    params: data
  })
}

// 更新学生签到记录
export function updateStudentAttendances (data) {
  return request({
    url: api + '/studentAttendance/updateStudentAttendances',
    method: 'post',
    data: data
  })
}

// 获取网管课列表
export function practiceGroupManage (data) {
  return request({
    url: api + '/practiceGroupManage/queryAll',
    method: 'get',
    params: data
  })
}

// 获取网管课程组
export function findPracticeGroupCourseSchedules(data) {
  return request({
    url: api + '/practiceGroupManage/findPracticeGroupCourseSchedules',
    method: 'get',
    params: data
  })
}

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

// 网管课程组老师修改
export function practiceGroupTeacherAdjust(data) {
  return request({
    url: api + '/courseSchedule/practiceGroupTeacherAdjust',
    method: 'post',
    data: qs.stringify(data)
  })
}
// 网管课老师修改
export function practiceCourseTeacherAdjust(data) {
  return request({
    url: api + '/courseSchedule/practiceCourseTeacherAdjust',
    method: 'post',
    data: qs.stringify(data)
  })
}

// 清除考情记录
export function cleanAttendance(data) {
  return request({
    url: api + '/courseSchedule/cleanAttendance',
    method: 'post',
    data: qs.stringify(data)
  })
}

// 批量加网管课  
export function batchAddCourses(data) {
  return request({
    url: api + '/courseSchedule/batchAddCourses',
    method: 'post',
    data
  })
}

// 关闭网管课 课程组
export function cancelGroup(data) {
  return request({
    url: api + '/practiceGroupManage/cancelGroup',
    method: 'post',
    data:qs.stringify(data)
  })
}

// 获取网管课可预约声部 getPracticeApplySubjects
export function getPracticeApplySubjects(data) {
  return request({
    url: api + '/practiceGroupManage/getPracticeApplySubjects',
    method: 'get',
    params: data
  })
}

// 网管课批量调整
export function batchUpdateCourseSchedule(data) {
  return request({
    url: api + '/courseSchedule/batchUpdateCourseSchedule',
    method: 'post',
    data
  })
}

// 评论管理
export function getReviews(data) { 
  return request({
    url: api + '/practiceGroupManage/getReviews',
    method: 'get',
    params: data
  })
}

// 评论详情 列表
export function getGroupReviews(data) { 
  return request({
    url: api + '/practiceGroupManage/getGroupReviews',
    method: 'get',
    params: data
  })
}
//  评论详情 
export function getReviewsInfo(data) { 
  return request({
    url: api + '/practiceGroupManage/getReviewsInfo',
    method: 'get',
    params: data
  })
}

// 获取所有教务老师
export function findEducationUsers(data) { 
  return request({
    url: api + '/employee/findEducationUsers',
    method: 'get',
    params: data
  })
}

// 获取网管评论列表
export function getPracticeGroup(data) { 
  return request({
    url: api + '/courseReview/getPracticeGroup',
    method: 'get',
    params: data
  })
}

// 网管课评价详情
export function getReviewInfo(data) { 
  return request({
    url: api + '/courseReview/getReviewInfo',
    method: 'get',
    params: data
  })
}

// 教务评价详情 /eduCourseReview/getReviewInfo
export function updateReviewInfo(data) { 
  return request({
    url: api + '/eduCourseReview/updateReviewInfo',
    method: 'get',
    params: data
  })
}

// 获取老师和学生的评价 courseReview/getStuAndTeaReview
export function getStuAndTeaReview(data) { 
  return request({
    url: api + '/courseReview/getStuAndTeaReview',
    method: 'get',
    params: data
  })
}

