|
@@ -14,14 +14,12 @@ import com.keao.edu.common.service.impl.BaseServiceImpl;
|
|
import com.keao.edu.thirdparty.message.provider.JiguangPushPlugin;
|
|
import com.keao.edu.thirdparty.message.provider.JiguangPushPlugin;
|
|
import com.keao.edu.thirdparty.message.provider.YimeiSmsPlugin;
|
|
import com.keao.edu.thirdparty.message.provider.YimeiSmsPlugin;
|
|
import com.keao.edu.user.dao.*;
|
|
import com.keao.edu.user.dao.*;
|
|
-import com.keao.edu.user.dto.ExamRecordDto;
|
|
|
|
-import com.keao.edu.user.dto.ExamRegistrationDto;
|
|
|
|
-import com.keao.edu.user.dto.ExamRegistrationRoomDto;
|
|
|
|
-import com.keao.edu.user.dto.ExamRegistrationStatisticsDto;
|
|
|
|
|
|
+import com.keao.edu.user.dto.*;
|
|
import com.keao.edu.user.entity.*;
|
|
import com.keao.edu.user.entity.*;
|
|
import com.keao.edu.user.enums.ExamStatusEnum;
|
|
import com.keao.edu.user.enums.ExamStatusEnum;
|
|
import com.keao.edu.user.enums.StudentRegistrationStatusEnum;
|
|
import com.keao.edu.user.enums.StudentRegistrationStatusEnum;
|
|
import com.keao.edu.user.enums.TransStatusEnum;
|
|
import com.keao.edu.user.enums.TransStatusEnum;
|
|
|
|
+import com.keao.edu.user.page.ApplyListQueryInfo;
|
|
import com.keao.edu.user.page.ExamRecordQueryInfo;
|
|
import com.keao.edu.user.page.ExamRecordQueryInfo;
|
|
import com.keao.edu.user.page.ExamRegistrationQueryInfo;
|
|
import com.keao.edu.user.page.ExamRegistrationQueryInfo;
|
|
import com.keao.edu.user.service.ExamRegistrationPaymentService;
|
|
import com.keao.edu.user.service.ExamRegistrationPaymentService;
|
|
@@ -219,7 +217,7 @@ public class ExamRegistrationServiceImpl extends BaseServiceImpl<Long, ExamRegis
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public PageInfo<ExamRegistrationDto> applyList(QueryInfo queryInfo) {
|
|
|
|
|
|
+ public PageInfo<ExamRegistrationDto> applyList(ApplyListQueryInfo queryInfo) {
|
|
PageInfo<ExamRegistrationDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
|
|
PageInfo<ExamRegistrationDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
|
|
Map<String, Object> params = new HashMap<String, Object>();
|
|
Map<String, Object> params = new HashMap<String, Object>();
|
|
MapUtil.populateMap(params, queryInfo);
|
|
MapUtil.populateMap(params, queryInfo);
|
|
@@ -246,27 +244,21 @@ public class ExamRegistrationServiceImpl extends BaseServiceImpl<Long, ExamRegis
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public PageInfo<ExamRecordDto> examList(ExamRecordQueryInfo queryInfo) {
|
|
|
|
- PageInfo<ExamRecordDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
|
|
|
|
|
|
+ public PageInfo<StudentExamListDto> examList(ExamRecordQueryInfo queryInfo) {
|
|
|
|
+ PageInfo<StudentExamListDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
|
|
Map<String, Object> params = new HashMap<String, Object>();
|
|
Map<String, Object> params = new HashMap<String, Object>();
|
|
MapUtil.populateMap(params, queryInfo);
|
|
MapUtil.populateMap(params, queryInfo);
|
|
|
|
|
|
- List<ExamRecordDto> dataList = null;
|
|
|
|
|
|
+ List<StudentExamListDto> dataList = null;
|
|
int count = examRegistrationDao.countExamList(params);
|
|
int count = examRegistrationDao.countExamList(params);
|
|
if (count > 0) {
|
|
if (count > 0) {
|
|
pageInfo.setTotal(count);
|
|
pageInfo.setTotal(count);
|
|
params.put("offset", pageInfo.getOffset());
|
|
params.put("offset", pageInfo.getOffset());
|
|
dataList = examRegistrationDao.queryExamList(params);
|
|
dataList = examRegistrationDao.queryExamList(params);
|
|
List<Integer> subjectIds = dataList.stream().map(e -> e.getSubjectId()).collect(Collectors.toList());
|
|
List<Integer> subjectIds = dataList.stream().map(e -> e.getSubjectId()).collect(Collectors.toList());
|
|
- List<Long> basicIds = dataList.stream().map(e -> e.getExaminationBasicId()).collect(Collectors.toList());
|
|
|
|
- List<Integer> registrationIds = dataList.stream().map(e -> e.getId()).collect(Collectors.toList());
|
|
|
|
Map<Integer, String> subjectNameMap = this.getMap("subject", "id_", "name_", subjectIds, Integer.class, String.class);
|
|
Map<Integer, String> subjectNameMap = this.getMap("subject", "id_", "name_", subjectIds, Integer.class, String.class);
|
|
- Map<Integer, String> examNameMap = this.getMap("examination_basic", "id_", "name_", basicIds, Integer.class, String.class);
|
|
|
|
- Map<Integer, String> certificationNameMap = this.getMap("exam_certification", "exam_registration_id_", "card_no_", registrationIds, Integer.class, String.class);
|
|
|
|
dataList.forEach(e -> {
|
|
dataList.forEach(e -> {
|
|
e.setSubjectName(subjectNameMap.get(e.getSubjectId()));
|
|
e.setSubjectName(subjectNameMap.get(e.getSubjectId()));
|
|
- e.setExamBaseName(examNameMap.get(e.getExaminationBasicId()));
|
|
|
|
- e.setCardNo(certificationNameMap.get(e.getId()));
|
|
|
|
});
|
|
});
|
|
}
|
|
}
|
|
if (count == 0) {
|
|
if (count == 0) {
|
|
@@ -358,4 +350,26 @@ public class ExamRegistrationServiceImpl extends BaseServiceImpl<Long, ExamRegis
|
|
rpMap.put("payMap", payMap);
|
|
rpMap.put("payMap", payMap);
|
|
return rpMap;
|
|
return rpMap;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public PageInfo<StudentBaseExamsDto> studentBaseExams(QueryInfo queryInfo) {
|
|
|
|
+ PageInfo<StudentBaseExamsDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
|
|
|
|
+ Map<String, Object> params = new HashMap<>();
|
|
|
|
+ MapUtil.populateMap(params, queryInfo);
|
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
|
+ params.put("studentId",sysUser.getId());
|
|
|
|
+ List<StudentBaseExamsDto> dataList = null;
|
|
|
|
+ params.put("paymentStatus",1);
|
|
|
|
+ int count = examRegistrationDao.countStudentBaseExams(params);
|
|
|
|
+ if (count > 0) {
|
|
|
|
+ pageInfo.setTotal(count);
|
|
|
|
+ params.put("offset", pageInfo.getOffset());
|
|
|
|
+ dataList = examRegistrationDao.queryStudentBaseExams(params);
|
|
|
|
+ }
|
|
|
|
+ if (count == 0) {
|
|
|
|
+ dataList = new ArrayList<>();
|
|
|
|
+ }
|
|
|
|
+ pageInfo.setRows(dataList);
|
|
|
|
+ return pageInfo;
|
|
|
|
+ }
|
|
}
|
|
}
|