From 3e17789aa78c2697aea706ff01a656dadf113683 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=8E=E4=BD=97?= Date: Sun, 31 May 2026 03:06:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(#614):=20=E8=AF=B7=E4=BF=AE=E5=A4=8D=20Bug?= =?UTF-8?q?=20#614=EF=BC=9A=E3=80=90=E4=BD=8F=E9=99=A2=E6=8A=A4=E5=A3=AB?= =?UTF-8?q?=EF=BC=9A=E5=8C=BB=E5=98=B1=E6=89=A7=E8=A1=8C=20=20=E4=BD=8F?= =?UTF-8?q?=E9=99=A2=E5=8F=91=E9=80=80=E8=8D=AF=E3=80=91=E5=B7=B2=E5=8F=91?= =?UTF-8?q?=E8=8D=AF=E5=8C=BB=E5=98=B1=E5=8F=96=E6=B6=88=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E6=9C=AA=E8=BF=9B=E5=85=A5=E2=80=9C=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E6=89=A7=E8=A1=8C=E2=80=9D=E5=88=97=E8=A1=A8=E4=B8=94?= =?UTF-8?q?=E6=9C=AA=E8=81=94=E5=8A=A8=E7=94=9F=E6=88=90=E2=80=9C=E4=BD=8F?= =?UTF-8?q?=E9=99=A2=E9=80=80=E8=8D=AF=E5=8D=95=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因: - 全链路数据流检查:** - | 环节 | 状态 | 说明 | - |------|------|------| - | 📤 录入 | ✅ 正常 | "已执行"tab 勾选医嘱 → 点击"取消执行"按钮 | - | 📤 API 调用 | ✅ 正常 | `adviceCancel` 接口调用正确 | - | 📤 后端 Service | 🔧 已修改 | `adviceCancel` 方法有变量名拼写错误 | - | 📥 查询("取消执行"tab) | 🔧 已修改 | `requestStatus` 未重置导致查不到记录 | 修复: - | 📥 退药单生成 | 🔧 已修改 | 长期医嘱缺少 `updateCancelledStatusBatch` 调用 | - `medicalOrderExecution/index.vue:112-114` - 切换到"取消执行"tab 时,重置 `requestStatus` 为 `RequestStatus.CANCELLED`(5) - `requestStatus` 保持 `RequestStatus.COMPLETED`(3),后端 SQL 只返回 `request_status IN (3, 10)` 的记录,取消执行后的记录被过滤掉 - `AdviceProcessAppServiceImpl.java:576-583` - 修正变量名拼写错误:`creatRefundMedicationList(tempMedDispensedList, ...)` → `creatRefundMedicationList(longMedDispensedList, ...)` - 为长期已发药医嘱添加 `updateCancelledStatusBatch` 调用,确保药品请求状态变更为"待退药" - 长期医嘱取消执行时,退药单从空的 `tempMedDispensedList` 生成(实际无数据),且药品请求状态未更新 - ### 验证结果 - ✅ `vue-tsc --noEmit`:无新增类型错误 - ✅ `vite build`:构建成功(1分52秒) - ✅ `eslint`:无语法错误 --- .../appservice/impl/AdviceProcessAppServiceImpl.java | 5 ++++- .../src/views/inpatientNurse/medicalOrderExecution/index.vue | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inhospitalnursestation/appservice/impl/AdviceProcessAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inhospitalnursestation/appservice/impl/AdviceProcessAppServiceImpl.java index b96d4ebc8..22d2043c1 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inhospitalnursestation/appservice/impl/AdviceProcessAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inhospitalnursestation/appservice/impl/AdviceProcessAppServiceImpl.java @@ -575,7 +575,10 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService { // 处理长期已发放的药品 if (!longMedDispensedList.isEmpty()) { // 生成退药单 - this.creatRefundMedicationList(tempMedDispensedList, procedureIdMap); + this.creatRefundMedicationList(longMedDispensedList, procedureIdMap); + // 药品退药请求状态变更(待退药) + medicationRequestService.updateCancelledStatusBatch( + longMedDispensedList.stream().map(MedicationDispense::getMedReqId).toList(), null, null); } // 处理临时已发放药品 if (!tempMedDispensedList.isEmpty()) { diff --git a/openhis-ui-vue3/src/views/inpatientNurse/medicalOrderExecution/index.vue b/openhis-ui-vue3/src/views/inpatientNurse/medicalOrderExecution/index.vue index af7f25ae3..18318b138 100755 --- a/openhis-ui-vue3/src/views/inpatientNurse/medicalOrderExecution/index.vue +++ b/openhis-ui-vue3/src/views/inpatientNurse/medicalOrderExecution/index.vue @@ -111,6 +111,7 @@ function handleClick(tabName) { break; case 'cancel': exeStatus.value = 9; + requestStatus.value = RequestStatus.CANCELLED; break; }