You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.1 KiB
33 lines
1.1 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.ccsens.wisdomcar.persist.dao.HospitalWrokingDao">
|
|
|
|
<select id="findWorkingDoctor" resultType="com.ccsens.wisdomcar.bean.po.HospitalMember">
|
|
SELECT
|
|
hm.id,
|
|
hm.position AS position,
|
|
hm.user_id AS userId,
|
|
hm.position AS position
|
|
FROM
|
|
t_hospital_member AS hm
|
|
LEFT JOIN t_hospital_wroking AS hw ON hm.id = hw.hospital_member_id
|
|
AND hw.rec_status = 0
|
|
WHERE
|
|
hm.rec_status = 0
|
|
AND hm.hospital_id = #{hospitalId}
|
|
AND hw.start_time < #{currentTime}
|
|
AND hw.end_time > #{currentTime}
|
|
</select>
|
|
|
|
<select id="findHeadOfPM" resultType="Long">
|
|
SELECT
|
|
m.user_id
|
|
FROM
|
|
t_hospital_member AS m
|
|
WHERE
|
|
m.rec_status = 0
|
|
AND m.hospital_id = #{hospitalId}
|
|
AND m.position = 4
|
|
LIMIT 1
|
|
</select>
|
|
</mapper>
|