-
Notifications
You must be signed in to change notification settings - Fork 127
Staff Welfare Report: Timeout fix (DTO) + add staff filter #19692
Copy link
Copy link
Closed
Labels
Description
Problem
The Staff Welfare Report at `/reportInstitution/report_opd_pharmacy_staff_welfare.xhtml` times out on large date ranges due to N+1 lazy-load queries (each row accesses `p.bill.toStaff.person.nameWithTitle` which triggers 3 lazy joins per row).
Additionally, there is no filter to narrow results by a specific staff member.
Fix Required
- DTO conversion — Replace entity-based `Payment` list with a single JOIN query returning `StaffWelfarePaymentDTO` (eliminates N+1)
- Staff filter — Add `p:autoComplete` staff selector; pass optional staff to DTO query
- Print page — Update `report_opd_pharmacy_staff_welfare_print.xhtml` to use DTO list
Files
- `src/main/java/com/divudi/bean/report/ServiceSummery.java`
- `src/main/java/com/divudi/core/data/dto/StaffWelfarePaymentDTO.java` (new)
- `src/main/webapp/reportInstitution/report_opd_pharmacy_staff_welfare.xhtml`
- `src/main/webapp/reportInstitution/report_opd_pharmacy_staff_welfare_print.xhtml`
Reported By
Galle Co-operative Hospital — session 2026-04-03
Reactions are currently unavailable