瀏覽代碼

实习教师收集审核

dzx 5 月之前
父節點
當前提交
f5e51b2a67

+ 2 - 1
src/main/java/com/xjrsoft/module/internship/mapper/InternshipPlanTeacherMapper.java

@@ -6,6 +6,7 @@ import com.xjrsoft.module.internship.dto.InternshipPlanTeacherPageDto;
 import com.xjrsoft.module.internship.entity.InternshipPlanTeacher;
 import com.xjrsoft.module.internship.vo.InternshipPlanTeacherPageVo;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 /**
 * @title: 实习计划带队老师表
@@ -16,5 +17,5 @@ import org.apache.ibatis.annotations.Mapper;
 @Mapper
 public interface InternshipPlanTeacherMapper extends MPJBaseMapper<InternshipPlanTeacher> {
 
-    Page<InternshipPlanTeacherPageVo> getPage(Page<InternshipPlanTeacherPageVo> page, InternshipPlanTeacherPageDto dto);
+    Page<InternshipPlanTeacherPageVo> getPage(Page<InternshipPlanTeacherPageVo> page, @Param("dto") InternshipPlanTeacherPageDto dto);
 }

+ 12 - 27
src/main/resources/mapper/internship/InternshipPlanTeacherMapper.xml

@@ -2,7 +2,7 @@
 <!DOCTYPE mapper
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.xjrsoft.module.internship.mapper.InternshipPlanManageMapper">
+<mapper namespace="com.xjrsoft.module.internship.mapper.InternshipPlanTeacherMapper">
     <select id="getPage" parameterType="com.xjrsoft.module.internship.dto.InternshipPlanTeacherPageDto" resultType="com.xjrsoft.module.internship.vo.InternshipPlanTeacherPageVo">
         SELECT t1.id, t2.name,
         (
@@ -14,32 +14,17 @@
         INNER JOIN xjr_user t2 ON t1.user_id = t2.id
         WHERE t1.delete_mark = 0 AND t2.delete_mark = 0
         and t1.internship_plan_manage_id = #{dto.internshipPlanManageId}
-        <if test="dto.internshipPlanName != null and dto.internshipPlanName != ''">
-            and t1.internship_plan_name like concat('%', #{dto.internshipPlanName}, '%')
-        </if>
-        <if test="dto.internshipPlanType != null and dto.internshipPlanType != ''">
-            and t1.internship_plan_type = #{dto.internshipPlanType}
-        </if>
-        <if test="dto.internshipUnitSource != null and dto.internshipUnitSource != ''">
-            and t1.internship_unit_source = #{dto.internshipUnitSource}
-        </if>
-        <if test="dto.internshipSiteType != null and dto.internshipSiteType != ''">
-            and t1.internship_site_type = #{dto.internshipSiteType}
-        </if>
-        <if test="dto.internshipUnitName != null and dto.internshipUnitName != ''">
-            and t1.internship_unit_name like concat('%', #{dto.internshipUnitName}, '%')
-        </if>
-        <if test="dto.startTimeStart != null and dto.startTimeEnd != null">
-            and t1.start_time between #{dto.startTimeStart} and #{dto.startTimeEnd}
-        </if>
-        <if test="dto.endTimeStart != null and dto.endTimeEnd != null">
-            and t1.start_time between #{dto.endTimeStart} and #{dto.endTimeEnd}
-        </if>
-        <if test="dto.internshipWhereabouts != null and dto.internshipWhereabouts != ''">
-            and t1.internship_whereabouts like concat('%', #{dto.internshipWhereabouts}, '%')
-        </if>
-        <if test="dto.baseSemesterId != null">
-            and t1.base_semester_id = #{dto.baseSemesterId}
+        <if test="dto.name != null and dto.name != ''">
+            and t2.name like concat('%', #{dto.name}, '%')
+        </if>
+        <if test="dto.className != null and dto.className != ''">
+            and t1.id in (
+            SELECT GROUP_CONCAT(a1.name) FROM base_class a1
+            INNER JOIN internship_plan_class a2 ON a1.id = a2.class_id
+            WHERE a1.delete_mark = 0 AND a2.delete_mark = 0
+            AND a2.internship_plan_teacher_id = t1.id
+            and a2.name like concat('%', #{dto.className}, '%')
+            )
         </if>
     </select>
 </mapper>