26 lines
1.1 KiB
XML
26 lines
1.1 KiB
XML
<?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.xinelu.mobile.mapper.homepage.HomePageMapper">
|
|
|
|
<select id="selectManageRouteNode" resultType="com.xinelu.mobile.vo.myfollowup.MyFollowUpVO">
|
|
select spmrn.task_type,
|
|
spmrn.route_node_name,
|
|
IFNULL( spmrn.route_node_day,0) routeNodeDay,
|
|
pi.discharge_time,
|
|
IF(pter.id==NULL,0,1) sign
|
|
FROM patient_info pi
|
|
LEFT JOIN sign_patient_manage_route spmr ON spmr.patient_id = pi.id
|
|
LEFT JOIN sign_patient_manage_route_node spmrn ON spmrn.manage_route_id = spmr.id
|
|
LEFT JOIN patient_task_execute_record pter ON pter.manage_route_node_id = spmrn.id
|
|
<where>
|
|
<if test="residentId != null ">
|
|
and resident_id = #{residentId}
|
|
</if>
|
|
<if test="routeNodeName != null and routeNodeName != ''">
|
|
and route_node_name = #{routeNodeName}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
</mapper> |