Browse Source

预报名地区列表查询添加方法

小么熊🐻 1 year ago
parent
commit
aa10b7af46

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

@@ -122,6 +122,20 @@ public class TmsStudentInfoController extends BaseController {
         return toResponsePageInfo(stuInfoList);
     }
 
+    /**
+     * 查询我的学员预报名列表
+     */
+    @GetMapping("/myStudenTempList")
+    @ApiOperation("预报地区-查询我的学员预报名列表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "当前页码", dataType = "int", paramType = "query", required = false),
+            @ApiImplicitParam(name = "pageSize", value = "每页数据量", dataType = "int", paramType = "query", required = false),
+    })
+    public ResponsePageInfo<TmsStudentInfoTempVo> myStudenTempList(@ModelAttribute TmsStudentInfoTempDTO studentInfoTempDTO) {
+        startPage();
+        List<TmsStudentInfoTempVo> stuInfoTempList = studentInfoService.getTmsMyStudentInfoTempList(studentInfoTempDTO);
+        return toResponsePageInfo(stuInfoTempList);
+    }
 
     /**
      * 查询学员预报名列表
@@ -133,11 +147,23 @@ public class TmsStudentInfoController extends BaseController {
             @ApiImplicitParam(name = "pageSize", value = "每页数据量", dataType = "int", paramType = "query", required = false),
     })
     public ResponsePageInfo<TmsStudentInfoTempVo> studenTempList(@ModelAttribute TmsStudentInfoTempDTO studentInfoTempDTO) {
+        if(studentInfoTempDTO.getCoachId()!=null) {
+            CoachManySchool coachManySchool = coachManySchoolService.getById(studentInfoTempDTO.getCoachId());
+            if(coachManySchool!=null) {
+                studentInfoTempDTO.setSchoolId(coachManySchool.getSchoolIds());
+            }
+        }
+        studentInfoTempDTO.setCoachId(null);
         startPage();
         List<TmsStudentInfoTempVo> stuInfoTempList = studentInfoService.getTmsStudentInfoTempList(studentInfoTempDTO);
         return toResponsePageInfo(stuInfoTempList);
     }
 
+
+
+
+
+
     /**
      * 根据学员id获取详细信息
      */

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

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

+ 2 - 0
jsjp-service/src/main/java/com/miaxis/tms/mapper/TmsStudentInfoMapper.java

@@ -57,4 +57,6 @@ public interface TmsStudentInfoMapper extends BaseMapper<TmsStudentInfoVo> {
     List<TmsStudentPhotoVo> getTmsStudentPhotoById(TmsStudentInfoPhotoDTO studentInfoPhotoDTO);
 
     List<TmsStudentInfoVo> getTmsMyStudentInfoList(TmsStudentInfoDTO studentInfoDto);
+
+    List<TmsStudentInfoTempVo> getTmsMyStudentInfoTempList(TmsStudentInfoTempDTO studentInfoTempDto);
 }

+ 2 - 0
jsjp-service/src/main/java/com/miaxis/tms/service/ITmsStudentInfoService.java

@@ -26,6 +26,8 @@ public interface ITmsStudentInfoService extends IService<TmsStudentInfoVo> {
 
     List<TmsStudentInfoTempVo> getTmsStudentInfoTempList(TmsStudentInfoTempDTO studentInfoTempDTO);
 
+    List<TmsStudentInfoTempVo> getTmsMyStudentInfoTempList(TmsStudentInfoTempDTO studentInfoTempDTO);
+
     TmsStudentInfoIdVo getTmsStudentInfoById(TmsStudentInfoIdDTO stuIdDTO);
 
     int upStuAppCoachIdById(TmsStudentInfoQrDTO studentInfoQrDTO);

+ 6 - 0
jsjp-service/src/main/java/com/miaxis/tms/service/impl/TmsStudentInfoServiceImpl.java

@@ -59,6 +59,12 @@ public class TmsStudentInfoServiceImpl extends ServiceImpl<TmsStudentInfoMapper,
         return list;
     }
 
+    @Override
+    public List<TmsStudentInfoTempVo> getTmsMyStudentInfoTempList(TmsStudentInfoTempDTO studentInfoTempDto) {
+        List<TmsStudentInfoTempVo> list =  mapper.getTmsMyStudentInfoTempList(studentInfoTempDto);
+        return list;
+    }
+
     @Override
     public TmsStudentInfoIdVo getTmsStudentInfoById(TmsStudentInfoIdDTO stuIdDTO) {
         //台州

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

@@ -171,6 +171,21 @@
         ORDER BY t1.TSO_ID desc
     </select>
 
+    <select id="getTmsMyStudentInfoTempList"  parameterType="com.miaxis.tms.dto.TmsStudentInfoTempDTO" resultMap="TmsStudentInfoTempResultMap">
+        select t1.TSO_ID, t1.TSO_IDCARD, t1.TSO_NAME,t1.TSO_SEX,t1.Tso_Phone,t1.TSO_APPLYDATE, t1.TSO_STATE , t1.TSO_TRAINTYPE, t1.tso_photo_path, t1.TSO_REMARK,'1' as bm_type
+        from tms_student_info_temp@tms${city} t1
+        <where>
+            AND t1.TSO_BUSITYPE in ('0', '1')
+            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="coachId!=null" >  AND ( t1.TSO_COACHID = #{coachId,jdbcType=NUMERIC }
+                or t1.TSO_COACH_LEADER = #{coachId,jdbcType=NUMERIC } ) </if>
+        </where>
+        ORDER BY t1.TSO_ID desc
+    </select>
+
 
     <select id="getTmsStudentInfoTempList"  parameterType="com.miaxis.tms.dto.TmsStudentInfoTempDTO" resultMap="TmsStudentInfoTempResultMap">
         select t1.TSO_ID, t1.TSO_IDCARD, t1.TSO_NAME,t1.TSO_SEX,t1.Tso_Phone,t1.TSO_APPLYDATE, t1.TSO_STATE , t1.TSO_TRAINTYPE, t1.tso_photo_path, t1.TSO_REMARK,'1' as bm_type
@@ -180,7 +195,12 @@
             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="coachId!=null" >  AND ( t1.TSO_COACHID = #{coachId,jdbcType=NUMERIC }
                                         or t1.TSO_COACH_LEADER = #{coachId,jdbcType=NUMERIC } ) </if>
         </where>