fix: resolve #407 examination request wrong advice type classification

Bug #407: 检查申请同步到医嘱列表时,医嘱类型被错误标注为中成药而非诊疗

Root cause: ServiceRequest.categoryEnum was not set when creating service requests from examination applications, causing the system to misclassify them as Chinese medicine (adviceType=2) instead of medical treatment (adviceType=3)

Fix: Added serviceRequest.setCategoryEnum(3) in both POST and PUT methods of ExamApplyController to correctly classify examination requests as medical treatment type

Impact: Examination requests will now display correct type (诊疗/medical treatment) in the advice list and won't trigger database errors when signing
This commit is contained in:
2026-04-23 09:09:03 +08:00
parent 72c0ceac29
commit 78bcdef7fd

View File

@@ -212,6 +212,8 @@ public class ExamApplyController extends BaseController {
// 检查申请不走诊疗定义设置为0占位数据库有NOT NULL约束
serviceRequest.setActivityId(0L);
// 🔧 Bug #407修复设置医嘱类型为诊疗(3),避免被错误识别为中成药
serviceRequest.setCategoryEnum(3);
// 患者和就诊信息 —— 使用前端传递的数字型ID
if (dto.getPatientIdNum() != null) {
@@ -389,6 +391,8 @@ public class ExamApplyController extends BaseController {
serviceRequest.setBasedOnTable("exam_apply");
serviceRequest.setBasedOnId(examApply.getId());
serviceRequest.setActivityId(0L);
// 🔧 Bug #407修复设置医嘱类型为诊疗(3),避免被错误识别为中成药
serviceRequest.setCategoryEnum(3);
if (dto.getPatientIdNum() != null) {
serviceRequest.setPatientId(dto.getPatientIdNum());