|
|
|
@ -4,7 +4,6 @@ package com.ibeetl.jlw.service;
|
|
|
|
|
import cn.hutool.core.lang.Assert;
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
|
import cn.hutool.core.util.RandomUtil;
|
|
|
|
|
import cn.hutool.core.util.ReUtil;
|
|
|
|
|
import cn.jlw.util.ToolUtils;
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
@ -591,8 +590,9 @@ public class StudentService extends CoreBaseService<Student>{
|
|
|
|
|
|
|
|
|
|
String schoolClassId = "";
|
|
|
|
|
// 通过名字查询院校信息,如果查询不到就告诉前台需要先去添加院校
|
|
|
|
|
String[] classSplit = className.split("_");
|
|
|
|
|
List<SchoolClass> schoolClass = schoolClassDao.createLambdaQuery()
|
|
|
|
|
.andEq(SchoolClass::getClassName, className)
|
|
|
|
|
.andEq(SchoolClass::getClassName, classSplit[0])
|
|
|
|
|
.andEq(SchoolClass::getClassStatus, 1)
|
|
|
|
|
.select();
|
|
|
|
|
|
|
|
|
@ -601,7 +601,7 @@ public class StudentService extends CoreBaseService<Student>{
|
|
|
|
|
// 通过名字没查询到院校的时候
|
|
|
|
|
if(ObjectUtil.isEmpty(schoolClass)) {
|
|
|
|
|
// 正则取院校ID
|
|
|
|
|
schoolClassId = ReUtil.get("\\d+", className, 0);
|
|
|
|
|
schoolClassId = classSplit[1];
|
|
|
|
|
Assert.notBlank(schoolClassId, "请先添加班级信息:{}!", className);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -618,6 +618,7 @@ public class StudentService extends CoreBaseService<Student>{
|
|
|
|
|
pojo.setStudentStatus(1);
|
|
|
|
|
pojo.setStudentPassword("123qwe");
|
|
|
|
|
pojo.setAddTime(date);
|
|
|
|
|
pojo.setCodeFrom("导入");
|
|
|
|
|
save(pojo);
|
|
|
|
|
|
|
|
|
|
String code = pojo.createCode();//TODO 可改规则
|
|
|
|
|