|
|
@ -14,13 +14,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<result property="currentLocation" column="current_location" /> |
|
|
|
<result property="currentLocation" column="current_location" /> |
|
|
|
<result property="temperature" column="temperature" /> |
|
|
|
<result property="temperature" column="temperature" /> |
|
|
|
<result property="diagnosedTime" column="diagnosed_time" /> |
|
|
|
<result property="diagnosedTime" column="diagnosed_time" /> |
|
|
|
<result property="isDiagnosed" column="is_diagnosed" /> |
|
|
|
<result property="isEmergency" column="is_emergency" /> |
|
|
|
<result property="isTouch" column="is_touch" /> |
|
|
|
<result property="isTouch" column="is_touch" /> |
|
|
|
<result property="isHigh" column="is_high" /> |
|
|
|
<result property="isHigh" column="is_high" /> |
|
|
|
|
|
|
|
<result property="isDead" column="is_dead" /> |
|
|
|
</resultMap> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
|
|
|
|
<sql id="selectPatientManageVo"> |
|
|
|
<sql id="selectPatientManageVo"> |
|
|
|
select patient_id, patient_name, patient_age, patient_sex, patient_id_card, description, current_location, temperature, diagnosed_time, is_diagnosed, is_touch, is_high from patient_manage |
|
|
|
select patient_id, patient_name, patient_age, CASE patient_sex WHEN '1' THEN '男' ELSE '女' END as patient_sex |
|
|
|
|
|
|
|
, patient_id_card, description, current_location, temperature, diagnosed_time |
|
|
|
|
|
|
|
, CASE is_emergency WHEN '1' THEN '是' ELSE '否' END as is_emergency |
|
|
|
|
|
|
|
, CASE is_dead WHEN '1' THEN '是' ELSE '否' END as is_dead |
|
|
|
|
|
|
|
, CASE is_touch WHEN '1' THEN '是' ELSE '否' END as is_touch |
|
|
|
|
|
|
|
, CASE is_high WHEN '1' THEN '是' ELSE '否' END as is_high |
|
|
|
|
|
|
|
from patient_manage |
|
|
|
</sql> |
|
|
|
</sql> |
|
|
|
|
|
|
|
|
|
|
|
<select id="selectPatientManageList" parameterType="PatientManage" resultMap="PatientManageResult"> |
|
|
|
<select id="selectPatientManageList" parameterType="PatientManage" resultMap="PatientManageResult"> |
|
|
@ -34,8 +41,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="currentLocation != null and currentLocation != ''"> and current_location = #{currentLocation}</if> |
|
|
|
<if test="currentLocation != null and currentLocation != ''"> and current_location = #{currentLocation}</if> |
|
|
|
<if test="temperature != null and temperature != ''"> and temperature = #{temperature}</if> |
|
|
|
<if test="temperature != null and temperature != ''"> and temperature = #{temperature}</if> |
|
|
|
<if test="diagnosedTime != null "> and diagnosed_time = #{diagnosedTime}</if> |
|
|
|
<if test="diagnosedTime != null "> and diagnosed_time = #{diagnosedTime}</if> |
|
|
|
<if test="isDiagnosed != null "> and is_diagnosed = #{isDiagnosed}</if> |
|
|
|
<if test="isEmergency != null "> and is_emergency = #{isEmergency}</if> |
|
|
|
<if test="isTouch != null "> and is_touch = #{isTouch}</if> |
|
|
|
<if test="isTouch != null "> and is_touch = #{isTouch}</if> |
|
|
|
|
|
|
|
<if test="isDead != null "> and is_dead = #{isDead}</if> |
|
|
|
<if test="isHigh != null "> and is_high = #{isHigh}</if> |
|
|
|
<if test="isHigh != null "> and is_high = #{isHigh}</if> |
|
|
|
</where> |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
</select> |
|
|
@ -56,9 +64,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="currentLocation != null">current_location,</if> |
|
|
|
<if test="currentLocation != null">current_location,</if> |
|
|
|
<if test="temperature != null">temperature,</if> |
|
|
|
<if test="temperature != null">temperature,</if> |
|
|
|
<if test="diagnosedTime != null">diagnosed_time,</if> |
|
|
|
<if test="diagnosedTime != null">diagnosed_time,</if> |
|
|
|
<if test="isDiagnosed != null">is_diagnosed,</if> |
|
|
|
<if test="isEmergency != null">is_emergency,</if> |
|
|
|
<if test="isTouch != null">is_touch,</if> |
|
|
|
<if test="isTouch != null">is_touch,</if> |
|
|
|
<if test="isHigh != null">is_high,</if> |
|
|
|
<if test="isHigh != null">is_high,</if> |
|
|
|
|
|
|
|
<if test="isDead != null">is_dead,</if> |
|
|
|
</trim> |
|
|
|
</trim> |
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
|
|
<if test="patientName != null">#{patientName},</if> |
|
|
|
<if test="patientName != null">#{patientName},</if> |
|
|
@ -69,9 +78,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="currentLocation != null">#{currentLocation},</if> |
|
|
|
<if test="currentLocation != null">#{currentLocation},</if> |
|
|
|
<if test="temperature != null">#{temperature},</if> |
|
|
|
<if test="temperature != null">#{temperature},</if> |
|
|
|
<if test="diagnosedTime != null">#{diagnosedTime},</if> |
|
|
|
<if test="diagnosedTime != null">#{diagnosedTime},</if> |
|
|
|
<if test="isDiagnosed != null">#{isDiagnosed},</if> |
|
|
|
<if test="isEmergency != null">#{isEmergency},</if> |
|
|
|
<if test="isTouch != null">#{isTouch},</if> |
|
|
|
<if test="isTouch != null">#{isTouch},</if> |
|
|
|
<if test="isHigh != null">#{isHigh},</if> |
|
|
|
<if test="isHigh != null">#{isHigh},</if> |
|
|
|
|
|
|
|
<if test="isDead != null">#{isDead},</if> |
|
|
|
</trim> |
|
|
|
</trim> |
|
|
|
</insert> |
|
|
|
</insert> |
|
|
|
|
|
|
|
|
|
|
@ -86,9 +96,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="currentLocation != null">current_location = #{currentLocation},</if> |
|
|
|
<if test="currentLocation != null">current_location = #{currentLocation},</if> |
|
|
|
<if test="temperature != null">temperature = #{temperature},</if> |
|
|
|
<if test="temperature != null">temperature = #{temperature},</if> |
|
|
|
<if test="diagnosedTime != null">diagnosed_time = #{diagnosedTime},</if> |
|
|
|
<if test="diagnosedTime != null">diagnosed_time = #{diagnosedTime},</if> |
|
|
|
<if test="isDiagnosed != null">is_diagnosed = #{isDiagnosed},</if> |
|
|
|
<if test="isEmergency != null">is_emergency = #{isEmergency},</if> |
|
|
|
<if test="isTouch != null">is_touch = #{isTouch},</if> |
|
|
|
<if test="isTouch != null">is_touch = #{isTouch},</if> |
|
|
|
<if test="isHigh != null">is_high = #{isHigh},</if> |
|
|
|
<if test="isHigh != null">is_high = #{isHigh},</if> |
|
|
|
|
|
|
|
<if test="isDead != null">is_dead = #{isDead},</if> |
|
|
|
</trim> |
|
|
|
</trim> |
|
|
|
where patient_id = #{patientId} |
|
|
|
where patient_id = #{patientId} |
|
|
|
</update> |
|
|
|
</update> |
|
|
|