haogh 7 meses atrás
pai
commit
fa0e8383ec

+ 8 - 1
src/main/java/com/qmth/exam/reserve/service/impl/StudentApplyServiceImpl.java

@@ -72,7 +72,7 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
     private static final String[] EXCEL_HEADER = new String[]{"学号", "姓名", "证件号", "所属教学点", "预约考点1", "预约时段1", "预约考点2", "预约时段2", "预约考点3",
             "预约时段3", "预约考点4", "预约时段4"};
 
-    private static final int maxApplyNum = 4;
+    private static final int maxApplyNum = 3;
 
     @Autowired
     private ApplyTaskService applyTaskService;
@@ -451,6 +451,13 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
                     ++index;
                 }
 
+                // 处理导入预考模版中填满的情况
+                if(apply.getAgentTimeList() == null || apply.getAgentTimeList().isEmpty()) {
+                    apply.setAgentTimeList(agentTimeList);
+                    applyList.add(apply);
+                }
+
+
                 //检测考生是否已经完成预约和超出预约的最大次数
                 checkStudentTimePeriod(apply, i, task.getAllowApplyCancelDays(), failRecords);
             }