fix(#735): guanyu (文件合入)

This commit is contained in:
2026-06-14 05:10:00 +08:00
committed by 华佗
parent 4a72fceec2
commit b063a2fb20
2 changed files with 10 additions and 5 deletions

View File

@@ -2,10 +2,15 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.healthlink.his.web.patientmanage.mapper.PatientManageMapper">
<!-- 病人信息相关查询-->
<!-- Bug#717: 移除无用关联子查询 identifier_noDTO无对应字段
避免 TenantLineInnerInterceptor 用 JSqlParser 解析 SQL 时因裸列名导致 country_code ambiguous -->
<select id="getPatientPage" resultType="com.healthlink.his.web.patientmanage.dto.PatientBaseInfoDto">
SELECT
(
SELECT api.identifier_no
FROM adm_patient_identifier api
WHERE api.tenant_id = p.tenant_id
AND api.patient_id = p.id
LIMIT 1
) AS identifier_no,
p.tenant_id,
p.id,
p.active_flag,
@@ -54,7 +59,7 @@
FROM adm_patient p
<where>
p.delete_flag = '0'
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != ''">
<if test="ew.sqlSegment != null and ew.sqlSegment != ''">
AND ${ew.sqlSegment}
</if>
</where>
@@ -99,7 +104,7 @@
LEFT JOIN adm_patient AS pt ON enc.patient_id = pt.ID AND pt.delete_flag = '0'
<where>
enc.delete_flag = '0'
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != ''">
<if test="ew.sqlSegment != null and ew.sqlSegment != ''">
AND ${ew.sqlSegment}
</if>
</where>

View File

@@ -306,7 +306,7 @@
null AS skin_test_flag,
null AS inject_flag,
null AS group_id,
COALESCE(T1.content_json::jsonb->>'adviceName', T2.NAME, T1.content_json::jsonb->>'surgeryName') AS advice_name,
COALESCE(T2.NAME, T1.content_json::jsonb->>'surgeryName', T1.content_json::jsonb->>'adviceName') AS advice_name,
'' AS volume,
'' AS lot_number,
T1.quantity AS quantity,