StudentRegistrationService.java 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. package com.ym.mec.biz.service;
  2. import com.ym.mec.biz.dal.dto.*;
  3. import com.ym.mec.biz.dal.entity.*;
  4. import com.ym.mec.biz.dal.enums.ClassGroupTypeEnum;
  5. import com.ym.mec.biz.dal.page.StudentRegistrationQueryInfo;
  6. import com.ym.mec.common.page.PageInfo;
  7. import com.ym.mec.common.service.BaseService;
  8. import java.io.IOException;
  9. import java.math.BigDecimal;
  10. import java.util.List;
  11. import java.util.Map;
  12. public interface StudentRegistrationService extends BaseService<Long, StudentRegistration> {
  13. /**
  14. * 获取乐团学员报名详情
  15. *
  16. * @param queryInfo
  17. * @return
  18. */
  19. PageInfo<StudentApplyDetailDto> queryStudentDetailPage(StudentRegistrationQueryInfo queryInfo);
  20. /**
  21. * 批量调剂
  22. *
  23. * @param userId
  24. * @param subId
  25. * @return
  26. */
  27. Integer batchUpdateSubject(Integer userId, Integer subId, String musicGroupId) throws Exception;
  28. /**
  29. * 学生报名缴费金额详情
  30. *
  31. * @param studentId
  32. * @param musicGroupId
  33. * @return
  34. */
  35. StudentFeeDetailDto queryFeeDetail(Integer studentId, String musicGroupId);
  36. /**
  37. * 获取未分配的班级的学生
  38. *
  39. * @param musicGroupId 乐团id
  40. * @param actualSubjectId 科目id
  41. * @return
  42. */
  43. List<Map<String, Object>> getNoClassStuBySubjectId(String musicGroupId, String actualSubjectId);
  44. /**
  45. * 获取乐团声部未分配学生统计
  46. *
  47. * @param musicGroupId
  48. * @return
  49. */
  50. List<MusicGroupSubjectPlan> getNoClassStuCountByMusicGroupId(String musicGroupId);
  51. /**
  52. * 根据user_id 和 乐团id更新
  53. *
  54. * @param studentRegistration
  55. * @return
  56. */
  57. Integer updateByUserIdAndMusicGroupId(StudentRegistration studentRegistration);
  58. /**
  59. * 添加学生报名信息
  60. *
  61. * @param studentRegistration
  62. * @return
  63. */
  64. StudentRegistration addStudent(StudentRegistration studentRegistration) throws Exception;
  65. /**
  66. * 查询学生信息
  67. *
  68. * @param userId
  69. * @return
  70. */
  71. StudentInfo queryStudentInfo(Integer userId);
  72. /**
  73. * 学生注册缴费订单
  74. *
  75. * @param studentRegistration
  76. * @param amount
  77. * @param courseFee
  78. * @param goodsGroups
  79. * @param goodsList
  80. * @return
  81. */
  82. StudentPaymentOrder addOrder(StudentRegistration studentRegistration, BigDecimal amount, String orderNo, String paymentChannel, BigDecimal courseFee,
  83. List<MusicGroupSubjectGoodsGroup> goodsGroups, List<Goods> goodsList, List<Goods> otherGoodsList, List<CourseFormDto> courseForms,
  84. BigDecimal remitFee, BigDecimal courseRemitFee, List<MusicGroupPaymentCalenderCourseSettings> newCourses) throws Exception;
  85. /**
  86. * 学生注册缴费重新下订单
  87. *
  88. * @param userId
  89. * @param amount
  90. * @param courseFee
  91. * @param goodsGroups
  92. * @param goodsList
  93. * @return
  94. */
  95. StudentPaymentOrder reAddOrder(
  96. Integer userId, BigDecimal amount, String orderNo, String paymentChannel, BigDecimal courseFee,
  97. List<MusicGroupSubjectGoodsGroup> goodsGroups, List<Goods> goodsList, List<Goods> otherGoodsList,
  98. String musicGroupId, StudentPaymentOrder oldOrder, List<CourseFormDto> courseForms, BigDecimal remitFee, BigDecimal courseRemitFee, List<MusicGroupPaymentCalenderCourseSettings> newCourses) throws Exception;
  99. /**
  100. * 查询用户指定乐团的报名信息
  101. *
  102. * @param userId 用户编号
  103. * @param musicGroupId 乐团编号
  104. * @return
  105. */
  106. StudentRegistration queryByUserIdAndMusicGroupId(Integer userId, String musicGroupId);
  107. /**
  108. * 根据乐团id,手机查询乐团注册信息
  109. *
  110. * @param musicGroupId
  111. * @param parentsPhone
  112. * @return
  113. */
  114. StudentRegistration getByPhoneAndMusicGroupId(String musicGroupId, String parentsPhone);
  115. /**
  116. * 乐团插入新学员
  117. *
  118. * @param studentAddDto
  119. * @return
  120. */
  121. Integer insertStudent(StudentAddDto studentAddDto) throws Exception;
  122. /**
  123. * 获取班级学生
  124. *
  125. * @param musicGroupId
  126. * @param classGroupId
  127. * @return
  128. */
  129. List<StudentRegistration> findClassGroupStu(String musicGroupId, Integer classGroupId);
  130. /**
  131. * 更新报名订单
  132. *
  133. * @param studentPaymentOrder
  134. * @return
  135. */
  136. StudentPaymentOrder updateApplyOrder(StudentPaymentOrder studentPaymentOrder) throws Exception;
  137. /**
  138. * 获取乐团科目的学生
  139. *
  140. * @param musicGroupId 乐团id
  141. * @param actualSubjectId 科目id
  142. * @return
  143. */
  144. List<StudentRegistration> findMusicGroupNoClassGroupStudent(String musicGroupId, Integer actualSubjectId);
  145. /**
  146. * 根据id list 查询报名学生
  147. *
  148. * @param idList
  149. * @return
  150. */
  151. List<StudentRegistration> findStudentListByIdList(List<Long> idList);
  152. /**
  153. * 批量插入
  154. *
  155. * @param studentRegistrationList
  156. * @return
  157. */
  158. int batchInsert(List<StudentRegistration> studentRegistrationList);
  159. /**
  160. * 根据userId 和班级id查询学生
  161. *
  162. * @param userId
  163. * @param classGroupId
  164. * @return
  165. */
  166. StudentRegistration findStudentByClassGroupIdAndUserId(Integer userId, Integer classGroupId);
  167. /**
  168. * 查询乐团声部下的学生
  169. *
  170. * @return
  171. */
  172. List<StudentRegistration> findMusicGroupStudent(String musicGroupId, Integer actualSubjectId);
  173. /**
  174. * 查询乐团userIdList的学生
  175. *
  176. * @param musicGroupId
  177. * @param userIdList
  178. * @return
  179. */
  180. List<StudentRegistration> findStudentListByUserIdList(String musicGroupId, List<Integer> userIdList);
  181. /**
  182. * 开启缴费
  183. *
  184. * @param ids
  185. * @return
  186. */
  187. int openPayment(String ids) throws IOException;
  188. /**
  189. * 根据乐团编号获取已缴费学员列表
  190. *
  191. * @param musicGroupId
  192. * @return
  193. */
  194. List<StudentRegistration> queryStudentByMusicGroupId(String musicGroupId);
  195. /**
  196. * 根据家长的手机号列表,获取用户编号
  197. *
  198. * @param parentPhones
  199. * @return
  200. */
  201. List<Map<Integer, String>> findParentId(String parentPhones);
  202. /**
  203. * 更新用户注册信息
  204. *
  205. * @param studentRegistration
  206. * @return
  207. */
  208. StudentRegistration updateStudent(StudentRegistration studentRegistration);
  209. /**
  210. * 获取学员基本信息
  211. *
  212. * @param mobile
  213. * @return
  214. */
  215. StudentRegistration queryUserByPhone(String mobile);
  216. /**
  217. * 获取没有某种班级类型的学生
  218. *
  219. * @param musicGroupId
  220. * @param type
  221. * @param subjectId
  222. * @return
  223. */
  224. List<StudentRegistration> findMusicGroupStuNoClassType(String musicGroupId, Long classGroupId, ClassGroupTypeEnum type, Integer subjectId);
  225. /**
  226. * 获取乐团下所有学员身上的声部列表
  227. *
  228. * @param musicGroupId
  229. * @return
  230. */
  231. List<Subject> findMusicGroupAllStudentSubjects(String musicGroupId);
  232. /**
  233. * 获取学员详情页,包含所在乐团信息
  234. *
  235. * @param studentId
  236. * @return
  237. */
  238. StudentMusicDetailDto getStudentDetail(Integer studentId);
  239. /**
  240. * 获取学生
  241. *
  242. * @param studentId
  243. * @param musicGroupId
  244. * @return
  245. */
  246. List<StudentPaymentOrderDetail> getStudentApplyDetail(Integer studentId, String musicGroupId);
  247. /**
  248. * 更换学生声部
  249. *
  250. * @param musicGroup
  251. * @param originalSubjectId
  252. * @param changeSubjectId
  253. * @return
  254. */
  255. StudentRegistration changeStudentSubject(Integer studentId, String musicGroupId, Integer originalSubjectId, Integer changeSubjectId);
  256. /**
  257. * 获取班级未上课程的价值
  258. * @param classGroupIds
  259. * @return
  260. */
  261. BigDecimal getClassGroupCourseExpectPrice(List<Integer> classGroupIds);
  262. /**
  263. * @describe 更新学生乐团可用课程余额
  264. * @author qnc99
  265. * @date 2020/12/2 0002
  266. * @param userId:
  267. * @param amount:
  268. * @param memo:
  269. * @param operatorId:
  270. * @return boolean
  271. */
  272. boolean updateUserSurplusCourseFee(Integer userId, String musicGroupId, BigDecimal amount, String memo, Integer operatorId);
  273. }