From 251cf263ffcd7ed5755054678cd3d160b83484d5 Mon Sep 17 00:00:00 2001 From: chenqi Date: Mon, 23 Mar 2026 17:18:12 +0800 Subject: [PATCH] =?UTF-8?q?fix(doctorstation):=20=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E8=AF=8A=E7=96=97=E9=A1=B9=E7=9B=AE=E6=89=A7=E8=A1=8C=E7=A7=91?= =?UTF-8?q?=E5=AE=A4=E7=BC=BA=E5=A4=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在批量签发前验证诊疗项目的执行科室是否已设置 - 对于未选择执行科室的诊疗项目显示警告信息并阻止签发 - 当诊疗项目没有设置执行科室时默认使用患者的就诊科室 - 在后端服务中增加对诊疗项目执行科室的非空校验 - 确保诊疗项目签发流程中执行科室信息完整有效 --- .../impl/DoctorStationAdviceAppServiceImpl.java | 6 ++++++ .../components/prescription/prescriptionlist.vue | 12 +++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) 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 f5530839..aa2e422c 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 @@ -1075,6 +1075,12 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp } for (AdviceSaveDto adviceSaveDto : insertOrUpdateList) { + // 🔧 Bug Fix #238: 诊疗项目执行科室非空校验 + if (adviceSaveDto.getAdviceType() != null && adviceSaveDto.getAdviceType() == 3) { + if (adviceSaveDto.getPositionId() == null) { + throw new ServiceException("诊疗项目必须选择执行科室"); + } + } serviceRequest = new ServiceRequest(); serviceRequest.setId(adviceSaveDto.getRequestId()); // 主键id serviceRequest.setStatusEnum(is_save ? RequestStatus.DRAFT.getValue() : RequestStatus.ACTIVE.getValue());// 请求状态 diff --git a/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue b/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue index 60d2b97a..8b973667 100644 --- a/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue @@ -2100,6 +2100,13 @@ function handleSave(prescriptionId) { // 过滤出真正可以签发的列表 (已保存的) saveList = saveList.filter((item) => item.isSaved || item.requestId); + // 🔧 Bug Fix #238: 批量签发前校验诊疗项目执行科室 + const invalidItems = saveList.filter(item => item.adviceType === 3 && !item.orgId); + if (invalidItems.length > 0) { + proxy.$modal.msgWarning(`有 ${invalidItems.length} 个诊疗项目未选择执行科室,请先编辑完善`); + return; + } + if (saveList.length == 0) { if (selectedRows.length > 0) { proxy.$modal.msgWarning('选中的医嘱不可签发(可能未保存或已签发)'); @@ -3067,7 +3074,10 @@ function setValue(row) { prescriptionList.value[rowIndex.value].categoryEnum = 31; // 会诊的category_enum设置为31 } else { // 诊疗类型(adviceType == 3) - prescriptionList.value[rowIndex.value].orgId = JSON.parse(JSON.stringify(row)).positionId; + // 🔧 Bug Fix #238: 诊疗项目默认使用患者就诊科室 + if (!prescriptionList.value[rowIndex.value].orgId) { + prescriptionList.value[rowIndex.value].orgId = props.patientInfo.orgId; + } // 🔧 Bug #218 修复:使用组套中维护的quantity,如果没有则默认1 prescriptionList.value[rowIndex.value].quantity = row.quantity || 1; // 🔧 Bug #144 修复:安全访问 priceList,防止 orderDetailInfos 为空时出错