StudentRegistrationService.java 9.8 KB

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