|
@@ -4,29 +4,29 @@
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
|
<resultMap id="BaseResultMap" type="com.diagbot.entity.MedPacsInfo">
|
|
|
- <id column="rep_no" property="repNo" />
|
|
|
- <result column="hospital_id" property="hospitalId" />
|
|
|
- <result column="behospital_code" property="behospitalCode" />
|
|
|
- <result column="rep_name" property="repName" />
|
|
|
- <result column="rep_type" property="repType" />
|
|
|
- <result column="rep_type_name" property="repTypeName" />
|
|
|
- <result column="part" property="part" />
|
|
|
- <result column="rep_date" property="repDate" />
|
|
|
- <result column="check_date" property="checkDate" />
|
|
|
- <result column="apply_doctor" property="applyDoctor" />
|
|
|
- <result column="dept_id" property="deptId" />
|
|
|
- <result column="dept_name" property="deptName" />
|
|
|
- <result column="register_flag" property="registerFlag" />
|
|
|
- <result column="report_doctor" property="reportDoctor" />
|
|
|
- <result column="checker" property="checker" />
|
|
|
- <result column="yjpdz" property="yjpdz" />
|
|
|
- <result column="is_deleted" property="isDeleted" />
|
|
|
- <result column="gmt_create" property="gmtCreate" />
|
|
|
- <result column="gmt_modified" property="gmtModified" />
|
|
|
- <result column="creator" property="creator" />
|
|
|
- <result column="modifier" property="modifier" />
|
|
|
+ <id column="rep_no" property="repNo"/>
|
|
|
+ <result column="hospital_id" property="hospitalId"/>
|
|
|
+ <result column="behospital_code" property="behospitalCode"/>
|
|
|
+ <result column="rep_name" property="repName"/>
|
|
|
+ <result column="rep_type" property="repType"/>
|
|
|
+ <result column="rep_type_name" property="repTypeName"/>
|
|
|
+ <result column="part" property="part"/>
|
|
|
+ <result column="rep_date" property="repDate"/>
|
|
|
+ <result column="check_date" property="checkDate"/>
|
|
|
+ <result column="apply_doctor" property="applyDoctor"/>
|
|
|
+ <result column="dept_id" property="deptId"/>
|
|
|
+ <result column="dept_name" property="deptName"/>
|
|
|
+ <result column="register_flag" property="registerFlag"/>
|
|
|
+ <result column="report_doctor" property="reportDoctor"/>
|
|
|
+ <result column="checker" property="checker"/>
|
|
|
+ <result column="yjpdz" property="yjpdz"/>
|
|
|
+ <result column="is_deleted" property="isDeleted"/>
|
|
|
+ <result column="gmt_create" property="gmtCreate"/>
|
|
|
+ <result column="gmt_modified" property="gmtModified"/>
|
|
|
+ <result column="creator" property="creator"/>
|
|
|
+ <result column="modifier" property="modifier"/>
|
|
|
</resultMap>
|
|
|
- <select id="getCheckInfo" resultType="com.diagbot.dto.CheckInfoDTO">
|
|
|
+ <select id="getCheckInfo" resultType="com.diagbot.dto.CheckInfoDTO">
|
|
|
select b.*
|
|
|
from(
|
|
|
SELECT
|
|
@@ -41,14 +41,18 @@
|
|
|
t2.rept_diag as checkResult
|
|
|
FROM
|
|
|
med_pacs_info t1,
|
|
|
- med_pacs_result t2
|
|
|
+ med_pacs_result t2,
|
|
|
+ med_behospital_info t3
|
|
|
WHERE
|
|
|
t1.is_deleted = "N"
|
|
|
AND t2.is_deleted = "N"
|
|
|
+ AND t3.is_deleted = "N"
|
|
|
AND t2.rept_name IS NOT NULL
|
|
|
AND t1.check_date IS NOT NULL
|
|
|
and t1.hospital_id = t2.hospital_id
|
|
|
+ and t1.hospital_id = t3.hospital_id
|
|
|
and t1.behospital_code = t2.behospital_code
|
|
|
+ and t1.behospital_code = t3.file_code
|
|
|
and t1.rep_no = t2.rep_no
|
|
|
<if test="checkInfoVO.hospitalId != null">
|
|
|
and t1.hospital_id = #{checkInfoVO.hospitalId}
|
|
@@ -67,6 +71,13 @@
|
|
|
</if>
|
|
|
<if test="checkInfoVO.jxDateEnd != null">
|
|
|
<![CDATA[ AND date_format (t1.check_date,'%Y-%m-%d %H:%i:%s') <= #{checkInfoVO.jxDateEnd}]]>
|
|
|
+ </if>
|
|
|
+ <if test="checkInfoVO.isPlacefile != null and checkInfoVO.isPlacefile == 1">
|
|
|
+ <![CDATA[ AND date_format (t1.check_date,'%Y-%m-%d %H:%i:%s') <= t3.leave_hospital_date]]>
|
|
|
+ <![CDATA[ AND date_format (t1.check_date,'%Y-%m-%d %H:%i:%s') >= t3.behospital_date]]>
|
|
|
+ </if>
|
|
|
+ <if test="checkInfoVO.isPlacefile != null and checkInfoVO.isPlacefile == 0">
|
|
|
+ <![CDATA[ AND date_format (t1.check_date,'%Y-%m-%d %H:%i:%s') >= t3.behospital_date]]>
|
|
|
</if>) b
|
|
|
where 1=1
|
|
|
<if test="checkInfoVO.checkType != null and checkInfoVO.checkType == 1">
|