|
@@ -27,9 +27,9 @@ import com.qmth.boot.tools.excel.enums.ExcelType;
|
|
|
import com.qmth.boot.tools.excel.model.DataMap;
|
|
|
import com.qmth.exam.reserve.bean.login.LoginUser;
|
|
|
import com.qmth.exam.reserve.bean.stdapply.AgentAndTimeVO;
|
|
|
-import com.qmth.exam.reserve.bean.stdapply.StdApplyReq;
|
|
|
-import com.qmth.exam.reserve.bean.stdapply.StdApplyVO;
|
|
|
-import com.qmth.exam.reserve.bean.stdapply.StdImportVO;
|
|
|
+import com.qmth.exam.reserve.bean.stdapply.StudentApplyReq;
|
|
|
+import com.qmth.exam.reserve.bean.stdapply.StudentApplyVO;
|
|
|
+import com.qmth.exam.reserve.bean.stdapply.StudentImportVO;
|
|
|
import com.qmth.exam.reserve.dao.ApplyTaskDao;
|
|
|
import com.qmth.exam.reserve.dao.OperateLogDao;
|
|
|
import com.qmth.exam.reserve.dao.StudentApplyDao;
|
|
@@ -52,7 +52,7 @@ import com.qmth.exam.reserve.util.JsonHelper;
|
|
|
import com.qmth.exam.reserve.util.PageUtil;
|
|
|
|
|
|
@Service
|
|
|
-public class StudentApplyServiceImp extends ServiceImpl<StudentApplyDao, StudentApplyEntity>
|
|
|
+public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, StudentApplyEntity>
|
|
|
implements StudentApplyService {
|
|
|
|
|
|
private static final String[] EXCEL_HEADER = new String[] { "学号", "姓名", "证件号", "所属教学点", "预约考点1", "预约时段1", "预约考点2",
|
|
@@ -77,9 +77,9 @@ public class StudentApplyServiceImp extends ServiceImpl<StudentApplyDao, Student
|
|
|
private ExamSiteService examSiteService;
|
|
|
|
|
|
@Override
|
|
|
- public PageResult<StdApplyVO> page(StdApplyReq req) {
|
|
|
- IPage<StdApplyVO> iPage = this.baseMapper.page(new Page<StdApplyVO>(req.getPageNumber(), req.getPageSize()),
|
|
|
- req);
|
|
|
+ public PageResult<StudentApplyVO> page(StudentApplyReq req) {
|
|
|
+ IPage<StudentApplyVO> iPage = this.baseMapper
|
|
|
+ .page(new Page<StudentApplyVO>(req.getPageNumber(), req.getPageSize()), req);
|
|
|
return PageUtil.of(iPage);
|
|
|
}
|
|
|
|
|
@@ -135,12 +135,12 @@ public class StudentApplyServiceImp extends ServiceImpl<StudentApplyDao, Student
|
|
|
Map<String, Long> teachingCache = getTeachingCache();
|
|
|
Map<String, Long> agentCache = getAgentCache(teachingId);
|
|
|
Map<String, Long> timeCache = getTimePeriodCache();
|
|
|
- List<StdImportVO> applyList = new ArrayList<>();
|
|
|
+ List<StudentImportVO> applyList = new ArrayList<>();
|
|
|
AgentAndTimeVO agentTime = new AgentAndTimeVO();
|
|
|
for (int i = 0; i < lineList.size(); i++) {
|
|
|
List<AgentAndTimeVO> agentTimeList = new ArrayList<>();
|
|
|
DataMap line = lineList.get(i);
|
|
|
- StdImportVO apply = new StdImportVO();
|
|
|
+ StudentImportVO apply = new StudentImportVO();
|
|
|
StringBuilder msg = new StringBuilder();
|
|
|
String studentCode = trimAndNullIfBlank(line.get(EXCEL_HEADER[0]));
|
|
|
if (StringUtils.isBlank(studentCode)) {
|
|
@@ -280,7 +280,7 @@ public class StudentApplyServiceImp extends ServiceImpl<StudentApplyDao, Student
|
|
|
return failRecords;
|
|
|
}
|
|
|
for (int i = 0; i < applyList.size(); i++) {
|
|
|
- StdImportVO vo = applyList.get(i);
|
|
|
+ StudentImportVO vo = applyList.get(i);
|
|
|
try {
|
|
|
saveStdApply(vo);
|
|
|
} catch (StatusException e) {
|
|
@@ -306,7 +306,7 @@ public class StudentApplyServiceImp extends ServiceImpl<StudentApplyDao, Student
|
|
|
// DateUtil.isBetwwen(start, end)
|
|
|
}
|
|
|
|
|
|
- private void saveStdApply(StdImportVO vo) {
|
|
|
+ private void saveStdApply(StudentImportVO vo) {
|
|
|
List<AgentAndTimeVO> agentTimeList = vo.getAgentTimeList();
|
|
|
LambdaQueryWrapper<StudentApplyEntity> lm = new LambdaQueryWrapper<>();
|
|
|
lm.eq(StudentApplyEntity::getStudentId, vo.getStudentId());
|