|
|
|
@ -13,6 +13,7 @@ import com.ibeetl.jlw.entity.*;
|
|
|
|
|
import com.ibeetl.jlw.entity.dto.CreateUserDTO;
|
|
|
|
|
import com.ibeetl.jlw.enums.GenderEnum;
|
|
|
|
|
import com.ibeetl.jlw.service.*;
|
|
|
|
|
import com.ibeetl.jlw.util.ZhiYunJDBCUtil;
|
|
|
|
|
import com.ibeetl.jlw.web.query.UniversitiesCollegesJurisdictionExperimentalSystemQuery;
|
|
|
|
|
import com.ibeetl.jlw.web.query.UniversityFacultyQuery;
|
|
|
|
|
import com.ibeetl.jlw.web.query.UniversitySystemQuery;
|
|
|
|
@ -437,6 +438,7 @@ public class TestController {
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
CorePlatformService platformService;
|
|
|
|
|
|
|
|
|
|
@ApiOperation("迁移学生数据")
|
|
|
|
|
@PostMapping("updateStudent")
|
|
|
|
|
public void updateStudent() throws SQLException {
|
|
|
|
@ -675,4 +677,28 @@ public class TestController {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("修改教师旧的id")
|
|
|
|
|
@PostMapping("updateTeacherId.json")
|
|
|
|
|
public void updateTeacherId() {
|
|
|
|
|
List<Teacher> teachers = teacherService.findAll();
|
|
|
|
|
for (Teacher teacher : teachers) {
|
|
|
|
|
String sql = "select * from EduTeachers where TeacherNo =" + teacher.getTeacherSn();
|
|
|
|
|
try {
|
|
|
|
|
Connection connection = ZhiYunJDBCUtil.openConn();
|
|
|
|
|
PreparedStatement ps = connection.prepareStatement(sql);
|
|
|
|
|
ResultSet rs = ps.executeQuery();
|
|
|
|
|
while (rs.next()){
|
|
|
|
|
teacher.setOldId(rs.getLong("id"));
|
|
|
|
|
teacherService.updateTemplate(teacher);
|
|
|
|
|
}
|
|
|
|
|
connection.close();
|
|
|
|
|
ps.close();
|
|
|
|
|
}catch (Exception ex){
|
|
|
|
|
ex.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|