|
@@ -20,7 +20,7 @@ public interface InstanciaTascaRepository extends JpaRepository<InstanciaTasca,
|
|
|
public List<InstanciaTasca> findByInstancia(BigInteger idInstancia);
|
|
public List<InstanciaTasca> findByInstancia(BigInteger idInstancia);
|
|
|
|
|
|
|
|
@Query(nativeQuery=true, value=("""
|
|
@Query(nativeQuery=true, value=("""
|
|
|
- SELECT ti.* FROM tasquesi ti
|
|
|
|
|
|
|
+ SELECT ti.* FROM tasquesi ti evs
|
|
|
LEFT JOIN tasques ta ON ti.id_tasca = ta.id_tasca
|
|
LEFT JOIN tasques ta ON ti.id_tasca = ta.id_tasca
|
|
|
WHERE id_instancia = ?1 AND id_tascap = ?2
|
|
WHERE id_instancia = ?1 AND id_tascap = ?2
|
|
|
ORDER BY version DESC LIMIT 1; """))
|
|
ORDER BY version DESC LIMIT 1; """))
|
|
@@ -140,6 +140,14 @@ public interface InstanciaTascaRepository extends JpaRepository<InstanciaTasca,
|
|
|
AND i.estat = 'F' AND ti.estat = 'E' AND ta.informe
|
|
AND i.estat = 'F' AND ti.estat = 'E' AND ta.informe
|
|
|
ORDER BY cursAvaluat DESC FETCH FIRST 1 ROW ONLY; """))
|
|
ORDER BY cursAvaluat DESC FETCH FIRST 1 ROW ONLY; """))
|
|
|
public TascaInformeTransferDTO getLastByProcName(String proc, Integer tit, Integer centre, String estudi);
|
|
public TascaInformeTransferDTO getLastByProcName(String proc, Integer tit, Integer centre, String estudi);
|
|
|
|
|
+
|
|
|
|
|
+ @Query(nativeQuery=true, value=("""
|
|
|
|
|
+ SELECT ti.* FROM tasquesi ti
|
|
|
|
|
+ LEFT JOIN tasques ta ON ta.id_tasca = ti.id_tasca
|
|
|
|
|
+ WHERE id_instancia = ?1 AND ta.id_tascap IN(?2) AND estat = 'E'
|
|
|
|
|
+ ORDER BY ta.id_tascap DESC, ti.version DESC LIMIT 1;
|
|
|
|
|
+ """))
|
|
|
|
|
+ public InstanciaTasca getValidFromIdTascaps(BigInteger id_instancia, List<Integer> idTascaps);
|
|
|
|
|
|
|
|
@Transactional
|
|
@Transactional
|
|
|
@Modifying(flushAutomatically = true, clearAutomatically = true)
|
|
@Modifying(flushAutomatically = true, clearAutomatically = true)
|