heheng
2024-11-07 37b0d2560607d1e0bfd5247a59a154704cac60f8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package com.gkhy.labRiskManage.domain.basic.repository.jpa;
 
 
import com.gkhy.labRiskManage.domain.basic.entity.BasicExperimentDeviceType;
import com.gkhy.labRiskManage.domain.basic.model.dto.DeviceTypeDTO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
 
import java.util.List;
 
 
/**
 * 基础实验设备类型
 */
@Repository
public interface BasicExperimentDeviceTypeRepository extends JpaRepository<BasicExperimentDeviceType, Long>, JpaSpecificationExecutor<BasicExperimentDeviceType> {
 
    /**
     * 基础实验人员 - 根据名字查询
     */
    @Query(value = "select t from BasicExperimentDeviceType t where t.id = :deviceTypeId and t.deleteStatus = 0")
    BasicExperimentDeviceType  getDeviceTypeById(Long deviceTypeId);
 
    /**
     * 基础字典  - 设备类型
     * */
    @Query(value = "select t from BasicExperimentDeviceType t where t.deleteStatus = 0")
    List<BasicExperimentDeviceType> listDeviceType();
}