CourseScheduleService.java 15 KB

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