This commit is contained in:
Lx 2025-09-09 14:51:47 +08:00
parent 1f410a5bd3
commit f3eb6fc93e

View File

@ -129,7 +129,28 @@
</select> </select>
<select id="noClockInRemindByUserId" resultType="cn.iocoder.yudao.module.train.vo.NoClockInRemindVO"> <select id="noClockInRemindByUserId" resultType="cn.iocoder.yudao.module.train.vo.NoClockInRemindVO">
SELECT coach_id, SELECT
dst.coach_id,
dst.coach_name,
COUNT(dst.user_id) AS student_count,
GROUP_CONCAT(DISTINCT CONCAT(dst.user_name, '(', '科目', dst.subject, ')') SEPARATOR '') AS student_names
FROM drive_school_train dst
WHERE dst.coach_id = #{userId}
AND dst.car_no = #{carNo}
AND dst.end_time IS NULL
AND dst.deleted = 0
AND NOT EXISTS (
SELECT 1
FROM drive_school_process dsp
WHERE dsp.user_id = dst.user_id
AND dsp.subject = dst.subject
AND dsp.deleted = 0
AND (dsp.status = '2' OR dsp.exam_status = '1')
)
GROUP BY dst.coach_id, dst.coach_name
</select>
<!-- SELECT coach_id,
coach_name, coach_name,
COUNT(user_id) AS student_count, COUNT(user_id) AS student_count,
GROUP_CONCAT(DISTINCT CONCAT(user_name, '(', '科目', subject, ')') SEPARATOR '' ) AS student_names, GROUP_CONCAT(DISTINCT CONCAT(user_name, '(', '科目', subject, ')') SEPARATOR '' ) AS student_names,
@ -141,9 +162,7 @@
AND deleted = 0 AND deleted = 0
AND tenant_id = 180 AND tenant_id = 180
GROUP BY coach_id, GROUP BY coach_id,
coach_name coach_name -->
</select>
<select id="selectStudentByCoachClockId" resultType="cn.iocoder.yudao.module.train.entity.Train"> <select id="selectStudentByCoachClockId" resultType="cn.iocoder.yudao.module.train.entity.Train">
SELECT SELECT
subject, subject,