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,