CourseScheduleService.java 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597
  1. package com.ym.mec.biz.service;
  2. import com.ym.mec.biz.dal.dto.*;
  3. import com.ym.mec.biz.dal.entity.CourseGenerateDto;
  4. import com.ym.mec.biz.dal.entity.CourseSchedule;
  5. import com.ym.mec.biz.dal.entity.CourseSchedule.CourseScheduleType;
  6. import com.ym.mec.biz.dal.entity.CourseScheduleComplaints;
  7. import com.ym.mec.biz.dal.enums.AuditStatusEnum;
  8. import com.ym.mec.biz.dal.enums.GroupType;
  9. import com.ym.mec.biz.dal.enums.TeachModeEnum;
  10. import com.ym.mec.biz.dal.enums.YesOrNoEnum;
  11. import com.ym.mec.biz.dal.page.CourseScheduleQueryInfo;
  12. import com.ym.mec.biz.dal.page.EndCourseScheduleQueryInfo;
  13. import com.ym.mec.biz.dal.page.StudentCourseScheduleRecordQueryInfo;
  14. import com.ym.mec.biz.dal.page.VipGroupQueryInfo;
  15. import com.ym.mec.common.page.PageInfo;
  16. import com.ym.mec.common.page.QueryInfo;
  17. import com.ym.mec.common.service.BaseService;
  18. import org.springframework.web.bind.annotation.RequestBody;
  19. import java.util.Date;
  20. import java.util.List;
  21. import java.util.Map;
  22. public interface CourseScheduleService extends BaseService<Long, CourseSchedule> {
  23. /**
  24. * @Author: Joburgess
  25. * @Date: 2019/9/10
  26. * 根据课程ID获取当前课程的信息
  27. */
  28. TeacherAttendanceDto getCurrentCourseDetail(Long courseID);
  29. /**
  30. * @describe 根据课程编号删除课程计划及对应的学生缴费、教师课酬记录、教师签到记录
  31. * @author Joburgess
  32. * @date 2019/10/31
  33. * @param courseScheduleIds: 课程计划编号列表
  34. * @return int
  35. */
  36. void batchDeleteCourseSchedules(List<Long> courseScheduleIds);
  37. void batchDeleteCourseSchedulesWithoutCheck(List<CourseSchedule> courseScheduleList);
  38. /**
  39. * @describe 删除乐团下所有未上的课时
  40. * @author Joburgess
  41. * @date 2019/11/16
  42. * @param musicGroupId:
  43. * @return void
  44. */
  45. void batchDeleteMusicGroupNotStartCourse(String musicGroupId,GroupType groupType);
  46. void batchDeleteMusicGroup(String musicGroupId,GroupType groupType);
  47. /**
  48. * @describe 删除指定乐团下指定状态的课程
  49. * @author Joburgess
  50. * @date 2019/11/26
  51. * @param musicGroupId: 乐团编号
  52. * @param userId: 用户编号
  53. * @param groupType: 乐团类型
  54. * @return void
  55. */
  56. void batchDeleteMusicGroupCourseWithStudent(String musicGroupId, Integer userId, GroupType groupType);
  57. /**
  58. * @describe 判断该课程是否只能进行正常签到
  59. * @author Joburgess
  60. * @date 2019/11/5
  61. * @param startClassTime: 课程开始时间
  62. * @param userId: 教师编号
  63. * @param checkSchool: 是否判断教学点
  64. * @param schoolId: 学校编号
  65. * @return com.ym.mec.biz.dal.enums.YesOrNoEnum
  66. */
  67. YesOrNoEnum enableOnlyNormalAttendance(Date startClassTime,Long userId,boolean checkSchool,Integer schoolId);
  68. /**
  69. * @describe 检测是否可以忽略正常签到时间限制
  70. * @author Joburgess
  71. * @date 2020.10.21
  72. * @param startClassTime: 当前课程开始时间
  73. * @param teacherId: 当前课程上课教师编号
  74. * @param schoolId:当前课程教学点编号
  75. * @return boolean
  76. */
  77. boolean enableIgnoreAttendanceTime(Date startClassTime, Integer teacherId, Integer schoolId);
  78. /**
  79. * 给班级加课
  80. * @param classGroupId 班级编号
  81. * @param coursesTimes 增加的课次
  82. * @param startDate 排课开始时间
  83. * @param startDate 排课结束时间
  84. * @param teachingArrangementList 教学安排(周几,几点-几点)
  85. * @param teachMode 教学模式
  86. * @param type 课程类型
  87. * @param schoolId 教学点
  88. * @param isJumpHoliday 是否跳过节假日
  89. * @return
  90. */
  91. boolean batchAddCourseSchedule(Integer classGroupId, int coursesTimes, Date startDate, Date groupEndDate, Date groupStartDate, List<CourseTimeDto> teachingArrangementList,
  92. TeachModeEnum teachMode, CourseScheduleType type, Integer schoolId, boolean isJumpHoliday);
  93. /**
  94. * 批量调整
  95. * @param batchInsertCoursesDto
  96. * @return
  97. */
  98. boolean batchUpdateCourseSchedule(BatchInsertCoursesDto batchInsertCoursesDto);
  99. /**
  100. * @Author: Joburgess
  101. * @Date: 2019/9/17
  102. * 批量插入课程计划
  103. */
  104. void batchAddCourseSchedule(List<CourseSchedule> courseSchedules);
  105. /**
  106. * @describe 创建乐团课课程计划
  107. * @author Joburgess
  108. * @date 2019/10/24
  109. * @param courseSchedules: 课程计划列表
  110. * @return void
  111. */
  112. void createCourseSchedules(CreateCourseScheduleDto createCourseScheduleDto);
  113. /**
  114. * @Author: Joburgess
  115. * @Date: 2019/9/17
  116. * 批量更新课程计划
  117. */
  118. void batchUpdateCourseSchedule(List<CourseSchedule> courseSchedules, String musicGroupID);
  119. /**
  120. * @Author: Joburgess
  121. * @Date: 2019/9/17
  122. * 根据日期获取当日排课信息
  123. */
  124. Map getStudentCourseSchedulesWithDate(Date classDate);
  125. /**
  126. * @Author: Joburgess
  127. * @Date: 2019/9/17
  128. * 根据日期获取当日排课信息
  129. */
  130. List<CourseScheduleDto> getTeacherCourseSchedulesWithDate(Integer userId, Date classDate, String type);
  131. /**
  132. * @describe 根据日期获取
  133. * @author Joburgess
  134. * @date 2019/12/26
  135. * @param userId:
  136. * @param classDate:
  137. * @return java.util.List<com.ym.mec.biz.dal.dto.CourseScheduleDto>
  138. */
  139. List<CourseScheduleDto> getTeacherHistoryCourseSchedulesWithDate(Integer userId, Date classDate);
  140. /**
  141. * @Author: Joburgess
  142. * @Date: 2019/9/17
  143. * 根据日期获取当日排课信息
  144. */
  145. PageInfo getCourseSchedulesWithDateByEdu(CourseScheduleQueryInfo queryInfo);
  146. /**
  147. * @Author: Joburgess
  148. * @Date: 2019/9/17
  149. * 根据月份获取乐团在该月有课的日期
  150. */
  151. List<Date> getCourseScheduleDateByMonth(Long musicGroupID, Date month);
  152. /**
  153. * @Author: Joburgess
  154. * @Date: 2019/9/17
  155. * 根据学生获取乐团在该月有课的日期
  156. */
  157. List<Date> getCourseScheduleDateByStudent(Date month, Integer isAttend);
  158. /**
  159. * @Author: Joburgess
  160. * @Date: 2019/9/17
  161. * 获取教师在该月有课的日期
  162. */
  163. List<Date> getCourseScheduleDateByTeacher(Date month, String type);
  164. /**
  165. * @describe
  166. * @author Joburgess
  167. * @date 2019/12/26
  168. * @param month:
  169. * @return java.util.List<java.util.Date>
  170. */
  171. List<Date> getHistoryCourseScheduleDateByTeacher(Integer userId,Date month);
  172. /**
  173. * @Author: Joburgess
  174. * @Date: 2019/10/11
  175. * @params [month]
  176. * @return java.util.List<java.util.Date>
  177. * @describe 获取
  178. */
  179. List<Date> getCourseScheduleDates(Date month, String organIdList, String type);
  180. /**
  181. * @describe 课程调整
  182. * @author Joburgess
  183. * @date 2019/11/7
  184. * @param newCourseSchedules: 课程计划列表
  185. * @return void
  186. */
  187. void courseAdjust(List<CourseSchedule> newCourseSchedules);
  188. /**
  189. * @Author: Joburgess
  190. * @Date: 2019/9/23
  191. * 课时调整
  192. */
  193. void classStartDateAdjust(List<CourseSchedule> newCourseSchedules);
  194. /**
  195. * @describe 小课课程批量调整
  196. * @author Joburgess
  197. * @date 2019/12/11
  198. * @param vipGroupCourseAdjustInfo: 调整信息
  199. * @return void
  200. */
  201. void vipCourseAdjust(VipGroupCourseAdjustInfoDto vipGroupCourseAdjustInfo);
  202. /**
  203. * @describe 课程顺延
  204. * @author Joburgess
  205. * @date 2020/1/2
  206. * @param coursePostPoneInfo:
  207. * @return void
  208. */
  209. void coursePostpone(CoursePostponeDto coursePostPoneInfo);
  210. /**
  211. * @describe vip课批量新增-后端处理
  212. * @author Joburgess
  213. * @date 2019/12/12
  214. * @param vipGroupCourseAdjustInfoDto: 加课信息
  215. * @return void
  216. */
  217. void batchAppendVipGroupCourses(VipGroupCourseAdjustInfoDto vipGroupCourseAdjustInfoDto);
  218. /**
  219. * @Author: Joburgess
  220. * @Date: 2019/9/24
  221. * 课程交换
  222. */
  223. void courseSwap(Long courseScheduleId1, Long courseScheduleId2);
  224. /**
  225. * @Author: Joburgess
  226. * @Date: 2019/10/14
  227. * @params [day1, day2]
  228. * @return void
  229. * @describe 对调两天的课程
  230. */
  231. void courseSwapWithDay(Date day1, Date day2);
  232. /**
  233. * @describe 课程时间调整
  234. * @author Joburgess
  235. * @date 2020.09.09
  236. * @param courseSchedules:
  237. * @return
  238. */
  239. void courseAdjustOnlyWithClassDate(@RequestBody List<CourseSchedule> courseSchedules, Integer operatorId);
  240. /**
  241. * @describe 课程时间调整
  242. * @author Joburgess
  243. * @date 2020.09.0
  244. * @return void
  245. */
  246. Map<String, List<CourseSchedule>> courseAdjustOnlyWithClassDateCheck(VipGroupCourseAdjustInfoDto courseAdjustInfo);
  247. /**
  248. * @describe 单节课程冲突检测及时间校正
  249. * @author Joburgess
  250. * @date 2020.09.09
  251. * @param courseSchedule:
  252. * @return void
  253. */
  254. boolean checkSingleCourseConflict(CourseSchedule courseSchedule, List<CourseSchedule> adjustCourses, Map<String, List<CourseSchedule>> result);
  255. /**
  256. * @describe 课程时间校正,将冲突课程的时间校正到当天空闲时间段
  257. * @author Joburgess
  258. * @date 2020.09.09
  259. * @param courseSchedule:
  260. * @param sameDayCourses:
  261. * @return void
  262. */
  263. boolean courseTimeRevise(CourseSchedule courseSchedule, List<CourseSchedule> sameDayCourses);
  264. /**
  265. * @describe 检测数据库不存在的课程是否存在错误
  266. * @author Joburgess
  267. * @date 2019/10/31
  268. * @param courseSchedules: 课程列表
  269. * @return void
  270. */
  271. void checkNewCourseSchedules(List<CourseSchedule> courseSchedules,boolean checkExistCourseSchedule);
  272. void checkNewCourseSchedulesWithoutMusicGroup(List<CourseSchedule> courseSchedules,boolean checkExistCourseSchedule);
  273. /**
  274. * @describe 临时课检测
  275. * @author 周剑河
  276. * @date 2019/12/6
  277. * @param courseSchedules: 课程计划列表
  278. * @return void
  279. */
  280. List<Long> checkSnapCourseShchedules(List<CourseSchedule> courseSchedules);
  281. /**
  282. * @describe
  283. * @author Joburgess
  284. * @date 2019/12/23
  285. * @param courseSchedules: 生成课程名称
  286. * @return void
  287. */
  288. void createCourseScheduleName(List<CourseSchedule> courseSchedules);
  289. /**
  290. * 获取乐团班级未开始的课程
  291. *
  292. * @param classGroupIds
  293. * @param groupType
  294. * @return
  295. */
  296. List<CourseSchedule> findClassGroupNoStartCourseSchedules(List<Integer> classGroupIds, GroupType groupType);
  297. /**
  298. * @Author: Joburgess
  299. * @Date: 2019/9/30
  300. * 获取学生上课记录
  301. */
  302. Object findStudentCourseScheduleRecords(StudentCourseScheduleRecordQueryInfo queryInfo);
  303. /**
  304. * @Author: Joburgess
  305. * @Date: 2019/10/3
  306. * @params [courseScheduleComplaints]
  307. * @return void
  308. * @describe 课程投诉
  309. */
  310. void courseScheduleCommplaint(CourseScheduleComplaints courseScheduleComplaints);
  311. /**
  312. * @Author: Joburgess
  313. * @Date: 2019/10/3
  314. * @params [id] 申诉编号
  315. * @params [teacherLiabilityRatio] 老师责任比
  316. * @params [studentLiabilityRatio] 学生责任比
  317. * @params [status] 审批状态
  318. * @return void
  319. * @describe 课程投诉审核
  320. */
  321. void courseScheduleCommplaintAudit(Long id, Double teacherLiabilityRatio, Double studentLiabilityRatio, AuditStatusEnum status);
  322. /**
  323. * 更新课程至结束状态
  324. * @return
  325. */
  326. boolean updateCourseScheduleToOverStatus();
  327. /**
  328. * 更新课程至进行中状态
  329. * @return
  330. */
  331. boolean updateCourseScheduleToUnderway();
  332. /**
  333. * @describe 获取老师指定班级的排课
  334. * @author Joburgess
  335. * @date 2019/10/18
  336. * @param queryInfo: 参数
  337. * @return com.ym.mec.common.page.PageInfo
  338. */
  339. PageInfo queryTeacherClassCourseSchedule(CourseScheduleQueryInfo queryInfo);
  340. PageInfo queryTeacherVipClassCourseSchedule(CourseScheduleQueryInfo queryInfo);
  341. /**
  342. * @describe 获取点名详情界面头部信息
  343. * @author Joburgess
  344. * @date 2019/10/24
  345. * @param courseScheduleId: 课程编号
  346. * @return com.ym.mec.biz.dal.dto.CourseAttendanceDetailHeadInfoDto
  347. */
  348. CourseAttendanceDetailHeadInfoDto findCourseAttendanceDetailHeadInfo(Long courseScheduleId);
  349. /**
  350. * @describe 检测指定乐团下所有班级是否已排课
  351. * @author Joburgess
  352. * @date 2019/10/18
  353. * @param musicGroupId: 乐团编号
  354. * @return void
  355. */
  356. void checkMusicGroupClassCourse(String musicGroupId);
  357. /**
  358. * @describe 根据课程计划编号获取当前课次
  359. * @author Joburgess
  360. * @date 2019/10/20
  361. * @param courseSchedules:
  362. * @return java.util.Map<java.lang.Integer,java.lang.Integer>
  363. */
  364. Map<Integer, Integer> findCourseScheduleCurrentTimes(List<Integer> courseSchedules);
  365. /**
  366. * 查询班级未开始的课程
  367. *
  368. * @param classGroupId
  369. * @return
  370. */
  371. List<CourseSchedule> findNoStartCoursesByClassGroupId(Integer classGroupId);
  372. /**
  373. * 学生有课提醒
  374. * @return
  375. */
  376. void studentCoursesScheduleRemind();
  377. /**
  378. * 学生上课提醒
  379. */
  380. void studentSignInRemind();
  381. /**
  382. * 老师课程提醒
  383. */
  384. void teacherCoursesScheduleRemind();
  385. /**
  386. * 老师上课提醒
  387. */
  388. void teacherSignInRemind();
  389. /**
  390. * @describe 获取班级的课程计划
  391. * @author Joburgess
  392. * @date 2019/11/5
  393. * @param classGroupId: 班级编号
  394. * @return java.util.List<com.ym.mec.biz.dal.entity.CourseSchedule>
  395. */
  396. List<CourseSchedule> findCourseScheduleByClassGroup(Integer classGroupId);
  397. /**
  398. * @describe
  399. * @author Joburgess
  400. * @date 2019/11/14
  401. * @param queryInfo:
  402. * @return com.ym.mec.common.page.PageInfo
  403. */
  404. Object findVipGroupCourseSchedules(VipGroupQueryInfo queryInfo);
  405. /**
  406. * @describe 根据参数生成课程计划日期
  407. * @author Joburgess
  408. * @date 2019/12/23
  409. * @param courseGenerateDto: 排课信息
  410. * @return java.util.List<com.ym.mec.biz.dal.entity.CourseSchedule>
  411. */
  412. List<CourseSchedule> createCourses(CourseGenerateDto courseGenerateDto, boolean excludePastCourse);
  413. /**
  414. * @describe 终极课表获取接口
  415. * @author Joburgess
  416. * @date 2019/12/27
  417. * @param queryInfo: 查询条件
  418. * @return java.util.List<com.ym.mec.biz.dal.dto.CourseScheduleEndDto>
  419. */
  420. PageInfo<CourseScheduleEndDto> endFindCourseSchedules(EndCourseScheduleQueryInfo queryInfo);
  421. /**
  422. * @describe 陪练课程调整
  423. * @author Joburgess
  424. * @date 2020/2/9
  425. * @param courseSchedule:
  426. * @return void
  427. */
  428. void practiceCourseAdjust(CourseSchedule courseSchedule);
  429. /**
  430. * 陪练课老师调整
  431. * @param courseScheduleId
  432. * @param teacherId
  433. */
  434. void practiceCourseTeacherAdjust(Long courseScheduleId,Integer teacherId);
  435. /**
  436. * 陪练课课程组老师调整
  437. * @param practiceGroupId
  438. * @param teacherId
  439. */
  440. void practiceGroupTeacherAdjust(String practiceGroupId, Integer teacherId, Integer subjectId, Integer educationalTeacherId);
  441. /**
  442. * 清空老师和学生考勤
  443. * @param courseScheduleIds
  444. */
  445. void cleanAttendance(String courseScheduleIds);
  446. /**
  447. * 教师端中间页课程评价数据获取
  448. * @param courseScheduleId
  449. * @return
  450. */
  451. Object teacherCourseRemarkInfo(Long courseScheduleId);
  452. /**
  453. * 教师端中间页课程评价数据提交
  454. * @param teacherRemarkCommitDto
  455. * @return
  456. */
  457. void teacherCourseRemarkCommit(TeacherRemarkCommitDto teacherRemarkCommitDto);
  458. /**
  459. * 教师端中间页网络教室头部详情
  460. * @param courseScheduleId
  461. * @return
  462. */
  463. Object teacherCourseHeadInfo(Long courseScheduleId);
  464. /**
  465. * 教师端中间页网络教室课程进度列表
  466. * @param courseScheduleId
  467. * @return
  468. */
  469. Object teacherCourseRates(Long courseScheduleId);
  470. /**
  471. * 根据课程组获取课程组老师信息
  472. * @param groupType
  473. * @param groupId
  474. * @return
  475. */
  476. Object getTeacherCourseHeadInfo(GroupType groupType,String groupId,Long courseScheduleId);
  477. /**
  478. * 根据课程组获取课表信息
  479. * @param groupType
  480. * @param groupId
  481. * @return
  482. */
  483. Object queryCourseInfoByGroupId(GroupType groupType, String groupId);
  484. /**
  485. * 教师课时使用记录列表
  486. * @return
  487. */
  488. Object teacherCourseMinutes(QueryInfo queryInfo);
  489. /**
  490. * 修改课程组有效期
  491. * @param practiceGroupId
  492. * @param coursesExpireDate
  493. */
  494. void updateCoursesExpireDate(String practiceGroupId, Date coursesExpireDate);
  495. /**
  496. * 获取当前班级列表的所有未开始的课程
  497. * @param classGroupIds
  498. * @param teacherId
  499. * @param teacherRole
  500. * @return
  501. */
  502. List<CourseSchedule> queryNoStartCourseByTeacherId(String classGroupIds, Integer teacherId, String teacherRole);
  503. /**
  504. * 根据班级列表调整课程
  505. * @param classGroupIds
  506. * @param teacherId
  507. * @param targetTeacherId
  508. */
  509. void classGroupTeacherAdjust(String classGroupIds, Integer teacherId, Integer targetTeacherId);
  510. /**
  511. * 网管课批量调整
  512. * @param practiceGroupId
  513. * @param teacherId
  514. * @param subjectId
  515. * @param educationalTeacherId
  516. */
  517. void batchPracticeGroupTeacherAdjust(String practiceGroupId, Integer teacherId, Integer subjectId, Integer educationalTeacherId,Integer oldTeacherId);
  518. }