|
|
@@ -233,6 +233,10 @@
|
|
|
<result property="doctorNickname" column="doctor_nickname"/>
|
|
|
<result property="doctorAvatar" column="doctor_avatar"/>
|
|
|
<result property="doctorId" column="doctor_id"/>
|
|
|
+ <result property="deviceId" column="device_id"/>
|
|
|
+ <result property="deviceType" column="device_type"/>
|
|
|
+ <result property="deviceRunState" column="device_run_state"/>
|
|
|
+ <result property="deviceAlarm" column="device_alarm"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<select id="selectClinicByCondition" resultMap="webClinicListVO">
|
|
|
@@ -256,13 +260,19 @@
|
|
|
su.nickname as doctor_nickname,
|
|
|
su.avatar as doctor_avatar,
|
|
|
su.id as doctor_id,
|
|
|
+ bih.device_id as device_id,
|
|
|
+ bih.device_type as device_type,
|
|
|
+ bih.device_run_state as device_run_state,
|
|
|
+ bih.device_alarm as device_alarm,
|
|
|
bcr.create_time as create_time
|
|
|
FROM
|
|
|
biz_clinic_room bcr
|
|
|
LEFT JOIN biz_clinic_room_wx_user bcrwu ON bcr.id = bcrwu.clinic_room_id
|
|
|
LEFT JOIN biz_clinic_room_doctor_user bcrdu on bcr.id = bcrdu.clinic_room_id
|
|
|
- left join biz_wx_user as bwu on bwu.id = bcrwu.wx_user_id
|
|
|
+ LEFT JOIN biz_wx_user as bwu on bwu.id = bcrwu.wx_user_id
|
|
|
LEFT JOIN sys_user as su ON bcrdu.user_id = su.id
|
|
|
+ LEFT JOIN biz_infusion_clinic as bic on bic.clinic_id = bcr.id
|
|
|
+ left join biz_infusion_history as bih on bih.id=bic.infusion_id
|
|
|
<where>
|
|
|
and bcr.deleted = 0
|
|
|
<if test="queryDTO.deptId != null and queryDTO.deptId != ''">
|
|
|
@@ -579,4 +589,35 @@
|
|
|
bpa.create_time desc
|
|
|
LIMIT 1
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="stdAppselectListByPatientCode" resultMap="stdThumbnailResult">
|
|
|
+ select
|
|
|
+ bcr.id as clinic_room_id,
|
|
|
+ bcr.clinic_name as clinic_name,
|
|
|
+ bcr.clinic_start_time as clinic_start_time,
|
|
|
+ bcr.dept_id as dept_id,
|
|
|
+ bp.id as patient_id,
|
|
|
+ bcr.dept_name as dept_name,
|
|
|
+ bcr.patient_code as patient_code,
|
|
|
+ bcr.patient_name as patient_name,
|
|
|
+ bcr.patient_gender as patient_gender,
|
|
|
+ bcr.patient_age as patient_age,
|
|
|
+ bcr.image_url as patient_avatar,
|
|
|
+ bcr.last_modify_user_type as last_modify_user_type,
|
|
|
+ bp.card_no as card_no,
|
|
|
+ bp.new_human as new_human,
|
|
|
+ bcrdu.user_id as doctor_id,
|
|
|
+ bcrwu.wx_user_id as wx_user_id
|
|
|
+ from
|
|
|
+ biz_patient as bp
|
|
|
+ join biz_clinic_room as bcr on bp.current_clinic_id = bcr.id
|
|
|
+ left join biz_clinic_room_wx_user as bcrwu on bcr.id = bcrwu.clinic_room_id
|
|
|
+ left join biz_clinic_room_doctor_user as bcrdu on bcr.id = bcrdu.clinic_room_id
|
|
|
+ <where>
|
|
|
+ bcrdu.id is null and bp.deleted = 0 and bcr.deleted = 0 and bp.patient_code like concat('%',#{query.patientCode},'%')
|
|
|
+ <if test="query.wxUserId !=null and query.wxUserId != ''">
|
|
|
+ and bcrwu.wx_user_id = #{query.wxUserId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
</mapper>
|