StudentRegistrationService.java 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461
  1. package com.ym.mec.biz.service;
  2. import java.io.IOException;
  3. import java.math.BigDecimal;
  4. import java.util.List;
  5. import java.util.Map;
  6. import com.ym.mec.biz.dal.dto.NoClassMusicStudentDto;
  7. import com.ym.mec.biz.dal.dto.PageInfoReg;
  8. import com.ym.mec.biz.dal.dto.RegisterDto;
  9. import com.ym.mec.biz.dal.dto.StudentAddDto;
  10. import com.ym.mec.biz.dal.dto.StudentApplyDetailDto;
  11. import com.ym.mec.biz.dal.dto.StudentInfo;
  12. import com.ym.mec.biz.dal.dto.StudentMusicDetailDto;
  13. import com.ym.mec.biz.dal.dto.StudentMusicGroupDto;
  14. import com.ym.mec.biz.dal.dto.StudentRegisterInstrumentsDetailDto;
  15. import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalenderCourseSettings;
  16. import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalenderStudentDetail;
  17. import com.ym.mec.biz.dal.entity.MusicGroupSubjectGoodsGroup;
  18. import com.ym.mec.biz.dal.entity.MusicGroupSubjectPlan;
  19. import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
  20. import com.ym.mec.biz.dal.entity.StudentPaymentOrderDetail;
  21. import com.ym.mec.biz.dal.entity.StudentRegistration;
  22. import com.ym.mec.biz.dal.entity.Subject;
  23. import com.ym.mec.biz.dal.enums.ClassGroupTypeEnum;
  24. import com.ym.mec.biz.dal.page.MusicGroupRecordStudentQueryInfo;
  25. import com.ym.mec.biz.dal.page.NoClassMusicStudentQueryInfo;
  26. import com.ym.mec.biz.dal.page.RegistrationOrPreQueryInfo;
  27. import com.ym.mec.biz.dal.page.StudentRegistrationQueryInfo;
  28. import com.ym.mec.common.entity.HttpResponseResult;
  29. import com.ym.mec.common.page.PageInfo;
  30. import com.ym.mec.common.service.BaseService;
  31. public interface StudentRegistrationService extends BaseService<Long, StudentRegistration> {
  32. /**
  33. * 获取乐团学员报名详情
  34. *
  35. * @param queryInfo
  36. * @return
  37. */
  38. PageInfo<StudentApplyDetailDto> queryStudentDetailPage(StudentRegistrationQueryInfo queryInfo);
  39. /**
  40. * 批量调剂
  41. *
  42. * @param userId
  43. * @param subId
  44. * @return
  45. */
  46. Integer batchUpdateSubject(Integer userId, Integer subId, String musicGroupId) throws Exception;
  47. /**
  48. * 学生报名缴费金额详情
  49. *
  50. * @param studentId
  51. * @param musicGroupId
  52. * @return
  53. */
  54. List<StudentPaymentOrderDetail> queryFeeDetail(Integer studentId, String musicGroupId);
  55. /**
  56. * 学生预计退团退费金额详情
  57. *
  58. * @param studentId
  59. * @param musicGroupId
  60. * @return
  61. */
  62. Map<String, BigDecimal> queryRefundsDetail(Integer studentId, String musicGroupId);
  63. /**
  64. * 获取未分配的班级的学生
  65. *
  66. * @param musicGroupId 乐团id
  67. * @param actualSubjectId 科目id
  68. * @return
  69. */
  70. List<Map<String, Object>> getNoClassStuBySubjectId(String musicGroupId, String actualSubjectId);
  71. /**
  72. * 获取乐团声部未分配学生统计
  73. *
  74. * @param musicGroupId
  75. * @return
  76. */
  77. List<MusicGroupSubjectPlan> getNoClassStuCountByMusicGroupId(String musicGroupId);
  78. /**
  79. * 根据user_id 和 乐团id更新
  80. *
  81. * @param studentRegistration
  82. * @return
  83. */
  84. Integer updateByUserIdAndMusicGroupId(StudentRegistration studentRegistration);
  85. /**
  86. * 添加学生报名信息
  87. *
  88. * @param studentRegistration
  89. * @return
  90. */
  91. StudentRegistration addStudent(StudentRegistration studentRegistration) throws Exception;
  92. /**
  93. * 查询学生信息
  94. *
  95. * @param userId
  96. * @return
  97. */
  98. StudentInfo queryStudentInfo(Integer userId);
  99. /**
  100. * 学生注册缴费订单
  101. * @param studentRegistration
  102. * @param amount
  103. * @param orderNo
  104. * @param paymentChannel
  105. * @param courseFee
  106. * @param goodsGroups
  107. * @param remitFee
  108. * @param courseRemitFee
  109. * @param newCourses
  110. * @param buyMaintenance
  111. * @param buyCloudTeacher
  112. * @param buyCloudTeacherPlus
  113. * @param couponIdList
  114. * @return
  115. * @throws Exception
  116. */
  117. StudentPaymentOrder addOrder(StudentRegistration studentRegistration,
  118. BigDecimal amount,
  119. String orderNo,
  120. String paymentChannel,
  121. BigDecimal courseFee,
  122. List<MusicGroupSubjectGoodsGroup> goodsGroups,
  123. BigDecimal remitFee,
  124. BigDecimal courseRemitFee,
  125. List<MusicGroupPaymentCalenderCourseSettings> newCourses,
  126. Boolean buyMaintenance,
  127. Boolean buyCloudTeacher,
  128. Boolean buyCloudTeacherPlus,List<Integer> couponIdList) throws Exception;
  129. /**
  130. * 查询用户指定乐团的报名信息
  131. *
  132. * @param userId 用户编号
  133. * @param musicGroupId 乐团编号
  134. * @return
  135. */
  136. StudentRegistration queryByUserIdAndMusicGroupId(Integer userId, String musicGroupId);
  137. /**
  138. * 根据乐团id,手机查询乐团注册信息
  139. *
  140. * @param musicGroupId
  141. * @param parentsPhone
  142. * @return
  143. */
  144. StudentRegistration getByPhoneAndMusicGroupId(String musicGroupId, String parentsPhone);
  145. /**
  146. * 乐团插入新学员
  147. *
  148. * @param studentAddDto
  149. * @return
  150. */
  151. Integer insertStudent(StudentAddDto studentAddDto) throws Exception;
  152. /**
  153. * 跨团合班进行中加学员
  154. * @param studentIds 学员列表
  155. * @param oldMusicGroupId 原乐团
  156. * @param newMusicGroupId 主乐团
  157. * @return
  158. */
  159. void insertStudent(String studentIds,String oldMusicGroupId,String newMusicGroupId,Map<Integer, List<MusicGroupPaymentCalenderStudentDetail>> collect);
  160. /**
  161. * 获取班级学生
  162. *
  163. * @param musicGroupId
  164. * @param classGroupId
  165. * @return
  166. */
  167. List<StudentRegistration> findClassGroupStu(String musicGroupId, Integer classGroupId);
  168. /**
  169. * 更新报名订单
  170. *
  171. * @param studentPaymentOrder
  172. * @return
  173. */
  174. StudentPaymentOrder updateApplyOrder(StudentPaymentOrder studentPaymentOrder) throws Exception;
  175. /**
  176. * 获取乐团科目的学生
  177. *
  178. * @param musicGroupId 乐团id
  179. * @param actualSubjectId 科目id
  180. * @return
  181. */
  182. List<StudentRegistration> findMusicGroupNoClassGroupStudent(String musicGroupId, Integer actualSubjectId);
  183. /**
  184. * 根据id list 查询报名学生
  185. *
  186. * @param idList
  187. * @return
  188. */
  189. List<StudentRegistration> findStudentListByIdList(List<Long> idList);
  190. /**
  191. * 批量插入
  192. *
  193. * @param studentRegistrationList
  194. * @return
  195. */
  196. int batchInsert(List<StudentRegistration> studentRegistrationList);
  197. /**
  198. * 根据userId 和班级id查询学生
  199. *
  200. * @param userId
  201. * @param classGroupId
  202. * @return
  203. */
  204. StudentRegistration findStudentByClassGroupIdAndUserId(Integer userId, Integer classGroupId);
  205. /**
  206. * 查询乐团声部下的学生
  207. *
  208. * @return
  209. */
  210. List<StudentRegistration> findMusicGroupStudent(String musicGroupId, String actualSubjectId);
  211. /**
  212. * 查询乐团userIdList的学生
  213. *
  214. * @param musicGroupId
  215. * @param userIdList
  216. * @return
  217. */
  218. List<StudentRegistration> findStudentListByUserIdList(String musicGroupId, List<Integer> userIdList);
  219. /**
  220. * 开启缴费
  221. *
  222. * @param ids
  223. * @return
  224. */
  225. int openPayment(String ids) throws IOException;
  226. /**
  227. * 根据乐团编号获取已缴费学员列表
  228. *
  229. * @param musicGroupId
  230. * @return
  231. */
  232. List<StudentRegistration> queryStudentByMusicGroupId(String musicGroupId);
  233. /**
  234. * 根据家长的手机号列表,获取用户编号
  235. *
  236. * @param parentPhones
  237. * @return
  238. */
  239. List<Map<Integer, String>> findParentId(String parentPhones);
  240. /**
  241. * 更新用户注册信息
  242. *
  243. * @param studentRegistration
  244. * @return
  245. */
  246. StudentRegistration updateStudent(StudentRegistration studentRegistration);
  247. /**
  248. * 获取学员基本信息
  249. *
  250. * @param mobile
  251. * @return
  252. */
  253. StudentRegistration queryUserByPhone(String mobile);
  254. /**
  255. * 获取没有某种班级类型的学生
  256. *
  257. * @param musicGroupId
  258. * @param type
  259. * @param subjectId
  260. * @return
  261. */
  262. List<StudentRegistration> findMusicGroupStuNoClassType(String musicGroupId, Long classGroupId, ClassGroupTypeEnum type, String subjectIds);
  263. /**
  264. * 获取乐团下所有学员身上的声部列表
  265. *
  266. * @param musicGroupId
  267. * @return
  268. */
  269. List<Subject> findMusicGroupAllStudentSubjects(String musicGroupId);
  270. /**
  271. * 获取学员详情页,包含所在乐团信息
  272. *
  273. * @param studentId
  274. * @return
  275. */
  276. StudentMusicDetailDto getStudentDetail(Integer studentId);
  277. /**
  278. * 获取学生
  279. *
  280. * @param studentId
  281. * @param musicGroupId
  282. * @return
  283. */
  284. List<StudentPaymentOrderDetail> getStudentApplyDetail(Integer studentId, String musicGroupId);
  285. /**
  286. * 更换学生声部
  287. *
  288. * @param musicGroup
  289. * @param originalSubjectId
  290. * @param changeSubjectId
  291. * @return
  292. */
  293. StudentRegistration changeStudentSubject(Integer studentId, String musicGroupId, Integer originalSubjectId, Integer changeSubjectId);
  294. /**
  295. * 获取班级未上课程的价值
  296. * @param classGroupIds
  297. * @return
  298. */
  299. BigDecimal getClassGroupCourseExpectPrice(List<Integer> classGroupIds);
  300. /**
  301. * @describe 更新学生乐团可用课程余额
  302. * @author qnc99
  303. * @date 2020/12/2 0002
  304. * @param userId:
  305. * @param amount:
  306. * @param memo:
  307. * @param operatorId:
  308. * @return boolean
  309. */
  310. BigDecimal updateUserSurplusCourseFee(Integer userId, String musicGroupId, BigDecimal amount, String memo, Integer operatorId);
  311. /**
  312. * 查询指定学生的乐团信息
  313. * @param userId
  314. * @return
  315. */
  316. List<StudentMusicGroupDto> queryStudentMusicGroupInfo(Integer userId,String musicGroupId);
  317. /**
  318. * 删除学生报名
  319. * @param id
  320. * @return
  321. */
  322. Boolean delReg(Long id);
  323. /**
  324. * 批量删除报名的学生
  325. * @param userIds
  326. * @return
  327. */
  328. Boolean batchDelRegs(String musicGroupId,List<Integer> userIds);
  329. /**
  330. * 获取乐团学员剩余课程金额
  331. * @param musicGroupId
  332. * @return
  333. */
  334. List<StudentRegistration> getMusicGroupStuReBack(String musicGroupId);
  335. /**
  336. * 检查乐团是否能报名或缴费
  337. * @return
  338. */
  339. String checkRegOrPayStatus(String musicGroupId);
  340. /**
  341. * 检查多乐团是否能报名或缴费
  342. * @return
  343. */
  344. Map<String,Boolean> checkMusicGroupsRegOrPayStatus(List<String> ids);
  345. /**
  346. * @describe 查询乐团中未加入班级学员信息
  347. * @author Joburgess
  348. * @date 2021/3/25 0025
  349. * @param queryInfo:
  350. * @return com.ym.mec.common.page.PageInfo<com.ym.mec.biz.dal.dto.NoClassMusicStudentDto>
  351. */
  352. PageInfo<NoClassMusicStudentDto> queryNoClassMusicStudentInfo(NoClassMusicStudentQueryInfo queryInfo);
  353. /**
  354. * 退团所有的学生
  355. * @param musicGroupId
  356. * @param remark
  357. * @return
  358. */
  359. Integer quitAllStudent(String musicGroupId, String remark);
  360. /**
  361. * 获取乐团在读学员数
  362. * @param musicGroupIds
  363. * @return
  364. */
  365. List<Map<String, Integer>> countNormalNum(List<String> musicGroupIds);
  366. /**
  367. * 获取预报名或者报名列表
  368. * @param queryInfo
  369. * @return
  370. */
  371. PageInfoReg<RegisterDto> getRegisterOrPreList(RegistrationOrPreQueryInfo queryInfo);
  372. /**
  373. * 设置不需要云教练
  374. * @param id
  375. * @return
  376. */
  377. Boolean setNoneCloudTeacher(Long id);
  378. /**
  379. * 已付费解除审核增加缴费人数和0元缴费人数
  380. * @param id
  381. * @return
  382. */
  383. HttpResponseResult<Boolean> addPaidNum(Long id, boolean isContinue);
  384. /**
  385. * 获取学生乐团的注册信息
  386. * @param musicGroupId
  387. * @param studentId
  388. * @return
  389. */
  390. StudentRegistration getStudentRegister(String musicGroupId, Integer studentId);
  391. PageInfo<StudentRegisterInstrumentsDetailDto> queryStudentRegisterInstrumentsDetailList(MusicGroupRecordStudentQueryInfo queryInfo);
  392. /**
  393. * 云教练收费:审核中的记录审核失败
  394. * @param studentRegistration
  395. * @return
  396. */
  397. Boolean setCloudTeacherToFailed(StudentRegistration studentRegistration);
  398. }