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("诊疗项目必须选择执行科室");