package thyyxxk.webserver.dao.his.zhuyuanyisheng.sendDocker;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import thyyxxk.webserver.entity.zhuyuanyisheng.sendPatientPrompt.dto.SendDockerPrompt;

import java.util.List;

@Mapper
public interface SendDockerPromptDao extends BaseMapper<SendDockerPrompt> {


    @Select("select *\n" +
            "from send_docker_prompt\n" +
            "where pat_no = #{patNo}\n" +
            "  and times = #{times}\n" +
            "  and prompt_time = '${time}'\n" +
            "  and id not in (select send_id from send_docker_read r where r.doctor_code = #{dockerCode}) " +
            "  and (doctor_code is null or doctor_code = '02896')")
    List<SendDockerPrompt> selectPatPrompt(String patNo, Integer times, String time, String dockerCode);


}
