This commit is contained in:
PQZ 2025-02-21 10:27:25 +08:00
parent 89a6bcd013
commit 1d7a423e3a
5 changed files with 138 additions and 28 deletions

View File

@ -126,7 +126,7 @@ public class DlDriveSchoolStudentController {
**/
@GetMapping("/indexStuentList")
@Operation(summary = "首页数据统计查询接口")
public CommonResult<List<?>> indexGetTrainList(@RequestParam(value = "type") String type,
public CommonResult<List<?>> indexStuentList(@RequestParam(value = "type") String type,
@RequestParam(value = "timeType") String timeType,
@RequestParam(value = "coachId", required = false) Long coachId,
@RequestParam(value = "startTime", required = false) String startTime,
@ -152,4 +152,46 @@ public class DlDriveSchoolStudentController {
}
return success(schoolStudentService.indexGetTrainList(type,coachId,startTimeStr,endTimeStr));
}
/**
* 查询自来学生列表
* @author PQZ
* @date 11:41 2025/2/20
* @param type 时间查询类型01驾校统招02教练自招03自来客户
* @param timeType 时间查询类型all-全部|day-当日|month-当月|more-自定义
* @param coachId 教练id
* @param startTime 查询时间范围--开始
* @param endTime 查询时间范围--结束
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<java.util.List<?>>
**/
@GetMapping("/indexGetFormList")
@Operation(summary = "首页数据统计查询接口")
public CommonResult<List<?>> indexGetFormList(@RequestParam(value = "type") String type,
@RequestParam(value = "timeType") String timeType,
@RequestParam(value = "coachId", required = false) Long coachId,
@RequestParam(value = "startTime", required = false) String startTime,
@RequestParam(value = "endTime", required = false) String endTime){
//默认查全部数据
String startTimeStr = "";
String endTimeStr = "";
if("more".equals(timeType)){
if(StringUtils.isNotEmpty(startTime)){
startTimeStr = startTime+" 00:00:01";
}
if(StringUtils.isNotEmpty(endTime)) {
endTimeStr = endTime + " 23:59:59";
}
}else if("month".equals(timeType)){
//当月
startTimeStr = DateUtil.format(DateUtil.beginOfMonth(DateUtil.date()),"yyyy-MM-dd")+" 00:00:01";
endTimeStr = DateUtil.format(DateUtil.endOfMonth(DateUtil.date()),"yyyy-MM-dd")+" 23:59:59";
}else if("day".equals(timeType)){
//当天
startTimeStr = DateUtil.formatDate(DateUtil.date())+" 00:00:01";
endTimeStr = DateUtil.formatDate(DateUtil.date())+" 23:59:59";
}
return success(schoolStudentService.indexGetFormList(type,coachId,startTimeStr,endTimeStr));
}
}

View File

@ -24,7 +24,7 @@ public interface DlDriveSchoolStudentMapper extends BaseMapper<DlDriveSchoolStud
* 分页查询学生
*
* @param entity DlDriveSchoolStudentVO
* @param page 分页参数
* @param page 分页参数
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.base.vo.DlDriveSchoolStudentVO>
* @author PQZ
* @date 10:44 2025/1/18
@ -33,60 +33,66 @@ public interface DlDriveSchoolStudentMapper extends BaseMapper<DlDriveSchoolStud
/**
* 获取可以考试的学员列表
*
* @author vinjor-M
* @date 23:19 2025/1/20
**/
List<DlDriveSchoolStudent> selectCanExamStudentList(@Param("courseId")String courseId,@Param("coachId")Long coachId
,@Param("subject")Integer subject,@Param("userName")String userName);
**/
List<DlDriveSchoolStudent> selectCanExamStudentList(@Param("courseId") String courseId, @Param("coachId") Long coachId
, @Param("subject") Integer subject, @Param("userName") String userName);
/**
* 手机端人员管理查询学员信息
*
* @param staffVO {@link DlDriveSchoolStaffVO}
* @param page 分页参数
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.base.vo.DlDriveSchoolStaffVO>
* @author PQZ
* @date 14:48 2025/2/6
* @param staffVO {@link DlDriveSchoolStaffVO}
* @param page 分页参数
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.base.vo.DlDriveSchoolStaffVO>
**/
**/
IPage<DlDriveSchoolStaffVO> pageStaffStudent(DlDriveSchoolStaffVO staffVO, Page<DlDriveSchoolStaffVO> page);
/**
* 教练查询自己的学生
*
* @param pageReqVO TODO
* @param page TODO
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.base.vo.DlDriveSchoolStudentVO>
* @author vinjor-M
* @date 17:23 2025/2/12
* @param pageReqVO TODO
* @param page TODO
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.base.vo.DlDriveSchoolStudentVO>
**/
**/
IPage<DlDriveSchoolStudentVO> selectByCoachId(@Param("entity") DlDriveSchoolStudentVO pageReqVO, Page<DlDriveSchoolStudentVO> page);
/**
* 查学生列表---驾校层面查询
*
* @param coachId 教练ID
* @param startTime 开始时间
* @param endTime 结束时间
* @return java.util.List<cn.iocoder.yudao.module.base.vo.DlDriveSchoolStudentVO>
* @author vinjor-M
* @date 15:13 2025/2/14
* @param coachId 教练ID
* @param startTime 开始时间
* @param endTime 结束时间
* @return java.util.List<cn.iocoder.yudao.module.base.vo.DlDriveSchoolStudentVO>
**/
List<DlDriveSchoolStudentVO> selectStudentList(@Param("coachId")Long coachId, @Param("startTime") String startTime, @Param("endTime")String endTime);
**/
List<DlDriveSchoolStudentVO> selectStudentList(@Param("coachId") Long coachId, @Param("startTime") String startTime, @Param("endTime") String endTime);
/**
* 教练层面查询自己的学生列表
*
* @author vinjor-M
* @date 15:24 2025/2/17
**/
List<DlDriveSchoolStudentVO> selectStudentListCoach(@Param("coachId")Long coachId, @Param("startTime") String startTime, @Param("endTime")String endTime);
**/
List<DlDriveSchoolStudentVO> selectStudentListCoach(@Param("coachId") Long coachId, @Param("startTime") String startTime, @Param("endTime") String endTime);
/**
* app首页查询训练学员---指定条件下
*
* @param coachId 教练ID
* @param startTime 开始时间
* @param endTime 截止时间
* @return java.util.List<cn.iocoder.yudao.module.base.vo.DlDriveSchoolStudentVO>
* @author vinjor-M
* @date 15:53 2025/2/19
* @param coachId 教练ID
* @param startTime 开始时间
* @param endTime 截止时间
* @return java.util.List<cn.iocoder.yudao.module.base.vo.DlDriveSchoolStudentVO>
**/
IPage<DlDriveSchoolStudentVO> selectTrainStudent(@Param("coachId")Long coachId, @Param("startTime") String startTime, @Param("endTime")String endTime,@Param("searchValue")String searchValue, Page<DlDriveSchoolStudent> page);
**/
IPage<DlDriveSchoolStudentVO> selectTrainStudent(@Param("coachId") Long coachId, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("searchValue") String searchValue, Page<DlDriveSchoolStudent> page);
/**
* @param type 时间查询类型01驾校统招02教练自招03自来客户
@ -97,5 +103,16 @@ public interface DlDriveSchoolStudentMapper extends BaseMapper<DlDriveSchoolStud
* @author PQZ
* @date 17:08 2025/2/19
**/
List<StudentCountVO> indexGetTrainList(@Param("type")String type, @Param("coachId")Long coachId, @Param("startTime")String startTime, @Param("endTime")String endTime);
List<StudentCountVO> indexGetTrainList(@Param("type") String type, @Param("coachId") Long coachId, @Param("startTime") String startTime, @Param("endTime") String endTime);
/**
* @param type 时间查询类型01驾校统招02教练自招03自来客户
* @param coachId 教练id
* @param startTime 查询时间范围--开始
* @param endTime 查询时间范围--结束
* @return java.util.List<cn.iocoder.yudao.module.base.vo.DlDriveSchoolStaffVO>
* @author PQZ
* @date 11:54 2025/2/20
**/
List<DlDriveSchoolStaffVO> indexGetFormList(@Param("type") String type, @Param("coachId") Long coachId, @Param("startTime") String startTime, @Param("endTime") String endTime);
}

View File

@ -123,4 +123,16 @@ public interface DlDriveSchoolStudentService extends IService<DlDriveSchoolStude
* @return java.util.List<cn.iocoder.yudao.module.base.vo.StudentCountVO>
**/
List<StudentCountVO> indexGetTrainList(String type, Long coachId, String startTime, String endTime);
/**
*
* @author PQZ
* @date 11:43 2025/2/20
* @param type 时间查询类型01驾校统招02教练自招03自来客户
* @param coachId 教练id
* @param startTimeStr 查询时间范围--开始
* @param endTimeStr 查询时间范围--结束
* @return cn.iocoder.yudao.module.base.vo.DlDriveSchoolStaffVO
**/
List<DlDriveSchoolStaffVO> indexGetFormList(String type, Long coachId, String startTimeStr, String endTimeStr);
}

View File

@ -174,5 +174,19 @@ public class DlDriveSchoolStudentServiceImpl extends ServiceImpl<DlDriveSchoolSt
return dlDriveSchoolStudentMapper.indexGetTrainList(type,coachId,startTime,endTime);
}
/**
* @param type 时间查询类型01驾校统招02教练自招03自来客户
* @param coachId 教练id
* @param startTimeStr 查询时间范围--开始
* @param endTimeStr 查询时间范围--结束
* @return cn.iocoder.yudao.module.base.vo.DlDriveSchoolStaffVO
* @author PQZ
* @date 11:43 2025/2/20
**/
@Override
public List<DlDriveSchoolStaffVO> indexGetFormList(String type, Long coachId, String startTimeStr, String endTimeStr) {
return dlDriveSchoolStudentMapper.indexGetFormList(type,coachId,startTimeStr,endTimeStr);
}
}

View File

@ -178,4 +178,29 @@
ORDER BY
totalNum ASC;
</select>
<select id="indexGetFormList" resultType="cn.iocoder.yudao.module.base.vo.DlDriveSchoolStaffVO">
SELECT
main.id AS id,
main.avatar AS avatar,
main.name AS name,
main.phone AS phone,
dsco.course_type AS courseType
FROM
drive_school_student main
LEFT JOIN drive_school_course_order dsco ON main.user_id = dsco.user_id
WHERE main.deleted = 0
AND dsco.payment_status > 1
<if test="type != null and type != ''">
AND dsco.source = #{type}
</if>
<if test="coachId != null and coachId != ''">
AND dsco.user_id = #{coachId}
</if>
<if test="startTime != null and startTime != ''">
AND dsco.create_time &gt;= #{starTime}
</if>
<if test="endTime != null and endTime != ''">
AND dsco.create_time &lt;= #{endTime}
</if>
</select>
</mapper>