派生自 projectDept/qhighschool

yn147
2023-03-28 c9cfe7bcc6f309e7278cac8bddfce9f281fd5cde
src/main/java/com/qxueyou/scc/teach/student/service/impl/StudentService.java
@@ -83,7 +83,7 @@
    public Result insertStudent(String classId, String name, String studentNo, boolean sex, String phoneNo, String orgId,String comName) {
        if (dao.exists(studentNo, orgId)) {
            return new Result(false, "学号已存在");
            return new Result(false, "身份证已存在");
        }
        User user = userService.insertUser(name, studentNo, phoneNo, "000000", sex, orgId);
@@ -92,7 +92,9 @@
        StuStudent student = new StuStudent();
        TraceUtils.setCreateTrace(student);
        String currentTime = LocalDateTimeUtil.format(LocalDateTime.now(), "yyMMddHHmmssSSS");
        String examCardNo = currentTime.concat(RandomUtil.randomNumbers(1));
        student.setStudentNumber(examCardNo);
        student.setStatus(StuStudent.STATUS_ACTIVE);
        student.setClassId(classId);
        //student.setSubjectId(cls.getSubjects().get(0).getSubjectId());
@@ -155,7 +157,7 @@
        QStuStudent qStuStudent = QStuStudent.stuStudent;
        return this.getQueryFactory()
                .select(qStuStudent.studentId, qStuStudent.name, qStuStudent.studentNo, qStuStudent.sex,
                        qStuStudent.mobilePhone, qStuStudent.status, qStuStudent.studyDuration, qStuStudent.tenantId, qStuStudent.score,
                        qStuStudent.mobilePhone, qStuStudent.status, qStuStudent.studyDuration, qStuStudent.tenantId, qStuStudent.score, qStuStudent.graduationText,
                        qUser.imgPath)
                .from(qUser, qStuStudent)
                .where(qUser.deleteFlag.isFalse().and(qUser.userId.eq(qStuStudent.userId))
@@ -172,6 +174,7 @@
                    map.put("studyDuration", tuple.get(qStuStudent.studyDuration));
                    map.put("tenantId", tuple.get(qStuStudent.tenantId));
                    map.put("score", tuple.get(qStuStudent.score));
                    map.put("graduationText", tuple.get(qStuStudent.graduationText));
                    map.put("imgPath", tuple.get(qUser.imgPath));
                    return map;
                }).collect(Collectors.toList());