From ec1b218d149a5621ffe8f6867fb759558857aefd Mon Sep 17 00:00:00 2001 From: zhaoyun Date: Thu, 28 May 2026 16:11:26 +0800 Subject: [PATCH] =?UTF-8?q?fix(#503):=20=E5=8F=91=E8=8D=AF=E6=98=8E?= =?UTF-8?q?=E7=BB=86=E6=9F=A5=E8=AF=A2=E7=BC=BA=E5=B0=91=20SUMMARIZED=20?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E2=80=94=E2=80=94=E6=B1=87=E6=80=BB=E5=8F=91?= =?UTF-8?q?=E8=8D=AF=E5=90=8E=E5=8F=91=E8=8D=AF=E6=98=8E=E7=BB=86=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因: - 护士执行医嘱后 MedicationDispense 状态 = PREPARATION(2) - 护士汇总发药申请后状态更新为 SUMMARIZED(8) - 但 PendingMedicationDetails Mapper 只过滤 IN_PROGRESS(3)/PREPARATION(2)/PREPARED(14) - 不含 SUMMARIZED(8),导致汇总发药申请后发药明细不再显示 修复: - Mapper XML 增加 #{summarized} 到状态过滤 - Mapper Interface 增加 @Param('summarized') - Service 调用传入 DispenseStatus.SUMMARIZED.getValue() 全链路状态流转: 医生开单(草稿1) → 护士执行(待配药2) → 汇总发药申请(已汇总8) --- .../impl/PendingMedicationDetailsAppServiceImpl.java | 3 ++- .../pharmacymanage/mapper/PendingMedicationDetailsMapper.java | 2 ++ .../mapper/pharmacymanage/PendingMedicationDetailsMapper.xml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/pharmacymanage/appservice/impl/PendingMedicationDetailsAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/pharmacymanage/appservice/impl/PendingMedicationDetailsAppServiceImpl.java index 2e703a4ab..7679526fe 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/pharmacymanage/appservice/impl/PendingMedicationDetailsAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/pharmacymanage/appservice/impl/PendingMedicationDetailsAppServiceImpl.java @@ -52,7 +52,8 @@ public class PendingMedicationDetailsAppServiceImpl implements IPendingMedicatio Page pendingMedicationPage = pendingMedicationDetailsMapper .selectPendingMedicationDetailsPage(new Page<>(pageNo, pageSize), queryWrapper, DispenseStatus.IN_PROGRESS.getValue(), DispenseStatus.PREPARATION.getValue(), - DispenseStatus.PREPARED.getValue(), EncounterClass.AMB.getValue(), EncounterClass.IMP.getValue()); + DispenseStatus.PREPARED.getValue(), DispenseStatus.SUMMARIZED.getValue(), + EncounterClass.AMB.getValue(), EncounterClass.IMP.getValue()); pendingMedicationPage.getRecords().forEach(e -> { // 发药类型 diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/pharmacymanage/mapper/PendingMedicationDetailsMapper.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/pharmacymanage/mapper/PendingMedicationDetailsMapper.java index 6ff972bf5..9f614e57c 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/pharmacymanage/mapper/PendingMedicationDetailsMapper.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/pharmacymanage/mapper/PendingMedicationDetailsMapper.java @@ -22,6 +22,7 @@ public interface PendingMedicationDetailsMapper { * @param inProgress 发药类型:待发药 * @param preparation 发药类型:待配药 * @param prepared 发药类型:已配药 + * @param summarized 发药类型:已汇总 * @param amb 门诊类型 * @param imp 住院类型 * @return 待发药明细 @@ -32,6 +33,7 @@ public interface PendingMedicationDetailsMapper { @Param("inProgress") Integer inProgress, @Param("preparation") Integer preparation, @Param("prepared") Integer prepared, + @Param("summarized") Integer summarized, @Param("amb") Integer amb, @Param("imp") Integer imp); diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/pharmacymanage/PendingMedicationDetailsMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/pharmacymanage/PendingMedicationDetailsMapper.xml index a8b01b229..6c5a45c82 100755 --- a/openhis-server-new/openhis-application/src/main/resources/mapper/pharmacymanage/PendingMedicationDetailsMapper.xml +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/pharmacymanage/PendingMedicationDetailsMapper.xml @@ -51,7 +51,7 @@ ON T5.medication_def_id = T6.id AND T5.delete_flag = '0' WHERE T1.delete_flag = '0' - AND T1.status_enum IN (#{inProgress}, #{preparation}, #{prepared}) + AND T1.status_enum IN (#{inProgress}, #{preparation}, #{prepared}, #{summarized}) ORDER BY T1.create_time DESC ) AS T7 ${ew.customSqlSegment}