|
|
@@ -204,33 +204,53 @@
|
|
|
where bcr.id = #{id}
|
|
|
</select>
|
|
|
|
|
|
+
|
|
|
+ <resultMap id="webClinicListVO" type="cn.tr.module.smart.web.vo.BizClinicVO">
|
|
|
+ <id property="id" column="id"/>
|
|
|
+ <result property="clinicName" column="clinic_name"/>
|
|
|
+ <result property="patientCode" column="patient_code"/>
|
|
|
+ <result property="patientGender" column="patient_gender"/>
|
|
|
+ <result property="patientName" column="patient_name"/>
|
|
|
+ <result property="patientAge" column="patient_age"/>
|
|
|
+ <result property="deptName" column="dept_name"/>
|
|
|
+ <result property="clinicStartTime" column="clinic_start_time"/>
|
|
|
+ <result property="clinicEndTime" column="clinic_end_time"/>
|
|
|
+ <result property="clinicStatus" column="clinic_status"/>
|
|
|
+ <result property="followUpCount" column="follow_up_count"/>
|
|
|
+ <result property="assessCount" column="assess_count"/>
|
|
|
+ <result property="lastBeforeQuestionTime" column="last_before_question_time"/>
|
|
|
+ <result property="wxUserNickname" column="wx_user_nickname"/>
|
|
|
+ <result property="wxUserAvatar" column="wx_user_avatar"/>
|
|
|
+ <result property="doctorNickname" column="doctor_nickname"/>
|
|
|
+ <result property="doctorAvatar" column="doctor_avatar"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
<select id="selectClinicByCondition" resultType="cn.tr.module.smart.common.dto.BizClinicRoomDTO">
|
|
|
SELECT
|
|
|
bcr.id as id,
|
|
|
- bcr.clinic_name as clinicName ,
|
|
|
- bcr.patient_age as patientAge,
|
|
|
- bcr.dept_id as deptId,
|
|
|
- bcr.clinic_start_time as clinicStartTime,
|
|
|
- bcr.clinic_end_time as clinicEndTime,
|
|
|
- bcr.clinic_status as clinicStatus,
|
|
|
- bcr.last_follow_up_time as lastFollowUpTime,
|
|
|
- bcr.follow_up_count as followUpCount,
|
|
|
- bcr.follow_up as followUp,
|
|
|
- bcr.patient_id as patientId,
|
|
|
- bcr.patient_code as patientCode,
|
|
|
- bcr.patient_name as patientName,
|
|
|
- bcr.dept_name as deptName,
|
|
|
- bcr.patient_gender as patientGender,
|
|
|
- bcr.last_care_time as lastCareTime,
|
|
|
- bcr.last_question_time as lastQuestionTime,
|
|
|
- bcr.create_time as create_time,
|
|
|
- bcr.create_by as create_by,
|
|
|
- bcr.update_time as update_time,
|
|
|
- bcr.update_by as update_by
|
|
|
+ bcr.clinic_name as clinic_name,
|
|
|
+ bcr.patient_code as patient_code,
|
|
|
+ bcr.patient_gender as patient_gender,
|
|
|
+ bcr.patient_name as patient_name,
|
|
|
+ bcr.patient_age as patient_age,
|
|
|
+ bcr.dept_name as dept_name,
|
|
|
+ bcr.clinic_start_time as clinic_start_time,
|
|
|
+ bcr.clinic_end_time as clinic_end_time,
|
|
|
+ bcr.clinic_status as clinic_status,
|
|
|
+ bcr.follow_up_count as follow_up_count,
|
|
|
+ bcr.assess_count as assess_count,
|
|
|
+ bcr.last_before_question_time as last_before_question_time,
|
|
|
+ bwu.nickname as wx_user_nickname,
|
|
|
+ bwu.avatar as wx_user_avatar,
|
|
|
+ su.nickname as doctor_nickname,
|
|
|
+ su.avatar as doctor_avatar,
|
|
|
+ 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 sys_user as su ON bcrdu.user_id = su.id
|
|
|
<where>
|
|
|
and bcr.deleted = 0
|
|
|
<if test="queryDTO.deptId != null and queryDTO.deptId != ''">
|
|
|
@@ -260,6 +280,8 @@
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
+
|
|
|
+
|
|
|
<select id="selectClinicAndDoctorByPatientIdList"
|
|
|
resultType="cn.tr.module.smart.web.dto.BizPatientClinicListDTO">
|
|
|
SELECT
|