StudentRegistrationService.java 12 KB

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