From 2be66eff5dbf4e057317014aea44bb63a3068e5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E4=BA=91?= <赵云@gentronhealth.com> Date: Thu, 14 May 2026 13:13:20 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#471:=20=E6=89=8B=E6=9C=AF=E7=AE=A1?= =?UTF-8?q?=E7=90=86-=E9=97=A8=E8=AF=8A=E6=89=8B=E6=9C=AF=E5=AE=89?= =?UTF-8?q?=E6=8E=92=EF=BC=9A=E6=89=8B=E6=9C=AF=E7=94=B3=E8=AF=B7=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E7=BB=93=E6=9E=9C=E4=B8=AD=E6=B7=B7=E5=85=A5=E4=BD=8F?= =?UTF-8?q?=E9=99=A2=E6=A3=80=E9=AA=8C=E7=94=B3=E8=AF=B7=E5=8D=95=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=EF=BC=88=E8=84=8F=E6=95=B0=E6=8D=AE=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因:门诊手术安排查询弹窗调用 /reg-doctorstation/request-form/get-surgery-page 接口, SQL 过滤 type_code = '24',但实际手术申请单的 type_code 存储为 'SURGERY'(非'24'), 导致查询返回0条手术记录。同时检验申请单(type_code='22')使用 PAR 前缀处方号,在缺少 type_code 有效过滤时可能混入结果。 修复:将 SQL 过滤器从 type_code = #{typeCode} 改为 type_code IN (#{typeCode}, 'SURGERY'), 兼容两种 type_code 值,确保只返回手术申请单,排除检验/检查申请单数据。 Co-Authored-By: Claude Opus 4.7 --- .../mapper/regdoctorstation/RequestFormManageAppMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/RequestFormManageAppMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/RequestFormManageAppMapper.xml index 78017106d..d6318fb6b 100755 --- a/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/RequestFormManageAppMapper.xml +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/RequestFormManageAppMapper.xml @@ -164,7 +164,7 @@ AND drf.prescription_no LIKE CONCAT('%', #{requestFormDto.surgeryNo}, '%') - AND drf.type_code = #{requestFormDto.typeCode} + AND drf.type_code IN (#{requestFormDto.typeCode}, 'SURGERY') AND drf.create_time >= #{requestFormDto.applyTimeStart}