Changes in create Application api for gepafin

This commit is contained in:
rajesh
2025-02-11 18:24:18 +05:30
parent 71032a0288
commit 6bb531789a
2 changed files with 20 additions and 0 deletions

View File

@@ -158,4 +158,8 @@ public interface ApplicationRepository extends JpaRepository<ApplicationEntity,
@Param("status") String status);
@Query("SELECT SUM(a.amountAccepted) FROM ApplicationEntity a WHERE a.hubId = :hubId AND a.userId = :userId AND a.status = 'APPROVED' AND a.userWithCompany.id = :userWithCompanyId AND a.isDeleted = false")
BigDecimal sumAmountRequestedByHubIdAndUserId(@Param("hubId") Long hubId, @Param("userId") Long userId, @Param("userWithCompanyId") Long userWithCompanyId);
List<ApplicationEntity> findByUserIdAndUserWithCompany_IdAndCall_IdAndIsDeletedFalseAndStatusNot(
Long userId, Long userWithCompanyId, Long callId, String status
);
}