add path
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package com.iconplus.smartproc.repository;
|
||||
|
||||
import com.iconplus.smartproc.model.entity.RksDaftarIsi;
|
||||
import com.iconplus.smartproc.model.projection.RksDaftarIsiView;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@Repository
|
||||
public interface RksDaftarIsiRepository extends JpaRepository<RksDaftarIsi, Long> {
|
||||
|
||||
@Query(value = "SELECT rki.id as id, " +
|
||||
"rki.kodeTemplate as kodeTemplate, " +
|
||||
"rki.namaTemplate as namaTemplate, " +
|
||||
"rki.metodePengadaanId as metodePengadaanId, " +
|
||||
"mp.metodePengadaan as metodePengadaan " +
|
||||
"FROM RksDaftarIsi rki " +
|
||||
"JOIN MetodePengadaan mp ON mp.id = rki.metodePengadaanId " +
|
||||
"WHERE rki.isDelete = false " +
|
||||
"ORDER BY rki.kodeTemplate")
|
||||
Page<RksDaftarIsiView> getListRksDaftarIsi(Pageable pageable);
|
||||
|
||||
Optional<RksDaftarIsi> findByKodeTemplateAndIsDeleteFalse(String kodeTemplate);
|
||||
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
package com.iconplus.smartproc.repository;
|
||||
|
||||
import com.iconplus.smartproc.model.entity.RksIsi;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface RksIsiRepository extends JpaRepository<RksIsi, Long> {
|
||||
|
||||
Page<RksIsi> findByRksDaftarIsiIdAndIsDeleteFalse(Long rksDaftarIsiId, Pageable pageable);
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
package com.iconplus.smartproc.repository;
|
||||
|
||||
import com.iconplus.smartproc.model.entity.RksTemplate;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@Repository
|
||||
public interface RksTemplateRepository extends JpaRepository<RksTemplate, Long> {
|
||||
|
||||
Optional<RksTemplate> findByKodeTemplateAndIsDeleteFalse(String kodeTemplate);
|
||||
|
||||
}
|
Reference in New Issue
Block a user