Package com.bytedesk.core.quality
Interface QualityInspectionRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<QualityInspectionEntity,
,Long> org.springframework.data.jpa.repository.JpaRepository<QualityInspectionEntity,
,Long> org.springframework.data.repository.ListCrudRepository<QualityInspectionEntity,
,Long> org.springframework.data.repository.ListPagingAndSortingRepository<QualityInspectionEntity,
,Long> org.springframework.data.repository.PagingAndSortingRepository<QualityInspectionEntity,
,Long> org.springframework.data.repository.query.QueryByExampleExecutor<QualityInspectionEntity>
,org.springframework.data.repository.Repository<QualityInspectionEntity,
Long>
public interface QualityInspectionRepository
extends org.springframework.data.jpa.repository.JpaRepository<QualityInspectionEntity,Long>
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.domain.Page<QualityInspectionEntity>
findByAgentUid
(String agentUid, org.springframework.data.domain.Pageable pageable) org.springframework.data.domain.Page<QualityInspectionEntity>
findByInspectorUid
(String inspectorUid, org.springframework.data.domain.Pageable pageable) findLowScoreInspections
(Integer threshold) getAverageScore
(String agentUid, LocalDateTime startTime, LocalDateTime endTime) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save
Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush
Methods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAll
Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAll
Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAll
Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
findByAgentUid
org.springframework.data.domain.Page<QualityInspectionEntity> findByAgentUid(String agentUid, org.springframework.data.domain.Pageable pageable) -
findByInspectorUid
org.springframework.data.domain.Page<QualityInspectionEntity> findByInspectorUid(String inspectorUid, org.springframework.data.domain.Pageable pageable) -
getAverageScore
@Query("SELECT AVG(i.score) FROM QualityInspectionEntity i WHERE i.agentUid = ?1 AND i.createdAt BETWEEN ?2 AND ?3") Double getAverageScore(String agentUid, LocalDateTime startTime, LocalDateTime endTime) -
findLowScoreInspections
@Query("SELECT i FROM QualityInspectionEntity i WHERE i.score < ?1 ORDER BY i.score ASC") List<QualityInspectionEntity> findLowScoreInspections(Integer threshold)
-