|
|
|
<?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.DiagnosisPhysicalRecordMapper">
|
|
|
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.supervision.model.DiagnosisPhysicalRecord">
|
|
|
|
<id property="id" column="id" jdbcType="VARCHAR"/>
|
|
|
|
<result property="processId" column="process_id" jdbcType="VARCHAR"/>
|
|
|
|
<result property="toolId" column="tool_id" jdbcType="VARCHAR"/>
|
|
|
|
<result property="locationId" column="location_id" jdbcType="VARCHAR"/>
|
|
|
|
<result property="primaryId" column="primary_id" jdbcType="VARCHAR"/>
|
|
|
|
<result property="result" column="result" jdbcType="VARCHAR"/>
|
|
|
|
<result property="keyword" column="keyword" jdbcType="VARCHAR"/>
|
|
|
|
<result property="description" column="description" 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
|
|
|
|
,process_id,tool_id,
|
|
|
|
location_id,primary_id,result,create_user_id,
|
|
|
|
keyword,description,
|
|
|
|
create_time,update_user_id,update_time
|
|
|
|
</sql>
|
|
|
|
<select id="queryPhysicalResultByProcessId"
|
|
|
|
resultType="com.supervision.vo.result.PhysicalRecordByResultDAO">
|
|
|
|
select (IF(t4.location_name IS NULL, t3.tool_name,
|
|
|
|
CONCAT_WS(' | ', t3.tool_name, t4.location_name))) AS toolLocationName,
|
|
|
|
t1.id as recordId,
|
|
|
|
t2.require_check as requireCheck,
|
|
|
|
t2.basis_confirm as basisConfirm,
|
|
|
|
t2.basis_identification as basisIdentification,
|
|
|
|
t3.id as toolId,
|
|
|
|
t4.id as locationId
|
|
|
|
from vp_diagnosis_physical_record t1
|
|
|
|
left join vp_disease_physical t2 on t1.physical_id = t2.id
|
|
|
|
left join vp_config_physical_tool t3 on t1.tool_id = t3.id
|
|
|
|
left join vp_config_physical_location t4 on t1.location_id = t4.id
|
|
|
|
where t1.process_id = #{processId}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="queryAskPhysicalHistory" resultType="com.supervision.vo.ask.AskPhysicalHistoryResVO">
|
|
|
|
select t3.id as toolId,
|
|
|
|
t3.tool_name as toolName,
|
|
|
|
t4.location_name as locationName,
|
|
|
|
t4.id as locationId,
|
|
|
|
t1.id as id,
|
|
|
|
t1.result as result,
|
|
|
|
t1.create_time as createTime
|
|
|
|
from vp_diagnosis_physical_record t1
|
|
|
|
left join vp_config_physical_tool t3 on t1.tool_id = t3.id
|
|
|
|
left join vp_config_physical_location t4 on t1.location_id = t4.id
|
|
|
|
where t1.process_id = #{processId}
|
|
|
|
order by t1.create_time desc
|
|
|
|
</select>
|
|
|
|
</mapper>
|