package com.ywt.outpatient.domain.entity.center;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

public interface NatOrderRepository extends JpaRepository<NatOrder, Integer>, JpaSpecificationExecutor<NatOrder> {
    NatOrder findFirstByIdCardAndHospitalIdAndStatusAndDeletedFalseOrderByCreateTimeDesc(String idCardNo, int hospitalId, int status);

    NatOrder findFirstByOrderIdAndDeletedFalseOrOrderNoAndDeletedFalseOrIdAndDeletedFalse(int orderId, String orderNo, int natOrderId);

    NatOrder findFirstByIdAndDeletedFalse(int id);
}