industrial_measurement/src/main/java/com/xkrs/dao/QcInspectionDataSourceDao.java
2022-02-28 16:48:02 +08:00

27 lines
1.0 KiB
Java

package com.xkrs.dao;
import com.xkrs.model.entity.QcInspectionDataSource;
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.Component;
import java.util.List;
@Component
public interface QcInspectionDataSourceDao extends JpaRepository<QcInspectionDataSource, Long>, JpaSpecificationExecutor<QcInspectionDataSource> {
/**
* 查询质检数据源
*
* @param lotNo 批次号
* @param machineNo 机器号
* @param materialNo 物料号
* @param modelNo 模具号
* @param partNo 零件号
* @return
*/
@Query(value = "select * from qc_inspection_data_source where lot_no = ? and machine_no = ? and material_no = ? and model_no = ? and part_no = ?",nativeQuery = true)
List<QcInspectionDataSource> selectDataSource(String lotNo, String machineNo, String materialNo, String modelNo, String partNo);
}