|
@@ -34,55 +34,25 @@
|
|
a.is_reject,
|
|
a.is_reject,
|
|
a.cases_id
|
|
a.cases_id
|
|
FROM
|
|
FROM
|
|
- (
|
|
|
|
- SELECT
|
|
|
|
- *
|
|
|
|
- FROM
|
|
|
|
- `med_appeal_info`
|
|
|
|
- WHERE
|
|
|
|
- (gmt_create IN (
|
|
|
|
- SELECT
|
|
|
|
- max(gmt_create)
|
|
|
|
- FROM
|
|
|
|
- med_appeal_info
|
|
|
|
- WHERE
|
|
|
|
- cases_entry_id IS NOT NULL
|
|
|
|
- GROUP BY
|
|
|
|
- hospital_id,
|
|
|
|
- behospital_code,
|
|
|
|
- cases_entry_id,
|
|
|
|
- qcresult_detail_id
|
|
|
|
- )
|
|
|
|
- OR gmt_create IN (
|
|
|
|
- SELECT
|
|
|
|
- gmt_create
|
|
|
|
- FROM
|
|
|
|
- med_appeal_info
|
|
|
|
|
|
+ `med_appeal_info` a
|
|
|
|
+ LEFT JOIN med_behospital_info b ON a.behospital_code = b.behospital_code
|
|
WHERE
|
|
WHERE
|
|
- cases_entry_id IS NULL
|
|
|
|
- GROUP BY
|
|
|
|
- appeal_explain
|
|
|
|
- )
|
|
|
|
- )
|
|
|
|
- AND is_deleted = 'N'
|
|
|
|
- AND hospital_id = #{getComplaintRecordVO.hospitalId}
|
|
|
|
- AND claimant_id = #{getComplaintRecordVO.complaintId}
|
|
|
|
|
|
+ a.hospital_id = b.hospital_id
|
|
|
|
+ AND a.is_deleted = 'N'
|
|
|
|
+ AND a.hospital_id = #{getComplaintRecordVO.hospitalId}
|
|
|
|
+ AND a.claimant_id = #{getComplaintRecordVO.complaintId}
|
|
<if test="getComplaintRecordVO.complaintDateStart != null ">
|
|
<if test="getComplaintRecordVO.complaintDateStart != null ">
|
|
- <![CDATA[ AND gmt_create >= #{getComplaintRecordVO.complaintDateStart}]]>
|
|
|
|
|
|
+ <![CDATA[ AND a.gmt_create >= #{getComplaintRecordVO.complaintDateStart}]]>
|
|
</if>
|
|
</if>
|
|
<if test="getComplaintRecordVO.complaintDateEnd != null ">
|
|
<if test="getComplaintRecordVO.complaintDateEnd != null ">
|
|
- <![CDATA[ AND gmt_create <= #{getComplaintRecordVO.complaintDateEnd}]]>
|
|
|
|
|
|
+ <![CDATA[ AND a.gmt_create <= #{getComplaintRecordVO.complaintDateEnd}]]>
|
|
</if>
|
|
</if>
|
|
<if test="getComplaintRecordVO.casesName != null and getComplaintRecordVO.casesName != '' ">
|
|
<if test="getComplaintRecordVO.casesName != null and getComplaintRecordVO.casesName != '' ">
|
|
- <![CDATA[ AND cases_name = #{getComplaintRecordVO.casesName}]]>
|
|
|
|
|
|
+ <![CDATA[ AND a.cases_name = #{getComplaintRecordVO.casesName}]]>
|
|
</if>
|
|
</if>
|
|
<if test="getComplaintRecordVO.operationType != null and getComplaintRecordVO.operationType != '' ">
|
|
<if test="getComplaintRecordVO.operationType != null and getComplaintRecordVO.operationType != '' ">
|
|
- <![CDATA[ AND appeal_operation_type = #{getComplaintRecordVO.operationType}]]>
|
|
|
|
|
|
+ <![CDATA[ AND a.appeal_operation_type = #{getComplaintRecordVO.operationType}]]>
|
|
</if>
|
|
</if>
|
|
- ) a
|
|
|
|
- LEFT JOIN med_behospital_info b ON a.behospital_code = b.behospital_code
|
|
|
|
- WHERE
|
|
|
|
- a.hospital_id = b.hospital_id
|
|
|
|
<if test="getComplaintRecordVO.isPlacefile != null and getComplaintRecordVO.isPlacefile != '' ">
|
|
<if test="getComplaintRecordVO.isPlacefile != null and getComplaintRecordVO.isPlacefile != '' ">
|
|
<![CDATA[ AND b.is_placefile = #{getComplaintRecordVO.isPlacefile}]]>
|
|
<![CDATA[ AND b.is_placefile = #{getComplaintRecordVO.isPlacefile}]]>
|
|
</if>
|
|
</if>
|