小么熊🐻 1 жил өмнө
parent
commit
3c896878f5

+ 6 - 0
jsjp-admin/src/main/java/com/miaxis/app/controller/tms/TmsStudentInfoController.java

@@ -95,6 +95,12 @@ public class TmsStudentInfoController extends BaseController {
     })
     public ResponsePageInfo<TmsStudentInfoVo> list(@ModelAttribute TmsStudentInfoDTO studentInfoDTO) {
         startPage();
+        if(studentInfoDTO.getCoachId()!=null) {
+            CoachManySchool coachManySchool = coachManySchoolService.getById(studentInfoDTO.getCoachId());
+            if(coachManySchool!=null) {
+                studentInfoDTO.setSchoolId(coachManySchool.getSchoolIds());
+            }
+        }
         List<TmsStudentInfoVo> stuInfoList = studentInfoService.getTmsStudentInfoList(studentInfoDTO);
         return toResponsePageInfo(stuInfoList);
     }

+ 1 - 1
jsjp-service/src/main/java/com/miaxis/tms/dto/TmsStudentInfoDTO.java

@@ -14,7 +14,7 @@ public class TmsStudentInfoDTO implements Serializable {
     private String field;
 
     @ApiModelProperty(value = "驾校ID")
-    private Long schoolId;
+    private String schoolId;
 
     @ApiModelProperty(value = "教练员ID")
     private Long coachId;

+ 8 - 1
jsjp-service/src/main/resources/mapper/tms/TmsStudentInfoMapper.xml

@@ -124,7 +124,14 @@
             AND t1.TSO_LOGOUT = 0
             <if test="appCoachId!=null" > AND t1.TSO_APP_COACH_ID = #{appCoachId,jdbcType=NUMERIC } </if>
             <if test="field != null  and field != ''"> AND (t1.Tso_Name like '%' || #{field,jdbcType=VARCHAR} || '%' or t1.TSO_IDCARD like '%' || #{field,jdbcType=VARCHAR} || '%' or t1.Tso_Phone like '%' || #{field,jdbcType=VARCHAR} || '%') </if>
-            <if test="schoolId != null "> and t1.TSO_SCHOOL_ID = #{schoolId,jdbcType=NUMERIC} </if>
+            <!--<if test="schoolId != null "> and t1.TSO_SCHOOL_ID = #{schoolId,jdbcType=NUMERIC} </if>-->
+
+            <if test="schoolId != null and schoolId !='' "> and t1.TSO_SCHOOL_ID in
+                <foreach item="sid" index="index" collection="schoolId.split(',')" open="(" separator="," close=")">
+                    #{sid}
+                </foreach>
+            </if>
+
             <if test="state != null  and state != ''"> AND t1.TSO_STATE = #{state,jdbcType=VARCHAR }</if>
             <if test="coachId!=null" >  AND ( t1.TSO_COACHID = #{coachId,jdbcType=NUMERIC }
                                         or t1.TSO_COACH_LEADER = #{coachId,jdbcType=NUMERIC } ) </if>