StudentRegistrationService.java 11 KB

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