This commit is contained in:
Vinjor 2025-02-20 09:30:38 +08:00
parent c02b4143b8
commit d0b3090ce5
5 changed files with 12 additions and 4 deletions

View File

@ -85,7 +85,7 @@ public interface DlDriveSchoolStudentMapper extends BaseMapper<DlDriveSchoolStud
* @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, 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);
}

View File

@ -54,5 +54,5 @@ public interface DriveSchoolCarMapper extends BaseMapper<DriveSchoolCar>
* @param endTime 截止时间
* @return java.util.List<cn.iocoder.yudao.module.base.vo.DriveSchoolCar>
**/
IPage<DriveSchoolCar> selectTrainCar(@Param("coachId")Long coachId, @Param("startTime") String startTime, @Param("endTime")String endTime, Page<DriveSchoolCar> page);
IPage<DriveSchoolCar> selectTrainCar(@Param("coachId")Long coachId, @Param("startTime") String startTime, @Param("endTime")String endTime,@Param("searchValue")String searchValue, Page<DriveSchoolCar> page);
}

View File

@ -94,6 +94,7 @@ public class TrainController {
public CommonResult<IPage<?>> indexGetTrainList(@RequestParam(value = "type") String type,
@RequestParam(value = "timeType") String timeType,
@RequestParam(value = "coachId",required = false) Long coachId,
@RequestParam(value = "searchValue",required = false) String searchValue,
@RequestParam(value = "startTime",required = false) String startTime,
@RequestParam(value = "endTime",required = false) String endTime,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@ -119,7 +120,7 @@ public class TrainController {
}
if("student".equals(type)){
Page<DlDriveSchoolStudent> page = new Page<>(pageNo,pageSize);
IPage<DlDriveSchoolStudentVO> studentPage = studentMapper.selectTrainStudent(coachId,startTimeStr,endTimeStr,page);
IPage<DlDriveSchoolStudentVO> studentPage = studentMapper.selectTrainStudent(coachId,startTimeStr,endTimeStr,searchValue,page);
studentPage.getRecords().forEach(item->{
//查每个学生的当前所处的科目
item.setProcess(processService.selectByUserId(item.getUserId(),item.getCoachId()));
@ -128,7 +129,7 @@ public class TrainController {
}else{
//训练车辆
Page<DriveSchoolCar> page = new Page<>(pageNo,pageSize);
return success(carMapper.selectTrainCar(coachId,startTimeStr,endTimeStr,page));
return success(carMapper.selectTrainCar(coachId,startTimeStr,endTimeStr,searchValue,page));
}
}
}

View File

@ -135,6 +135,9 @@
<if test="coachId != null and coachId != ''">
AND dst.coach_id = #{coachId}
</if>
<if test="searchValue != null and searchValue != ''">
AND dss.name LIKE CONCAT('%',#{searchValue},'%')
</if>
<if test="startTime!=null and startTime!=''">
AND dst.create_time &gt;= #{startTime}
</if>

View File

@ -43,6 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="entity.brand != null and entity.brand != ''"> and brand = #{entity.brand}</if>
<if test="entity.carModel != null and entity.carModel != ''"> and car_model = #{entity.carModel}</if>
<if test="entity.carNo != null and entity.carNo != ''"> and car_no = #{entity.carNo}</if>
<if test="entity.carNo != null and entity.carNo != ''"> and car_no = #{entity.carNo}</if>
<if test="entity.carPhoto != null and vcarPhoto != ''"> and car_photo = #{entity.carPhoto}</if>
<if test="entity.carRegisterDate != null "> and car_register_date = #{entity.carRegisterDate}</if>
<if test="entity.inspectionDate != null "> and inspection_date = #{entity.inspectionDate}</if>
@ -110,6 +111,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="coachId != null and coachId != ''">
AND dst.coach_id = #{coachId}
</if>
<if test="searchValue != null and searchValue != ''">
AND dsc.car_no LIKE CONCAT('%',#{searchValue},'%')
</if>
<if test="startTime!=null and startTime!=''">
AND dst.create_time &gt;= #{startTime}
</if>