Files
his/openhis-server-new/openhis-application
关羽 a2ec946ba7 Fix Bug #504: 【住院医生工作站-临床医嘱】护士退回药品医嘱后,医生修改并保存时提示"未匹配到库存信息"
根因:checkInventory() 仅执行严格匹配(adviceDefinitionId + adviceTableName + locationId + lotNumber),
当退回医嘱设置了 locationId 但该药房恰好没有对应药品的库存记录时,匹配失败直接返回"未匹配到库存信息"。
而 checkExeMedInventory() 已有两步放宽匹配逻辑(先按药房匹配,失败后放宽到所有药房),checkInventory 缺失此逻辑。

修复:在 checkInventory() 中增加两步匹配:
1. 严格匹配(原有逻辑,含 locationId 条件)
2. 若严格匹配未找到且 locationId 非null,放宽 locationId 条件匹配所有药房库存

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 19:22:44 +08:00
..