From dd1cd17801498183f2c0a139740c9873b0aff2f9 Mon Sep 17 00:00:00 2001 From: chenqi Date: Wed, 18 Mar 2026 14:52:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=97=A8=E8=AF=8A?= =?UTF-8?q?=E5=88=92=E4=BB=B7=E6=97=A0=E6=B3=95=E6=A3=80=E7=B4=A2=E6=94=B6?= =?UTF-8?q?=E8=B4=B9=E9=A1=B9=E7=9B=AE=E9=97=AE=E9=A2=98=20(Bug=20#215)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 问题原因: - 门诊划价调用 getAdviceBaseInfo 时 pricingFlag 为 null - SQL 固定过滤 pricing_flag=1 OR IS NULL,导致 pricing_flag=0 的诊疗项目被错误过滤 修复方案: - 将固定过滤条件改为动态条件 - 当 pricingFlag 为 null 时不添加过滤,查询所有启用状态项目 - 当 pricingFlag 有值时按传入值过滤 影响范围: - 修复门诊划价检索功能 - 不影响医生站等其他场景的 pricing_flag 过滤逻辑 --- .../mapper/doctorstation/DoctorStationAdviceAppMapper.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml index c67fdff4..9e69c007 100644 --- a/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml @@ -238,7 +238,11 @@ AND T3.organization_id = #{organizationId} WHERE t1.delete_flag = '0' - AND (t1.pricing_flag = 1 OR t1.pricing_flag IS NULL) + + + AND (t1.pricing_flag = #{pricingFlag} OR t1.pricing_flag IS NULL) + AND (t1.name ILIKE '%' || #{searchKey} || '%' OR t1.py_str ILIKE '%' || #{searchKey} || '%')