|
@@ -6,9 +6,7 @@
|
|
|
<select id="getComplaintRecord" resultType="com.lantone.report.dto.GetComplaintRecordDTO">
|
|
|
SELECT
|
|
|
a.*,
|
|
|
- CASE WHEN b.linkman IS NULL
|
|
|
- THEN doctor.`name`
|
|
|
- ELSE b.linkman END AS claimant_name,
|
|
|
+ a.claimant_name claimantName,
|
|
|
c.linkman AS check_name
|
|
|
FROM
|
|
|
(
|
|
@@ -29,6 +27,7 @@
|
|
|
a.mode_name,
|
|
|
a.defect_content,
|
|
|
a.claimant_id,
|
|
|
+ a.claimant_name,
|
|
|
a.check_id,
|
|
|
a.gmt_create AS claimant_gmt_create,
|
|
|
b.`name`,
|
|
@@ -112,7 +111,6 @@
|
|
|
<![CDATA[ AND c.example_status = #{getComplaintRecordVO.state}]]>
|
|
|
</if>
|
|
|
) a
|
|
|
- LEFT JOIN sys_user b ON a.claimant_id = b.id AND b.is_deleted='N'
|
|
|
LEFT JOIN sys_user c ON a.check_id = c.id AND c.is_deleted='N'
|
|
|
LEFT JOIN bas_doctor_info doctor ON doctor.doctor_id = a.claimant_id AND a.hospital_id = doctor.hospital_id AND doctor.is_deleted='N'
|
|
|
WHERE
|
|
@@ -124,9 +122,8 @@
|
|
|
|
|
|
<select id="getAppealReview" resultType="com.lantone.report.dto.GetAppealReviewDTO">
|
|
|
SELECT
|
|
|
- a.*, CASE WHEN b.linkman IS NULL
|
|
|
- THEN doctor.`name`
|
|
|
- ELSE b.linkman END AS claimant_name,
|
|
|
+ a.*,
|
|
|
+ a.claimant_name claimantName,
|
|
|
c.linkman AS check_name
|
|
|
FROM
|
|
|
(
|
|
@@ -146,11 +143,13 @@
|
|
|
a.mode_name,
|
|
|
a.defect_content,
|
|
|
a.claimant_id,
|
|
|
+ a.claimant_name,
|
|
|
a.check_id,
|
|
|
a.gmt_create AS claimant_gmt_create,
|
|
|
b.`name`,
|
|
|
b.beh_dept_name,
|
|
|
- a.appeal_operation_type
|
|
|
+ a.appeal_operation_type,
|
|
|
+ b.file_code fileCode
|
|
|
FROM
|
|
|
(
|
|
|
SELECT
|
|
@@ -213,6 +212,12 @@
|
|
|
<if test="getAppealReviewVO.deptName != null and getAppealReviewVO.deptName != '' ">
|
|
|
<![CDATA[ AND b.beh_dept_name = #{getAppealReviewVO.deptName}]]>
|
|
|
</if>
|
|
|
+ <if test="getAppealReviewVO.patientName != null and getAppealReviewVO.patientName != '' ">
|
|
|
+ <![CDATA[ AND b.name like concat('%',#{getAppealReviewVO.patientName},'%')]]>
|
|
|
+ </if>
|
|
|
+ <if test="getAppealReviewVO.fileCode != null and getAppealReviewVO.fileCode != '' ">
|
|
|
+ <![CDATA[ AND b.file_code like concat('%',#{getAppealReviewVO.fileCode},'%')]]>
|
|
|
+ </if>
|
|
|
) a
|
|
|
LEFT JOIN med_appeal_examine_info c ON a.id = c.appeal_info_id
|
|
|
WHERE
|
|
@@ -221,12 +226,11 @@
|
|
|
<![CDATA[ AND c.example_status = #{getAppealReviewVO.state}]]>
|
|
|
</if>
|
|
|
) a
|
|
|
- LEFT JOIN sys_user b ON a.claimant_id = b.id AND b.is_deleted='N'
|
|
|
LEFT JOIN sys_user c ON a.check_id = c.id
|
|
|
LEFT JOIN bas_doctor_info doctor ON doctor.doctor_id = a.claimant_id AND a.hospital_id = doctor.hospital_id AND doctor.is_deleted='N'
|
|
|
WHERE c.is_deleted='N'
|
|
|
<if test="getAppealReviewVO.name != null and getAppealReviewVO.name != '' ">
|
|
|
- <![CDATA[ AND b.linkman like concat('%',#{getAppealReviewVO.name},'%')]]>
|
|
|
+ <![CDATA[ AND a.claimant_name like concat('%',#{getAppealReviewVO.name},'%')]]>
|
|
|
</if>
|
|
|
</select>
|
|
|
|