|
|
|
@ -1,8 +1,9 @@
|
|
|
|
|
package cn.estsh.i3plus.pojo.wms.repository;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Optional;
|
|
|
|
|
|
|
|
|
|
import org.springframework.data.jpa.repository.Query;
|
|
|
|
|
import org.springframework.data.domain.Page;
|
|
|
|
|
import org.springframework.data.domain.Pageable;
|
|
|
|
|
import org.springframework.stereotype.Repository;
|
|
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
|
|
|
@ -11,10 +12,13 @@ import cn.estsh.i3plus.pojo.wms.bean.WmsHealthQueryRecord;
|
|
|
|
|
@Repository
|
|
|
|
|
public interface WmsHealthQueryRecordRepository extends BaseRepository<WmsHealthQueryRecord, Long> {
|
|
|
|
|
|
|
|
|
|
@Query("from WmsHealthQueryRecord where indicator_code = :indicatorCode and query_time >= :queryTime")
|
|
|
|
|
List<WmsHealthQueryRecord> queryByCodeAndTime(String indicatorCode, Long queryTime);
|
|
|
|
|
|
|
|
|
|
@Query("from WmsHealthQueryRecord where indicator_code = :indicatorCode and query_time between :startTime and :endTime")
|
|
|
|
|
List<WmsHealthQueryRecord> queryByCodeBetweenTime(String indicatorCode, Long startTime, Long endTime);
|
|
|
|
|
Page<WmsHealthQueryRecord> findByOrganizeCodeAndIndicatorCodeAndQueryTimeBetween(String organizeCode,String indicatorCode, Long startTime,
|
|
|
|
|
Long endTime, Pageable page);
|
|
|
|
|
|
|
|
|
|
int countByOrganizeCodeAndIndicatorCodeAndQueryTimeBetween(String organizeCode,String indicatorCode, Long startTime,
|
|
|
|
|
Long endTime);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Optional<WmsHealthQueryRecord> findByOrganizeCodeAndIndicatorCodeOrderByQueryTimeDesc(String organizeCode,String indicatorCode);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|