Skip to content

Fixed UI issues.

Трајковски Андреј requested to merge ui-fix into dev

Fixed the issues on the details page of a Civil bond, create page and other UI elements not displaying:

  1. Updated CivilBondsProspectController:
  • editForm now uses findByProspectCodeWithCoupons instead of findByProspectCode.
  • details uses findByProspectCodeWithCoupons and now adds: activeOffersCount, activePaymentsCount, activeAllocationsCount
  1. Updated CivilBondProspectServiceImpl:
  • Marked updateProspect as @Transactional.
  • In updateProspect, prospect is loaded via findByProspectCodeWithCoupons before addCoupons.

Additionally, added Performance improvements:

  1. Payment import and persistence optimization
  • Added batched persistence for imported payments (saveAll in chunks + flush) to reduce persistence-context growth and memory pressure on large imports.
  • Removed redundant object reconstruction during save (payments are now persisted directly).
  • Marked read/query methods with @Transactional(readOnly = true).
  1. Excel import parsing optimizations
  • Replaced repeated formatter allocations with reusable formatters.
  • Pre-sized collections where possible.
  • Simplified row parsing flow to reduce unnecessary checks and allocations.
  • Kept behavior compatible with existing import format.
  1. Domain-level loop and collection efficiency
  • Replaced stream-heavy aggregate operations with loop-based implementations in: updatePaymentMismatch(), getActiveOffersCount(), getActiveAllocationsCount(), getActivePaymentsCount()
  • Optimized coupon handling: Sort once in addCoupons(...), Return unmodifiable list in getCoupons(), Added @OrderBy("couponDate ASC") for consistent ordering
  1. Service-layer read-only transaction tuning
  • Applied @Transactional(readOnly = true) to query-only methods to reduce dirty-check/flush overhead.
  • Reduced repeated value-object and formatter creation in prospect service methods.

Merge request reports

Loading