From d8b4aed16c1306c61f0d4dcbab2c7b8b6cce2306 Mon Sep 17 00:00:00 2001 From: HIS Dev Date: Sun, 5 Apr 2026 13:53:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20BugFix#339=20=E8=8D=AF=E6=88=BF=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E6=9D=A1=E4=BB=B6=E5=A4=B1=E6=95=88=20-=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=20locationId=20=E8=BF=87=E6=BB=A4=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 getAdviceBaseInfo 方法中添加 locationId 过滤条件 - 修复药房筛选时返回所有药房数据的问题 - 添加日志记录便于调试 --- .../appservice/impl/DoctorStationAdviceAppServiceImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java index bb403188..6e79773f 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java @@ -205,6 +205,11 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp // 构建查询条件 QueryWrapper queryWrapper = HisQueryUtils.buildQueryWrapper(adviceBaseDto, searchKey, new HashSet<>(Arrays.asList("advice_name", "py_str", "wb_str")), null); + // 🔧 BugFix#339: 药房筛选条件失效 - 添加 locationId 过滤条件 + if (locationId != null) { + queryWrapper.eq("location_id", locationId); + log.info("BugFix#339: 添加药房筛选条件 locationId={}", locationId); + } IPage adviceBaseInfo = doctorStationAdviceAppMapper.getAdviceBaseInfo( new Page<>(pageNo, pageSize), PublicationStatus.ACTIVE.getValue(), organizationId, CommonConstants.TableName.MED_MEDICATION_DEFINITION, CommonConstants.TableName.ADM_DEVICE_DEFINITION,