package com.yihu.jw.doctor.service;

import com.yihu.jw.doctor.dao.BaseDoctorHospitalDao;
import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BaseDoctorHosService extends BaseJpaService<BaseDoctorHospitalDO, BaseDoctorHospitalDao> {
    @Autowired
    private BaseDoctorHospitalDao baseDoctorHospitalDao;

    // 基于机构编码及科室编码，获取科室下所有的医生列表
    public List<BaseDoctorHospitalDO> getDoctorByOrgAndDept(String orgCode, String deptCode) {
        return baseDoctorHospitalDao.findByOrgCodeAndDeptCode(orgCode,deptCode);
    }

    public List<BaseDoctorHospitalDO> getDoctorByOrg(String orgCode) {
        return baseDoctorHospitalDao.findByOrgCode(orgCode);
    }


}
