|
|
|
<?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.supervision.mapper.DiseaseTreatmentPlanMapper">
|
|
|
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.supervision.model.DiseaseTreatmentPlan">
|
|
|
|
<id property="id" column="id" jdbcType="VARCHAR"/>
|
|
|
|
<result property="diseaseId" column="disease_id" jdbcType="VARCHAR"/>
|
|
|
|
<result property="planId" column="plan_id" jdbcType="VARCHAR"/>
|
|
|
|
<result property="createUserId" column="create_user_id" jdbcType="VARCHAR"/>
|
|
|
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
|
<result property="updateUserId" column="update_user_id" jdbcType="VARCHAR"/>
|
|
|
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
id
|
|
|
|
,disease_id,plan_id,create_user_id,
|
|
|
|
create_time,update_user_id,update_time
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap id="queryListByDiseaseIdResultMap" type="com.supervision.vo.manage.DiseaseTreatmentPlanResVo">
|
|
|
|
<result property="diseaseId" column="disease_id" jdbcType="VARCHAR"/>
|
|
|
|
<result property="planId" column="planId" jdbcType="VARCHAR"/>
|
|
|
|
<result property="disposalPlan" column="disposalPlan" jdbcType="VARCHAR"/>
|
|
|
|
<result property="disposalMethod" column="disposalMethod" jdbcType="VARCHAR"/>
|
|
|
|
<result property="secondMeasures" column="secondMeasures" jdbcType="VARCHAR"/>
|
|
|
|
<result property="recommendedMedication" column="recommendedMedication" jdbcType="ARRAY" typeHandler="com.supervision.handler.StringListTypeHandler"/>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<select id="queryListByDiseaseId" resultMap="queryListByDiseaseIdResultMap">
|
|
|
|
select
|
|
|
|
dtp.id as id,
|
|
|
|
dtp.disease_id as diseaseId,
|
|
|
|
dtp.plan_id as planId,
|
|
|
|
ctp.disposal_plan as disposalPlan,
|
|
|
|
ctp.disposal_method as disposalMethod,
|
|
|
|
ctp.first_measures as firstMeasures,
|
|
|
|
ctp.second_measures as secondMeasures,
|
|
|
|
ctp.recommended_medication as recommendedMedication
|
|
|
|
|
|
|
|
from vp_disease_treatment_plan dtp
|
|
|
|
left join vp_config_treatment_plan ctp on dtp.plan_id = ctp.id
|
|
|
|
where dtp.disease_id = #{diseaseId}
|
|
|
|
</select>
|
|
|
|
</mapper>
|