Step F first pass: 81/92 accepted; budget floor 60 calls; rejected slots moved for regeneration

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
This commit is contained in:
Kral
2026-10-03 12:10:52 +02:00
parent d3250acfb8
commit 39769afce8
741 changed files with 40573 additions and 317 deletions

View File

@@ -0,0 +1,71 @@
CLASS {{p}}driving_test_check DEFINITION PUBLIC FINAL CREATE PUBLIC.
PUBLIC SECTION.
TYPES ty_pupil_id TYPE c LENGTH 10.
TYPES ty_date TYPE d.
METHODS check
IMPORTING iv_pupil_id TYPE ty_pupil_id
iv_test_date TYPE ty_date
RAISING {{p}}cx_pupil_unknown
{{p}}cx_theory_missing
{{p}}cx_lessons_missing
{{p}}cx_fee_unpaid
{{p}}cx_recent_failure.
PRIVATE SECTION.
CONSTANTS c_min_lessons TYPE i VALUE 12.
CONSTANTS c_wait_days TYPE i VALUE 14.
CONSTANTS c_done TYPE c LENGTH 1 VALUE 'X'.
TYPES: BEGIN OF ty_pupil,
pupil_id TYPE {{p}}pupil-pupil_id,
theory_done TYPE {{p}}pupil-theory_done,
lessons_done TYPE {{p}}pupil-lessons_done,
fee_paid TYPE {{p}}pupil-fee_paid,
last_failed TYPE {{p}}pupil-last_failed,
END OF ty_pupil.
METHODS read_pupil
IMPORTING iv_pupil_id TYPE ty_pupil_id
RETURNING VALUE(rs_pupil) TYPE ty_pupil
RAISING {{p}}cx_pupil_unknown.
ENDCLASS.
CLASS {{p}}driving_test_check IMPLEMENTATION.
METHOD check.
DATA(ls_pupil) = read_pupil( iv_pupil_id ).
IF ls_pupil-theory_done = c_done.
RAISE EXCEPTION TYPE {{p}}cx_theory_missing.
ENDIF.
IF ls_pupil-lessons_done < c_min_lessons.
RAISE EXCEPTION TYPE {{p}}cx_lessons_missing
EXPORTING iv_missing = c_min_lessons - ls_pupil-lessons_done.
ENDIF.
IF ls_pupil-fee_paid <> c_done.
RAISE EXCEPTION TYPE {{p}}cx_fee_unpaid.
ENDIF.
IF ls_pupil-last_failed IS NOT INITIAL.
DATA(lv_days) = iv_test_date - ls_pupil-last_failed.
IF lv_days < c_wait_days.
RAISE EXCEPTION TYPE {{p}}cx_recent_failure
EXPORTING iv_days_left = c_wait_days - lv_days.
ENDIF.
ENDIF.
ENDMETHOD.
METHOD read_pupil.
SELECT SINGLE
FROM {{p}}pupil
FIELDS pupil_id, theory_done, lessons_done, fee_paid, last_failed
WHERE pupil_id = @iv_pupil_id
INTO CORRESPONDING FIELDS OF @rs_pupil.
IF sy-subrc <> 0.
RAISE EXCEPTION TYPE {{p}}cx_pupil_unknown.
ENDIF.
ENDMETHOD.
ENDCLASS.