0513 人员管理教练部分修改

This commit is contained in:
Lx 2025-05-13 17:50:49 +08:00
parent 0111bb8b01
commit 5b0ae0a561
2 changed files with 10 additions and 2 deletions

View File

@ -287,7 +287,7 @@ public class DlDriveSchoolCoachServiceImpl extends ServiceImpl<DlDriveSchoolCoac
DlDriveSchoolCoach coach = getById(id);
result.setCoachInfo(coach);
/*2.车辆信息*/
DriveSchoolCar schoolCar = new DriveSchoolCar();
/*DriveSchoolCar schoolCar = new DriveSchoolCar();
if (ObjectUtil.isNotEmpty(schoolCar)) {
if (null != coach.getUserId()) {
schoolCar = schoolCarService.selectByCoachId(coach.getUserId());
@ -296,6 +296,14 @@ public class DlDriveSchoolCoachServiceImpl extends ServiceImpl<DlDriveSchoolCoac
schoolCar.setCarOld(carOld);
}
}
}*/
DriveSchoolCar schoolCar = null;
if (coach.getUserId() != null) {
schoolCar = schoolCarService.selectByCoachId(coach.getUserId());
if (schoolCar != null && schoolCar.getCarRegisterDate() != null) {
Long carOld = DateUtil.betweenYear(schoolCar.getCarRegisterDate(), new Date(), true);
schoolCar.setCarOld(carOld);
}
}
result.setCar(schoolCar);
/*3.统计教练的学生基本信息*/

View File

@ -41,7 +41,7 @@
LEFT JOIN drive_school_coach_course dscc ON main.id = dscc.coach_id AND dscc.deleted = 0
LEFT JOIN drive_school_car dsc ON main.user_id = dsc.user_id AND dsc.deleted = 0
<where>
main.deleted = 0 AND dscc.is_sign = 1 AND dscc.deleted = 0 AND dscc.if_end = 0
main.deleted = 0
<if test="entity.type != null and entity.type != ''">
AND main.type = #{entity.type}
</if>