Compare commits

...

1 Commits

Author SHA1 Message Date
86f12b425a fix(#782): guanyu (文件合入) 2026-06-19 19:57:57 +08:00

View File

@@ -1154,14 +1154,17 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
.orElse(new Date()); .orElse(new Date());
// 获取当前操作用户昵称作为停嘱医生 // 获取当前操作用户昵称作为停嘱医生
String stopUserName = SecurityUtils.getNickName(); String stopUserName = SecurityUtils.getNickName();
// 药品 // 药品包含出院带药adviceType=7与handleDeleteOperations保持一致
List<AdviceBatchOpParam> medicineList = paramList.stream() List<AdviceBatchOpParam> medicineList = paramList.stream()
.filter(e -> ItemType.MEDICINE.getValue().equals(e.getAdviceType())).collect(Collectors.toList()); .filter(e -> ItemType.MEDICINE.getValue().equals(e.getAdviceType())
|| (e.getAdviceType() != null && e.getAdviceType() == 7))
.collect(Collectors.toList());
List<Long> medicineRequestIds List<Long> medicineRequestIds
= medicineList.stream().map(AdviceBatchOpParam::getRequestId).collect(Collectors.toList()); = medicineList.stream().map(AdviceBatchOpParam::getRequestId).collect(Collectors.toList());
// 诊疗包含护理adviceType=26、文字医嘱adviceType=8 // 诊疗包含护理adviceType=26、手术adviceType=6、文字医嘱adviceType=8与saveRegAdvice保持一致
List<AdviceBatchOpParam> activityList = paramList.stream() List<AdviceBatchOpParam> activityList = paramList.stream()
.filter(e -> ItemType.ACTIVITY.getValue().equals(e.getAdviceType()) .filter(e -> ItemType.ACTIVITY.getValue().equals(e.getAdviceType())
|| ItemType.SURGERY.getValue().equals(e.getAdviceType())
|| ItemType.TEXT.getValue().equals(e.getAdviceType()) || ItemType.TEXT.getValue().equals(e.getAdviceType())
|| (e.getAdviceType() != null && e.getAdviceType() == 26)) || (e.getAdviceType() != null && e.getAdviceType() == 26))
.collect(Collectors.toList()); .collect(Collectors.toList());
@@ -1194,9 +1197,7 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
.set(DeviceRequest::getUpdateBy, stopUserName)); .set(DeviceRequest::getUpdateBy, stopUserName));
} }
// 🔧 Bug #782 修复:兜底处理未被以上任何类型过滤器捕获的医嘱 // 🔧 Bug #782 兜底处理未被以上类型过滤器捕获的未知医嘱类型
// 当批量停嘱包含非标准 adviceType如 type=31、type=7 等)时,这些医嘱
// 不会被药品/诊疗/耗材任一组捕获,导致状态未更新为 PENDING_STOP造成状态不一致
// 将所有未匹配类型的医嘱统一按诊疗请求ServiceRequest处理 // 将所有未匹配类型的医嘱统一按诊疗请求ServiceRequest处理
Set<Long> handledIds = new HashSet<>(); Set<Long> handledIds = new HashSet<>();
handledIds.addAll(medicineRequestIds); handledIds.addAll(medicineRequestIds);
@@ -1235,14 +1236,17 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
*/ */
@Override @Override
public R<?> cancelStopRegAdvice(List<AdviceBatchOpParam> paramList) { public R<?> cancelStopRegAdvice(List<AdviceBatchOpParam> paramList) {
// 药品 // 药品包含出院带药adviceType=7与handleDeleteOperations保持一致
List<AdviceBatchOpParam> medicineList = paramList.stream() List<AdviceBatchOpParam> medicineList = paramList.stream()
.filter(e -> ItemType.MEDICINE.getValue().equals(e.getAdviceType())).collect(Collectors.toList()); .filter(e -> ItemType.MEDICINE.getValue().equals(e.getAdviceType())
|| (e.getAdviceType() != null && e.getAdviceType() == 7))
.collect(Collectors.toList());
List<Long> medicineRequestIds List<Long> medicineRequestIds
= medicineList.stream().map(AdviceBatchOpParam::getRequestId).collect(Collectors.toList()); = medicineList.stream().map(AdviceBatchOpParam::getRequestId).collect(Collectors.toList());
// 诊疗包含护理adviceType=26、文字医嘱adviceType=8 // 诊疗包含护理adviceType=26、手术adviceType=6、文字医嘱adviceType=8与saveRegAdvice保持一致
List<AdviceBatchOpParam> activityList = paramList.stream() List<AdviceBatchOpParam> activityList = paramList.stream()
.filter(e -> ItemType.ACTIVITY.getValue().equals(e.getAdviceType()) .filter(e -> ItemType.ACTIVITY.getValue().equals(e.getAdviceType())
|| ItemType.SURGERY.getValue().equals(e.getAdviceType())
|| ItemType.TEXT.getValue().equals(e.getAdviceType()) || ItemType.TEXT.getValue().equals(e.getAdviceType())
|| (e.getAdviceType() != null && e.getAdviceType() == 26)) || (e.getAdviceType() != null && e.getAdviceType() == 26))
.collect(Collectors.toList()); .collect(Collectors.toList());