This commit is contained in:
dirgantarasiahaan
2023-06-05 09:36:43 +07:00
parent abc89d32d0
commit 180575ce4f
24 changed files with 747 additions and 0 deletions

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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);
}