From 63a3f63380771cdc3ae47a2f9a00a8c39db8e4eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=B3=E7=BE=BD?= <关羽@gentronhealth.com> Date: Wed, 13 May 2026 16:12:16 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#454:=20=E9=97=A8=E8=AF=8A=E5=8C=BB?= =?UTF-8?q?=E7=94=9F=E7=AB=99-=E5=8C=BB=E5=98=B1=E9=A1=B5=E7=AD=BE?= =?UTF-8?q?=EF=BC=9A=E5=88=A0=E9=99=A4"=E5=BE=85=E7=AD=BE=E5=8F=91"?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E7=9A=84=E6=A3=80=E9=AA=8C=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E9=94=99=E8=AF=AF=E8=A7=A6=E5=8F=91"?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E7=A7=91=E5=AE=A4"=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E5=88=A0=E9=99=A4=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在handService的执行科室校验中增加dbOpType DELETE跳过条件,作为BugFix#454过滤器的第二层防御。 同时修复handMedication和handService中重复声明requestId变量导致的编译错误。 Co-Authored-By: Claude Opus 4.7 --- .../appservice/impl/DoctorStationAdviceAppServiceImpl.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 69471421f..66ad09c45 100755 --- 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 @@ -967,7 +967,6 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp // 删除已经产生的药品发放信息 iMedicationDispenseService.deleteMedicationDispense(adviceSaveDto.getRequestId()); // 🔧 Bug Fix #219: 删除费用项 - Long requestId = adviceSaveDto.getRequestId(); String serviceTable = CommonConstants.TableName.MED_MEDICATION_REQUEST; // 直接删除费用项 iChargeItemService.deleteByServiceTableAndId(serviceTable, requestId); @@ -1743,7 +1742,6 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp new LambdaQueryWrapper().eq(ServiceRequest::getParentId, requestId));// 删除诊疗套餐对应的子项 // 🔧 Bug Fix #219: 删除费用项 - Long requestId = adviceSaveDto.getRequestId(); String serviceTable = CommonConstants.TableName.WOR_SERVICE_REQUEST; // 直接删除费用项 iChargeItemService.deleteByServiceTableAndId(serviceTable, requestId); @@ -1800,8 +1798,9 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp log.info("handService - 自动补全founderOrgId: founderOrgId={}", adviceSaveDto.getFounderOrgId()); } - // 🔧 Bug Fix #238: 诊疗项目执行科室非空校验 - if (adviceSaveDto.getAdviceType() != null && adviceSaveDto.getAdviceType() == 3) { + // 🔧 Bug Fix #238/#454: 诊疗项目执行科室非空校验(删除操作跳过校验) + if (adviceSaveDto.getAdviceType() != null && adviceSaveDto.getAdviceType() == 3 + && !DbOpType.DELETE.getCode().equals(adviceSaveDto.getDbOpType())) { Long effectiveOrgId = adviceSaveDto.getEffectiveOrgId(); if (effectiveOrgId == null) { throw new ServiceException("诊疗项目必须选择执行科室");