fix(doctorstation): 解决医嘱管理中不同类型医嘱的删除和撤回逻辑问题
- 分离不同状态的会诊医嘱,已作废医嘱直接从前端移除,其他状态医嘱调用后端API处理 - 修复普通医嘱删除逻辑,支持草稿和待签发状态的医嘱删除操作 - 宽松医嘱状态条件,支持statusEnum为1(草稿)或2(已签发)的医嘱进行撤回操作 - 修复前端adviceType与后端ItemType映射关系,药品类型值为1,耗材类型值为4,诊疗类型值为3 - 添加详细的调试日志用于追踪医嘱处理流程 - 优化医嘱分类逻辑,确保各类医嘱正确归类处理
This commit is contained in:
@@ -557,16 +557,20 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
}
|
||||
}
|
||||
|
||||
// 药品
|
||||
// 药品(前端adviceType=1)
|
||||
List<AdviceSaveDto> medicineList = adviceSaveList.stream()
|
||||
.filter(e -> ItemType.MEDICINE.getValue().equals(e.getAdviceType())).collect(Collectors.toList());
|
||||
// 耗材
|
||||
.filter(e -> ItemType.MEDICINE.getValue().equals(e.getAdviceType())
|
||||
|| e.getAdviceType() == 1).collect(Collectors.toList());
|
||||
// 耗材(前端adviceType=4,后端ItemType.DEVICE=2)
|
||||
List<AdviceSaveDto> deviceList = adviceSaveList.stream()
|
||||
.filter(e -> ItemType.DEVICE.getValue().equals(e.getAdviceType())).collect(Collectors.toList());
|
||||
// 诊疗活动(包括普通诊疗和会诊:前端会诊类型值为5)
|
||||
.filter(e -> ItemType.DEVICE.getValue().equals(e.getAdviceType())
|
||||
|| e.getAdviceType() == 4) // 🔧 BugFix: 前端耗材类型值为4
|
||||
.collect(Collectors.toList());
|
||||
// 诊疗活动(包括普通诊疗:前端adviceType=3,会诊:前端adviceType=5)
|
||||
List<AdviceSaveDto> activityList = adviceSaveList.stream()
|
||||
.filter(e -> ItemType.ACTIVITY.getValue().equals(e.getAdviceType())
|
||||
|| e.getAdviceType() == 5) // 🔧 BugFix: 会诊类型值为5,也归类到诊疗活动
|
||||
|| e.getAdviceType() == 3 // 🔧 BugFix: 前端诊疗类型值为3
|
||||
|| e.getAdviceType() == 5) // 🔧 BugFix: 前端会诊类型值为5
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 🔍 Debug日志: 记录分类结果
|
||||
|
||||
Reference in New Issue
Block a user