package com.sw.mes.yb.seed.dao;

import com.sw.mes.core.base.BaseDao;
import com.sw.mes.yb.seed.entity.SeedSelfInspection;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface SeedSelfInspectionDao extends BaseDao<SeedSelfInspection,Long> {
    @Query(value = "select * from seed_self_inspection where seed_code = ?1",nativeQuery = true)
    SeedSelfInspection getBySeedCode(String seedCode);
    @Query(value = "select * from seed_self_inspection where seed_batch_no = ?1",nativeQuery = true)
    SeedSelfInspection getBySeedBatchNo(String seedBatchNo);
    @Query(value = "select * from seed_self_inspection where plan_code = ?1",nativeQuery = true)
    List<SeedSelfInspection> getByPlanCode(String planCode);
    @Query(value = "select * from seed_self_inspection where batch_no = ?1",nativeQuery = true)
    List<SeedSelfInspection> getByBatchNo(String batchNo);
    @Query(value = "select * from seed_self_inspection where is_qualified = ?1",nativeQuery = true)
    List<SeedSelfInspection> getQualified(Boolean isQualified);
    @Query(value = "select * from seed_self_inspection where seed_code in ?1",nativeQuery = true)
    List<SeedSelfInspection> getSelfInspectionBySeedCode(List<String> seedCodes);
}
