查询患者列表修改:查询今天的患者列表

master
gongzhenkun 2 years ago
parent 029c3afcc7
commit 1ebce4a1df

@ -415,7 +415,7 @@ public class AppController extends BaseController
{
// recordResultReq.setStatus("0");
startPage();
return getDataTable(tRecordService.selectTRecordListWithoutResult(recordResultReq));
return getDataTable(tRecordService.selectTodayRecord(recordResultReq));
}
@ApiOperation("小程序获取患者详细信息")

@ -138,6 +138,14 @@ public interface TRecordMapper
List<TRecordResp> selectTRecordListWithoutResult(TRecordResultReq tRecord);
/**
*
*
* @param tRecord t
* @return {@code List<TRecordResp>}
*/
List<TRecordResp> selectTodayRecord(TRecordResultReq tRecord);
List<TRecordResp> selectHomePatientList(TRecordResultReq tRecord);
TRecordResp selectById(Long id);

@ -108,4 +108,12 @@ public interface ITRecordService
int queryDoctorNumberOfDiagnosis(Long doctorId);
List<PatientHistoryRecordResp> queryPatientHistoryRecord(TRecord tRecord);
/**
*
*
* @param tRecord t
* @return {@code List<TRecordResp>}
*/
List<TRecordResp> selectTodayRecord(TRecordResultReq tRecord);
}

@ -287,5 +287,16 @@ public class TRecordServiceImpl implements ITRecordService
return tRecordMapper.queryPatientHistoryRecord(tRecord);
}
/**
*
*
* @param tRecord t
* @return {@code List<TRecordResp>}
*/
@Override
public List<TRecordResp> selectTodayRecord(TRecordResultReq tRecord) {
return tRecordMapper.selectTodayRecord(tRecord);
}
}

@ -303,6 +303,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="firstVisitOder!=null and firstVisitOder !=''" >order by tp.create_time ${firstVisitOder}</if>
</select>
<select id="selectTodayRecord" parameterType="TRecordResultReq" resultType="TRecordResp">
<include refid="selectTRecordWithOutResult"/>
where to_days(tr.create_time) = to_days(now())
<if test="name != null and name != ''"> and tp.name like concat('%', #{name}, '%')</if>
<if test="doctorId != null "> and tr.doctor_id = #{doctorId}</if>
<if test="hospitalId != null "> and tr.hospital_id = #{hospitalId}</if>
<if test="status != null and status != ''"> and tr.status = #{status}</if>
<if test="doctorName != null and doctorName != ''"> and td.name like concat('%', #{doctorName}, '%')</if>
<if test="age !=null and age != ''">
and tp.age between
<foreach item="item" collection="age.split('-')" separator="and">
#{item}
</foreach>
</if>
<if test="sex !=null and sex !=''">and tp.sex = #{sex} </if>
<if test="identifier !=null and identifier != ''">and tp.identifier like concat('%', #{identifier}, '%')</if>
<if test="delFlag == null">
and td.del_flag = '0' and tp.del_flag = '0' and tr.del_flag = '0'
</if>
<if test="createTime != null and createTime !='' and createTime != 'all'">
and DATE_FORMAT(tp.create_time,'%Y-%m') = #{createTime}
</if>
<if test="startTime != null and startTime != '' and endTime == null "> and tr.create_time &gt;= #{startTime}</if>
<if test="startTime == null and endTime != '' and endTime != null "> and tr.create_time &lt;= #{endTime}</if>
<if test="startTime != null and endTime != null "> and tr.create_time between #{startTime} and #{endTime}</if>
<if test="patientAge != null"> and tp.age = #{patientAge} </if>
<if test="doctorOder !=null and doctorOder !=''" >order by tr.create_time ${doctorOder}</if>
<if test="firstVisitOder!=null and firstVisitOder !=''" >order by tp.create_time ${firstVisitOder}</if>
</select>
<select id="selectTRecordById" parameterType="Long" resultMap="TRecordResult">
<include refid="selectTRecordVo"/>
where id = #{id}

Loading…
Cancel
Save