This commit is contained in:
2026-08-26 14:52:23 +08:00
parent 3220ad3013
commit 8226f36cb5
@@ -431,7 +431,8 @@ public class SchStudentImportService {
public void importStudentClassNo(UserContext.UserInfo user, MultipartFile file, Integer schsystemId, Integer gradeId,Integer classId){
List<ErrorExcelColumn> errorMsgArr = new ArrayList<>();
ImportParams params = new ImportParams();
params.setTitleRows(0);
// 模板标题行为第1行“学号导入”,表头为第2行,需跳过1行标题
params.setTitleRows(1);
params.setHeadRows(1);
Integer schId = user.getSchId();
Integer userId = user.getUserId();
@@ -470,7 +471,7 @@ public class SchStudentImportService {
// 4. 业务校验与转换
List<SchStudent> saveStudentList = new ArrayList<>();
int currentRow = params.getTitleRows() + params.getHeadRows() + 1; // 第一行数据从第2行开始
int currentRow = params.getTitleRows() + params.getHeadRows() + 1; // 跳过1行标题+1行表头,第一行数据从第3行开始
for (StudentClassNoExcelColumn item : list) {
// Excel数据验证