| | |
| | | |
| | | |
| | | @Override |
| | | public Result insertStudent(String classId, String name, String studentNo, boolean sex, String phoneNo, String orgId,String comName) { |
| | | public Result insertStudent(String classId, String name, String studentNo, boolean sex, String phoneNo, String orgId, String comName, |
| | | String photo, String passporName, String nationality, String ancestralHome, String birthday, String birthplace, |
| | | String chinaStatus, String registeredAddress, String homeAddress, String religiousBelief, String email, |
| | | String workUnit) { |
| | | |
| | | User user1 = userService.getUserByAccount(studentNo,orgId); |
| | | if(user1 != null){ |
| | | return new Result(false, "身份证已存在"); |
| | | } |
| | | if (dao.exists(studentNo, orgId)) { |
| | | return new Result(false, "身份证已存在"); |
| | | } |
| | |
| | | student.setMobilePhone(phoneNo); |
| | | //公司名称 |
| | | student.setSubjectId(comName); |
| | | |
| | | student.setPhoto(photo); |
| | | student.setPassporName(passporName); |
| | | student.setNationality(nationality); |
| | | student.setAncestralHome(ancestralHome); |
| | | student.setBirthday(birthday); |
| | | student.setBirthplace(birthplace); |
| | | student.setChinaStatus(chinaStatus); |
| | | student.setRegisteredAddress(registeredAddress); |
| | | student.setHomeAddress(homeAddress); |
| | | student.setReligiousBelief(religiousBelief); |
| | | student.setEmail(email); |
| | | student.setWorkUnit(workUnit); |
| | | if(StringUtils.isNoneBlank(classId)) { |
| | | bulkUpdate("update ClsClass set studentCount = studentCount + 1 where deleteFlag is false and classId = ?", new Object[]{classId}); |
| | | } |
| | |
| | | return new Result(true, "success"); |
| | | } |
| | | @Override |
| | | public Result updateStudent(String studentId, String name,String password, String studentNo, boolean sex, String phoneNo) { |
| | | public Result updateStudent(String studentId, String name,String password, String studentNo, boolean sex, String phoneNo |
| | | , String photo, String passporName, String nationality, String ancestralHome, String birthday, String birthplace, |
| | | String chinaStatus, String registeredAddress, String homeAddress, String religiousBelief, String email, |
| | | String workUnit, String graduationDestination) { |
| | | //根据学学员ID,获取用户信息 |
| | | StuStudent stu = this.read(StuStudent.class, studentId); |
| | | if(stu.getStudentNo() != null){ |
| | |
| | | stu.setStudentNo(studentNo); |
| | | stu.setMobilePhone(phoneNo); |
| | | TraceUtils.setUpdateTrace(stu); |
| | | stu.setPhoto(photo); |
| | | stu.setPassporName(passporName); |
| | | stu.setNationality(nationality); |
| | | stu.setAncestralHome(ancestralHome); |
| | | stu.setBirthday(birthday); |
| | | stu.setBirthplace(birthplace); |
| | | stu.setChinaStatus(chinaStatus); |
| | | stu.setRegisteredAddress(registeredAddress); |
| | | stu.setHomeAddress(homeAddress); |
| | | stu.setReligiousBelief(religiousBelief); |
| | | stu.setEmail(email); |
| | | stu.setWorkUnit(workUnit); |
| | | save(stu); |
| | | |
| | | User user = this.read(User.class, stu.getUserId()); |
| | |
| | | QUser qUser = QUser.user; |
| | | QStuStudent qStuStudent = QStuStudent.stuStudent; |
| | | return this.getQueryFactory() |
| | | .select(qStuStudent.studentId, qStuStudent.name, qStuStudent.studentNo, qStuStudent.sex, |
| | | .select(qStuStudent.photo,qStuStudent.passporName,qStuStudent.nationality,qStuStudent.ancestralHome,qStuStudent.birthday,qStuStudent.birthplace,qStuStudent.chinaStatus, |
| | | qStuStudent.registeredAddress,qStuStudent.homeAddress,qStuStudent.religiousBelief,qStuStudent.email,qStuStudent.workUnit,qStuStudent.graduationDestination, |
| | | qStuStudent.studentId, qStuStudent.name, qStuStudent.studentNo, qStuStudent.sex, |
| | | qStuStudent.mobilePhone, qStuStudent.status, qStuStudent.studyDuration, qStuStudent.tenantId, qStuStudent.score, qStuStudent.graduationText, |
| | | qUser.imgPath) |
| | | .from(qUser, qStuStudent) |
| | |
| | | public StuStudent getStudentByNo(String studentNo) { |
| | | return this.findUnique("from StuStudent where studentNo=? ", CollectionUtils.newList(studentNo), StuStudent.class); |
| | | } |
| | | |
| | | @Override |
| | | public StuStudent getStudentDetails(String userId) { |
| | | return this.findUnique("from StuStudent where deleteFlag is false and userId=? ", CollectionUtils.newList(userId), StuStudent.class); |
| | | } |
| | | |
| | | @Override |
| | | public List<StuStudent> getStudentByclassId(String classId) { |
| | | QStuStudent qClassStudent=QStuStudent.stuStudent; |