医生列表展示医院信息

master
gongzhenkun 2 years ago
parent b203248251
commit 92449be992

@ -76,6 +76,10 @@ public class PcTDoctorQueryByPageResp {
@ApiModelProperty("医院id")
private Long hospitalId;
/** 医院 */
@ApiModelProperty("医院名称")
private String hospitalName;
/** 删除标志0代表存在 2代表删除 */
@ApiModelProperty("删除标志0代表存在 2代表删除 ")
private String delFlag;
@ -105,6 +109,14 @@ public class PcTDoctorQueryByPageResp {
@Excel(name = "诊断次数")
private int countRecords;
public String getHospitalName() {
return hospitalName;
}
public void setHospitalName(String hospitalName) {
this.hospitalName = hospitalName;
}
public int getCountRecords() {
return countRecords;
}

@ -147,30 +147,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<select id="queryByPage" resultType="com.ruoyi.system.domain.resp.PcTDoctorQueryByPageResp">
select
id,
user_id as userId,
identifier,
name,
phone,
sex,
age,
marriage,
title,
speciality,
introduction,
medical_license as medicalLicense,
medical_license2 as medicalLicense2,
qr_code as qrCode,
del_flag as delFlag,
hospital_id as hospitalId,
create_time as createTime,
update_time as updateTime
from
t_doctor
SELECT
td.id,
td.user_id AS userId,
td.identifier,
td.NAME,
td.phone,
td.sex,
td.age,
td.marriage,
td.title,
td.speciality,
td.introduction,
td.medical_license AS medicalLicense,
td.medical_license2 AS medicalLicense2,
qr_code AS qrCode,
del_flag AS delFlag,
td.hospital_id AS hospitalId,
th.`name` AS hospitalName,
create_time AS createTime,
update_time AS updateTime
FROM
t_doctor td
LEFT JOIN t_hospital th ON td.hospital_id = th.id
<where>
<if test="startTime != null and endTime != null">
AND create_time between DATE_FORMAT(#{startTime},'%Y-%m-%d %H:%i:%s') and DATE_FORMAT(#{endTime},'%Y-%m-%d %H:%i:%s')
AND create_time between DATE_FORMAT(#{startTime},'%Y-%m-%d %H:%i:%s') and
DATE_FORMAT(#{endTime},'%Y-%m-%d %H:%i:%s')
</if>
<if test="name != null and name != ''">
AND name like concat('%', #{name}, '%')

Loading…
Cancel
Save