12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- package com.xt.jygl.workflow.dao;
- import java.util.List;
- import org.springframework.data.jpa.repository.Query;
- import com.xt.jygl.workflow.entity.TaskInfoEntity;
- import com.xtframe.sec.common.SecRepository;
- /**
- * 任务信息Dao
- *
- */
- public interface TaskInfoDao extends SecRepository<TaskInfoEntity, String> {
- public TaskInfoEntity getByTaskId(String taskId);
- /**
- * 根据业务主键和业务类型查询
- *
- * @param busId
- * @param busKey
- * @return
- */
- public List<TaskInfoEntity> findByBusIdAndBusKey(String busId, String busKey);
- /**
- * 根据业务主键和业务类型查询
- *
- * @param busId
- * @param busKey
- * @return
- */
- public List<TaskInfoEntity> findByBusIdAndBusKeyOrderByIdAsc(String busId, String busKey);
- public List<TaskInfoEntity> findByBusKeyAndRunnerIdOrderByIdAsc(String busKey, String runnerId);
- public List<TaskInfoEntity> findByRunnerIdAndStateOrderByIdAsc(String runnerId, String state);
- @Query("from TaskInfoEntity where busId = ?1 and busKey = ?2 and state = 3")
- public List<TaskInfoEntity> findByBusIdAndBusKeyAndRecordStatus(String busId, String busKey);
- @Query(value = "select t.* from GK_OPERATION_JSJY_TASK t where t.bus_id = ?1 and t.bus_key = ?2 and t.step = (select max(to_number(step)) from GK_OPERATION_JSJY_TASK where bus_id = ?1 and bus_key = ?2)", nativeQuery = true)
- public TaskInfoEntity findByStep(String busId, String busKey);
- @Query("from TaskInfoEntity where busId = ?1 and taskKey = ?2 and sfth is null")
- public List<TaskInfoEntity> findByBusIdAndTaskKey(String busId, String taskKey);
-
- @Query("from TaskInfoEntity where busId = ?1 and taskKey = ?2 and sfth = ?3")
- public List<TaskInfoEntity> findByBusIdAndTaskKeyAndSfth(String busId, String taskKey, String sfth);
- }
|