FINERACT-1971: Minor bug-fixes

This commit is contained in:
jmarta
2023-10-19 14:18:20 +02:00
committed by Adam Saghy
parent f79891b084
commit 21978cc4e1
3 changed files with 5 additions and 3 deletions
@@ -37,7 +37,8 @@ public interface EntityDatatableChecksRepository
AND dt.status = :status
AND rdt.subtype = :subtype
""")
List<EntityDatatableChecks> findByEntityAndStatusAndSubtype(String entity, Integer status, String subtype);
List<EntityDatatableChecks> findByEntityAndStatusAndSubtype(@Param("entity") String entity, @Param("status") Integer status,
@Param("subtype") String subtype);
@Query("select t from EntityDatatableChecks t WHERE t.status =:status and t.entity=:entity and t.productId = :productId ")
List<EntityDatatableChecks> findByEntityStatusAndProduct(@Param("entity") String entity, @Param("status") Long status,
@@ -1657,7 +1657,7 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ
}
private String getGroupOfficeJoinCondition(String officeHierarchy, String appTableAlias) {
return " join m_group g on g.id = " + appTableAlias + ".client_id " + getOfficeJoinCondition(officeHierarchy, "g");
return " join m_group g on g.id = " + appTableAlias + ".group_id " + getOfficeJoinCondition(officeHierarchy, "g");
}
private String getOfficeJoinCondition(String officeHierarchy, String joinTableAlias) {
@@ -40,7 +40,8 @@ public interface ClientRepository extends JpaRepository<Client, Long>, JpaSpecif
WHERE client.id = :clientId
AND (office.hierarchy LIKE :officeHierarchy OR transferToOffice.hierarchy LIKE :transferToOfficeHierarchy)
""")
Client fetchByClientIdAndHierarchy(Long clientId, String officeHierarchy, String transferToOfficeHierarchy);
Client fetchByClientIdAndHierarchy(@Param("clientId") Long clientId, @Param("officeHierarchy") String officeHierarchy,
@Param("transferToOfficeHierarchy") String transferToOfficeHierarchy);
@Query("SELECT c.id FROM Client c WHERE c.externalId = :externalId")
Long findIdByExternalId(@Param("externalId") ExternalId externalId);