|
@@ -44,6 +44,7 @@
|
|
mbi.director_doctor_name directorDoctorName,
|
|
mbi.director_doctor_name directorDoctorName,
|
|
mbi.diagnose,
|
|
mbi.diagnose,
|
|
mbt.behospital_type behospitalType,
|
|
mbt.behospital_type behospitalType,
|
|
|
|
+ mbi.is_placefile,
|
|
mqc.`level`
|
|
mqc.`level`
|
|
FROM
|
|
FROM
|
|
(
|
|
(
|
|
@@ -71,11 +72,11 @@
|
|
SELECT * from
|
|
SELECT * from
|
|
med_check_record mc
|
|
med_check_record mc
|
|
where
|
|
where
|
|
- mc.is_deleted = 'N'
|
|
|
|
- <if test="getCheckRecordPagevo.jobDistributionTimeStart != null and getCheckRecordPagevo.jobDistributionTimeStart != ''">
|
|
|
|
|
|
+ mc.is_deleted = 'N'
|
|
|
|
+ <if test="getCheckRecordPagevo.jobDistributionTimeStart != null ">
|
|
<![CDATA[ and mc.job_distribution_time >= #{getCheckRecordPagevo.jobDistributionTimeStart}]]>
|
|
<![CDATA[ and mc.job_distribution_time >= #{getCheckRecordPagevo.jobDistributionTimeStart}]]>
|
|
</if>
|
|
</if>
|
|
- <if test="getCheckRecordPagevo.jobDistributionTimeEnd != null and getCheckRecordPagevo.jobDistributionTimeEnd != ''">
|
|
|
|
|
|
+ <if test="getCheckRecordPagevo.jobDistributionTimeEnd != null ">
|
|
<![CDATA[ and mc.job_distribution_time <= #{getCheckRecordPagevo.jobDistributionTimeEnd}]]>
|
|
<![CDATA[ and mc.job_distribution_time <= #{getCheckRecordPagevo.jobDistributionTimeEnd}]]>
|
|
</if>
|
|
</if>
|
|
<if test="getCheckRecordPagevo.behospitalCode != null and getCheckRecordPagevo.behospitalCode != ''">
|
|
<if test="getCheckRecordPagevo.behospitalCode != null and getCheckRecordPagevo.behospitalCode != ''">
|
|
@@ -92,35 +93,19 @@
|
|
AND mcre.is_deleted = 'N'
|
|
AND mcre.is_deleted = 'N'
|
|
) t1 LEFT JOIN med_behospital_info mbi on t1.behospitalCode=mbi.behospital_code
|
|
) t1 LEFT JOIN med_behospital_info mbi on t1.behospitalCode=mbi.behospital_code
|
|
and mbi.is_deleted='N'
|
|
and mbi.is_deleted='N'
|
|
- <if test="getCheckRecordPagevo.name != null and getCheckRecordPagevo.name!=''">
|
|
|
|
- AND mbi.name like concat('%', #{getCheckRecordPagevo.name}, '%')
|
|
|
|
- </if>
|
|
|
|
- <if test="getCheckRecordPagevo.isPlacefile != null and getCheckRecordPagevo.isPlacefile!=''">
|
|
|
|
- AND mbi.is_placefile = #{getCheckRecordPagevo.isPlacefile}
|
|
|
|
- </if>
|
|
|
|
- <if test="getCheckRecordPagevo.recordType != null and getCheckRecordPagevo.recordType!=''">
|
|
|
|
- AND t1.behospital_type = #{getCheckRecordPagevo.recordType}
|
|
|
|
- </if>
|
|
|
|
- <if test="getCheckRecordPagevo.status != null and getCheckRecordPagevo.status!=''">
|
|
|
|
- AND t1.status = #{getCheckRecordPagevo.status}
|
|
|
|
- </if>
|
|
|
|
- <if test="getCheckRecordPagevo.level != null and getCheckRecordPagevo.level!=''">
|
|
|
|
- AND t1.level = #{getCheckRecordPagevo.level}
|
|
|
|
- </if>
|
|
|
|
- <if test="getCheckRecordPagevo.deptName != null and getCheckRecordPagevo.deptName != ''">
|
|
|
|
- AND t1.beh_dept_name = #{getCheckRecordPagevo.deptName}
|
|
|
|
- </if>
|
|
|
|
LEFT JOIN med_behospital_type mbt on t1.behospitalCode=mbt.behospital_code
|
|
LEFT JOIN med_behospital_type mbt on t1.behospitalCode=mbt.behospital_code
|
|
and mbt.is_deleted='N'
|
|
and mbt.is_deleted='N'
|
|
LEFT JOIN med_qcresult_info mqc on t1.behospitalCode=mqc.behospital_code
|
|
LEFT JOIN med_qcresult_info mqc on t1.behospitalCode=mqc.behospital_code
|
|
and mqc.is_deleted='N'
|
|
and mqc.is_deleted='N'
|
|
-
|
|
|
|
- )t2 LEFT JOIN med_home_page mhp on t2.behospitalCode=mhp.behospital_code
|
|
|
|
- <if test="getCheckRecordPagevo.hospitalizationDays != null and getCheckRecordPagevo.hospitalizationDays != ''">
|
|
|
|
- <![CDATA[ and t2.days <= #{getCheckRecordPagevo.hospitalizationDays}]]>
|
|
|
|
|
|
+ )t2 ,
|
|
|
|
+ med_home_page mhp
|
|
|
|
+ where
|
|
|
|
+ t2.behospitalCode=mhp.behospital_code
|
|
|
|
+ <if test="getCheckRecordPagevo.hospitalizationDaysEnd != null and getCheckRecordPagevo.hospitalizationDaysEnd != ''">
|
|
|
|
+ <![CDATA[ and t2.hospitalizationDays <= #{getCheckRecordPagevo.hospitalizationDaysEnd}]]>
|
|
</if>
|
|
</if>
|
|
- <if test="getCheckRecordPagevo.hospitalizationDays != null and getCheckRecordPagevo.hospitalizationDays != ''">
|
|
|
|
- <![CDATA[ and t2.days >= #{getCheckRecordPagevo.hospitalizationDays}]]>
|
|
|
|
|
|
+ <if test="getCheckRecordPagevo.hospitalizationDaysStart != null and getCheckRecordPagevo.hospitalizationDaysStart != ''">
|
|
|
|
+ <![CDATA[ and t2.hospitalizationDays >= #{getCheckRecordPagevo.hospitalizationDaysStart}]]>
|
|
</if>
|
|
</if>
|
|
<if test="getCheckRecordPagevo.doctorName != null and getCheckRecordPagevo.doctorName != ''">
|
|
<if test="getCheckRecordPagevo.doctorName != null and getCheckRecordPagevo.doctorName != ''">
|
|
AND t2.directorDoctorName like concat('%', #{getCheckRecordPagevo.doctorName}, '%')
|
|
AND t2.directorDoctorName like concat('%', #{getCheckRecordPagevo.doctorName}, '%')
|
|
@@ -128,7 +113,24 @@
|
|
<if test="getCheckRecordPagevo.diagnoseName != null and getCheckRecordPagevo.diagnoseName != ''">
|
|
<if test="getCheckRecordPagevo.diagnoseName != null and getCheckRecordPagevo.diagnoseName != ''">
|
|
AND t2.diagnose like concat('%', #{getCheckRecordPagevo.diagnoseName}, '%')
|
|
AND t2.diagnose like concat('%', #{getCheckRecordPagevo.diagnoseName}, '%')
|
|
</if>
|
|
</if>
|
|
-
|
|
|
|
|
|
+ <if test="getCheckRecordPagevo.name != null and getCheckRecordPagevo.name!=''">
|
|
|
|
+ AND t2.name like concat('%', #{getCheckRecordPagevo.name}, '%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="getCheckRecordPagevo.isPlacefile != null and getCheckRecordPagevo.isPlacefile!=''">
|
|
|
|
+ AND t2.is_placefile = #{getCheckRecordPagevo.isPlacefile}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="getCheckRecordPagevo.deptName != null and getCheckRecordPagevo.deptName != ''">
|
|
|
|
+ AND t2.behDeptName = #{getCheckRecordPagevo.deptName}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="getCheckRecordPagevo.level != null and getCheckRecordPagevo.level!=''">
|
|
|
|
+ AND t2.level = #{getCheckRecordPagevo.level}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="getCheckRecordPagevo.recordType != null and getCheckRecordPagevo.recordType!=''">
|
|
|
|
+ AND t2.behospitalType = #{getCheckRecordPagevo.recordType}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="getCheckRecordPagevo.status != null and getCheckRecordPagevo.status!=''">
|
|
|
|
+ AND t2.status = #{getCheckRecordPagevo.status}
|
|
|
|
+ </if>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
</mapper>
|
|
</mapper>
|