|
|
|
@ -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;
|
|
|
|
@ -183,7 +184,7 @@ public class TestController {
|
|
|
|
|
if (universityFaculty != null) {
|
|
|
|
|
universityFaculty.setOldId(oldId);
|
|
|
|
|
universityFacultyService.updateTemplate(universityFaculty);
|
|
|
|
|
continue ;
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CoreUser userByCode = coreUserService.getUserByCode(universitiesColleges.getUniversitiesCollegesContacts());
|
|
|
|
@ -260,7 +261,7 @@ public class TestController {
|
|
|
|
|
if (universitiesColleges.getUniversitiesCollegesName().equals("安阳学院") && universityFaculty.getUniversityFacultyName().equals("经管学院")) {
|
|
|
|
|
int a = 0;
|
|
|
|
|
}
|
|
|
|
|
UniversitySystem systemServiceByName = universitySystemService.getByOldId(resultSet.getLong(8),universityFaculty.getUniversityFacultyId());
|
|
|
|
|
UniversitySystem systemServiceByName = universitySystemService.getByOldId(resultSet.getLong(8), universityFaculty.getUniversityFacultyId());
|
|
|
|
|
if (systemServiceByName != null) {
|
|
|
|
|
systemServiceByName.setOldId(oldId);
|
|
|
|
|
universitySystemService.updateTemplate(systemServiceByName);
|
|
|
|
@ -437,6 +438,7 @@ public class TestController {
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
CorePlatformService platformService;
|
|
|
|
|
|
|
|
|
|
@ApiOperation("迁移学生数据")
|
|
|
|
|
@PostMapping("updateStudent")
|
|
|
|
|
public void updateStudent() throws SQLException {
|
|
|
|
@ -464,7 +466,7 @@ public class TestController {
|
|
|
|
|
" JOIN EduClasses cla ON stu.ClassId = cla.Id where sch.Name='张家口学院'";
|
|
|
|
|
ps = conn.prepareStatement(sql);
|
|
|
|
|
ResultSet resultSet = ps.executeQuery();
|
|
|
|
|
int i=0;
|
|
|
|
|
int i = 0;
|
|
|
|
|
while (resultSet.next()) {
|
|
|
|
|
System.out.println("-----------------------------------已处理" + i++ + "-------------------------------------------");
|
|
|
|
|
if (resultSet.getString(9).contains("内部体验")) {
|
|
|
|
@ -477,7 +479,7 @@ public class TestController {
|
|
|
|
|
String username = resultSet.getString(5);
|
|
|
|
|
// Map<String, Object> studentByNo = coreUserService.getStudentByNo(username);
|
|
|
|
|
|
|
|
|
|
if(username.length()==36){
|
|
|
|
|
if (username.length() == 36) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
Boolean aBoolean = platformService.CheckUserCodeThrowMessage(username);
|
|
|
|
@ -633,7 +635,7 @@ public class TestController {
|
|
|
|
|
for (SchoolClass schoolClass : classes) {
|
|
|
|
|
Long majorId = schoolClass.getUniversitySystemId();
|
|
|
|
|
UniversitySystem system = universitySystemService.getById(majorId);
|
|
|
|
|
String sql = "select * from EduClasses where MajorId ="+system.getOldId()+" and Name = '"+schoolClass.getClassName()+"'";
|
|
|
|
|
String sql = "select * from EduClasses where MajorId =" + system.getOldId() + " and Name = '" + schoolClass.getClassName() + "'";
|
|
|
|
|
|
|
|
|
|
ps = connection.prepareStatement(sql);
|
|
|
|
|
ResultSet resultSet = ps.executeQuery();
|
|
|
|
@ -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();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|