|
|
|
@ -51,6 +51,11 @@ public class AccountController {
|
|
|
|
|
private SchoolClassService schoolClassService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private UniversitySystemService universitySystemService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private UniversitiesCollegesService universitiesCollegesService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private TeacherService teacherService;
|
|
|
|
|
|
|
|
|
|
private final static String URL = "jdbc:sqlserver://120.79.161.177:1433;databaseName=Test.Zhiyun_v2.0;trustServerCertificate=true;encrypt=true";
|
|
|
|
|
private final static String USER = "sa";
|
|
|
|
@ -835,7 +840,9 @@ public class AccountController {
|
|
|
|
|
List<CoreUser> coreUsers = userService.getCoreUserList(coreUser);
|
|
|
|
|
int i = 0;
|
|
|
|
|
for (CoreUser user : coreUsers) {
|
|
|
|
|
if(user.getOldId()!=null){continue;}
|
|
|
|
|
if (user.getOldId() != null) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
Connection conn = openConn();
|
|
|
|
|
PreparedStatement ps = conn.prepareStatement("select * from EduUsers where username = '" + user.getCode() + "' and IsDeleted = 0");
|
|
|
|
|
|
|
|
|
@ -851,4 +858,45 @@ public class AccountController {
|
|
|
|
|
}
|
|
|
|
|
return JsonResult.success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ApiOperation("修改用户表userid")
|
|
|
|
|
@PostMapping("updateUserIdAndOldIdIsNull.json")
|
|
|
|
|
public JsonResult updateUserIdAndOldIdIsNull() throws SQLException {
|
|
|
|
|
CoreUser coreUser = new CoreUser();
|
|
|
|
|
List<CoreUser> coreUsers = userService.getCoreUserListAndOldIdIsNull();
|
|
|
|
|
int i = 0;
|
|
|
|
|
Long j = 50000L;
|
|
|
|
|
for (CoreUser user : coreUsers) {
|
|
|
|
|
j++;
|
|
|
|
|
user.setOldId(j);
|
|
|
|
|
userService.updateTemplate(user);
|
|
|
|
|
System.out.println("已完成:" + i++);
|
|
|
|
|
}
|
|
|
|
|
return JsonResult.success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ApiOperation("根据学校id查询班级数据")
|
|
|
|
|
@GetMapping("getClassesBySchoolId.json")
|
|
|
|
|
public JsonResult<List<Map<String, Object>>> getClassesBySchoolId(Long schoolId) {
|
|
|
|
|
return JsonResult.success(schoolClassService.getClassesBySchoolId(schoolId));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ApiOperation("获取所有学校")
|
|
|
|
|
@GetMapping("findAllSchool.json")
|
|
|
|
|
public JsonResult<List<Map<String, Object>>> findAllSchool() {
|
|
|
|
|
return JsonResult.success(universitiesCollegesService.findAll());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ApiOperation("根据学校id获取学生信息")
|
|
|
|
|
@GetMapping("findAllStudentBySchoolId.json")
|
|
|
|
|
public JsonResult<List<Student>> findAllStudentBySchoolId(Long schoolId) {
|
|
|
|
|
return JsonResult.success(studentService.findAllBySchoolId(schoolId));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ApiOperation("根据学校id获取教师信息")
|
|
|
|
|
@GetMapping("findAllTeacherBySchoolId.json")
|
|
|
|
|
public JsonResult<List<Teacher>> findAllTeacherBySchoolId(Long schoolId) {
|
|
|
|
|
return JsonResult.success(teacherService.findAllTeacherBySchoolId(schoolId));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|