Explorar el Código

开学报到调整

dzx hace 10 meses
padre
commit
4f0fc63be4

+ 4 - 0
src/main/java/com/xjrsoft/module/student/service/impl/StudentReportPlanServiceImpl.java

@@ -8,6 +8,7 @@ import com.github.yulichang.base.MPJBaseServiceImpl;
 import com.github.yulichang.wrapper.MPJLambdaWrapper;
 import com.xjrsoft.common.enums.DeleteMark;
 import com.xjrsoft.common.enums.EnabledMark;
+import com.xjrsoft.common.exception.MyException;
 import com.xjrsoft.module.base.entity.BaseClass;
 import com.xjrsoft.module.organization.entity.User;
 import com.xjrsoft.module.organization.service.IUserService;
@@ -141,6 +142,9 @@ public class StudentReportPlanServiceImpl extends MPJBaseServiceImpl<StudentRepo
         List<BaseStudentUserPageVo> studentList = studentService.getStudentList(new BaseStudentUserPageDto() {{
             setClassIds(classIds);
         }});
+        if(studentList.isEmpty()){
+            throw new MyException("未能查询到学生,请联系管理员");
+        }
 
         Date createDate = new Date();
         List<StudentReportRecord> insertList = new ArrayList<>();

+ 1 - 1
src/main/resources/mapper/student/StudentReportPlanMapper.xml

@@ -26,7 +26,7 @@
         INNER JOIN student_report_plan_class_relation t2 ON t1.id = t2.class_id
         INNER JOIN student_report_plan t3 ON t2.student_report_plan_id = t3.id
         WHERE t3.delete_mark = 0 AND NOW() BETWEEN t3.start_time AND t3.end_time
-        AND t3.id != #{id} and t3.semester_id != #{semesterId}
+        AND t3.id != #{id} and t3.status = 1
         and t1.id in
         <foreach item="classId" index="index" collection="classIds" open="(" close=")" separator=",">
             #{classId}

+ 1 - 1
src/main/resources/mapper/student/StudentReportRecordMapper.xml

@@ -62,7 +62,7 @@
         t3.name,t7.name AS gender,t3.credential_number,t3.mobile,t8.name AS student_type_cn,
         t9.name AS stduy_status_cn,t10.name AS archives_status_cn,
         t1.report_time,IF(t1.report_time IS NULL, 0, 1) as is_report,
-        (SELECT mobile FROM base_student_family_member WHERE delete_mark = 0 AND user_id = t1.user_id ORDER BY create_date ASC LIMIT 0,1) as parent_mobile
+        (SELECT telephone FROM base_student_family WHERE delete_mark = 0 AND user_id = t1.user_id ORDER BY create_date ASC LIMIT 0,1) as parent_mobile
         FROM student_report_record t1
         INNER JOIN base_student_school_roll t2 ON t1.user_id = t2.user_id
         INNER JOIN xjr_user t3 ON t3.id = t1.user_id