| | |
| | | public Result updateStudent(String studentId, String name,String password, String studentNo, boolean sex, String phoneNo) { |
| | | //根据学学员ID,获取用户信息 |
| | | StuStudent stu = this.read(StuStudent.class, studentId); |
| | | |
| | | if (!stu.getStudentNo().equals(studentNo) && dao.exists(studentNo,ClientUtils.getOrgId())) { |
| | | return new Result(false, "学号已存在"); |
| | | if(stu.getStudentNo() != null){ |
| | | if (!stu.getStudentNo().equals(studentNo) && dao.exists(studentNo,ClientUtils.getOrgId())) { |
| | | return new Result(false, "学号已存在"); |
| | | } |
| | | } |
| | | |
| | | stu.setName(name); |
| | | stu.setSex(sex); |
| | | stu.setStudentNo(studentNo); |
| | |
| | | map.put("score", tuple.get(qStuStudent.score)); |
| | | map.put("graduationText", tuple.get(qStuStudent.graduationText)); |
| | | map.put("imgPath", tuple.get(qUser.imgPath)); |
| | | map.put("photo", tuple.get(qStuStudent.photo)); |
| | | map.put("passporName", tuple.get(qStuStudent.passporName)); |
| | | map.put("nationality", tuple.get(qStuStudent.nationality)); |
| | | map.put("ancestralHome", tuple.get(qStuStudent.ancestralHome)); |
| | | map.put("birthday", tuple.get(qStuStudent.birthday)); |
| | | map.put("birthplace", tuple.get(qStuStudent.birthplace)); |
| | | map.put("chinaStatus", tuple.get(qStuStudent.chinaStatus)); |
| | | map.put("registeredAddress", tuple.get(qStuStudent.registeredAddress)); |
| | | map.put("homeAddress", tuple.get(qStuStudent.homeAddress)); |
| | | map.put("religiousBelief", tuple.get(qStuStudent.religiousBelief)); |
| | | map.put("email", tuple.get(qStuStudent.email)); |
| | | map.put("workUnit", tuple.get(qStuStudent.workUnit)); |
| | | map.put("graduationDestination", tuple.get(qStuStudent.graduationDestination)); |
| | | return map; |
| | | }).collect(Collectors.toList()); |
| | | } |