Przeglądaj źródła

1、学生会部门,条件查询未生效问题
2、课表查看,通过专业筛选查询时无法查询出课表

dzx 6 miesięcy temu
rodzic
commit
a9661403dc

+ 5 - 0
src/main/java/com/xjrsoft/module/student/dto/CadreDeptTreeDto.java

@@ -1,5 +1,6 @@
 package com.xjrsoft.module.student.dto;
 
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 
@@ -12,5 +13,9 @@ import lombok.Data;
 @Data
 public class CadreDeptTreeDto {
 
+    @ApiModelProperty("部门名称")
+    private String name;
 
+    @ApiModelProperty("部门编码")
+    private String code;
 }

+ 1 - 7
src/main/resources/mapper/base/BaseClassCourse.xml

@@ -17,17 +17,11 @@
         SUM(t7.discount_price) AS count
         FROM base_class_admin_course t
         inner JOIN base_class t9 ON t9.id = t.class_id
-
         LEFT JOIN xjr_user t1 ON t1.id = t9.teacher_id
-
-        LEFT JOIN base_class_major_set t2 ON t2.class_id = t.class_id
-        LEFT JOIN base_major_set t3 ON t3.id = t2.major_set_id
-
+        LEFT JOIN base_major_set t3 ON t3.id = t9.major_set_id
         LEFT JOIN xjr_department t4 ON t4.id = t9.org_id
-
         LEFT JOIN base_class_course t5 ON t5.class_id = t.id and t5.delete_mark = 0
         LEFT JOIN base_course_subject t6 ON t6.id = t5.course_id
-
         LEFT JOIN textbook t7 ON t7.id = t5.textbook_id
         WHERE t.delete_mark = 0
         <if test="dto.semester != null">

+ 1 - 2
src/main/resources/mapper/courseTable/CourseTable.xml

@@ -8,7 +8,6 @@
         LEFT JOIN base_classroom t3 ON t1.site_id = t3.id
         LEFT JOIN base_office_build t4 ON t3.office_build_id = t4.id
         LEFT JOIN base_class t5 ON t1.class_id = t5.id
-        LEFT JOIN base_class_major_set t7 ON t7.class_id = t5.id
         LEFT JOIN base_grade t6 ON t5.grade_id = t6.id
         where t1.status = 1
         <if test="dto.semesterId != null">
@@ -29,7 +28,7 @@
                 and t5.id = #{dto.classId}
             </if>
             <if test="dto.majorSetId != null">
-                and t7.major_set_id = #{dto.majorSetId}
+                and t5.major_set_id = #{dto.majorSetId}
             </if>
         </if>
         <if test="dto.startDate != null and dto.endDate != null">

+ 2 - 3
src/main/resources/mapper/evaluate/EvaluateManageMapper.xml

@@ -138,13 +138,12 @@
             left join evaluate_template t7 on t7.id = t1.evaluate_template_id
             left join xjr_dictionary_detail t8 on t8.code = t7.evaluate_type
             left join base_classroom t9 on t9.id = t5.classroom_id
-            left join base_class_major_set t10 on t10.class_id = t5.id
-            left join base_major_set t11 on t11.id = t10.major_set_id
+            left join base_major_set t11 on t11.id = t5.major_set_id
         where t.create_date  like concat('%', #{dto.todayDate}, '%')
           and t2.user_id = #{dto.loginUserId}
           and t.evaluate_manage_id = #{dto.evaluateManageId}
         <if test="dto.majorId != null and dto.majorId > 0">
-            and t10.major_id = #{dto.majorId}
+            and t5.major_set_id = #{dto.majorId}
         </if>
         <if test="dto.officeBuildId != null and dto.officeBuildId > 0">
             and t8.officeBuildId = #{dto.officeBuildId}

+ 6 - 0
src/main/resources/mapper/student/CadreDeptMapper.xml

@@ -11,6 +11,12 @@
         FROM cadre_dept t
                  LEFT JOIN xjr_user t1 ON (t1.id = t.instructor_user_id)
         WHERE t.delete_mark = 0
+        <if test="dto.name != null and dto.name !=''">
+            and t.name like concat('%', #{dto.name},'%')
+        </if>
+        <if test="dto.code != null and dto.code !=''">
+            and t.code like concat('%', #{dto.code},'%')
+        </if>
         ORDER BY t.id DESC
     </select>
 </mapper>