From d3b60306937b08bf6242159f7cfbafa5d28d14cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=A4=87?= <刘备@gentronhealth.com> Date: Sat, 9 May 2026 17:55:16 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#456:=20=E9=97=A8=E8=AF=8A=E5=8C=BB?= =?UTF-8?q?=E7=94=9F=E7=AB=99=EF=BC=9A=E8=AF=8A=E7=96=97=E7=B1=BB=E5=8C=BB?= =?UTF-8?q?=E5=98=B1=E4=BF=9D=E5=AD=98=E5=90=8E=E7=B1=BB=E5=9E=8B=E5=8F=98?= =?UTF-8?q?=E6=9B=B4=E4=B8=BA"=E6=A3=80=E6=9F=A5"=E4=B8=94=E7=AD=BE?= =?UTF-8?q?=E5=8F=91=E6=88=90=E5=8A=9F=E5=90=8E=E7=8A=B6=E6=80=81=E6=9C=AA?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因:前端setValue中将row.categoryCode(文本值如"检查")赋给categoryEnum(Integer字段), 导致后端Jackson反序列化失败,category_enum存储异常。 修复:将row.categoryCode改为row.activityType(数值1=检验,2=检查,3=护理,4=手术,5=其他)。 --- .../components/prescription/prescriptionlist.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue b/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue index 23404eed..10fa2a0d 100755 --- a/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue @@ -3410,7 +3410,7 @@ function setValue(row) { // 🔧 Bug Fix #456: 诊疗类医嘱(adviceType=3)不应将categoryCode赋值给categoryEnum, // 否则保存后SQL查询会根据category_enum=2(检查目录)将类型误判为"检查" if (row.adviceType != 3) { - prescriptionList.value[rowIndex.value].categoryEnum = row.categoryCode; + prescriptionList.value[rowIndex.value].categoryEnum = row.activityType; } prescriptionList.value[rowIndex.value].skinTestFlag = row.skinTestFlag; prescriptionList.value[rowIndex.value].definitionId = row.chargeItemDefinitionId; @@ -3482,7 +3482,7 @@ function setValue(row) { // 🔧 Bug Fix: 设置耗材的minUnitQuantity,避免保存时null错误 prescriptionList.value[rowIndex.value].minUnitQuantity = row.quantity || 1; // 🔧 Bug Fix: 设置耗材的categoryEnum,避免数据库约束错误 - prescriptionList.value[rowIndex.value].categoryEnum = row.categoryCode || 3; // 默认为3 + prescriptionList.value[rowIndex.value].categoryEnum = row.activityType || 3; // 默认为3 prescriptionList.value[rowIndex.value].positionName = row.positionName || ''; // 🔧 Bug Fix: 使用 positionId,如果为空则使用患者信息中的 orgId console.log('设置耗材locationId:', { @@ -3504,7 +3504,7 @@ function setValue(row) { // 🔧 Bug Fix: 设置耗材的minUnitQuantity,避免保存时null错误 prescriptionList.value[rowIndex.value].minUnitQuantity = row.quantity || 1; // 🔧 Bug Fix: 设置耗材的categoryEnum,避免数据库约束错误 - prescriptionList.value[rowIndex.value].categoryEnum = row.categoryCode || 3; // 默认为3 + prescriptionList.value[rowIndex.value].categoryEnum = row.activityType || 3; // 默认为3 prescriptionList.value[rowIndex.value].positionName = row.positionName || ''; const finalLocationId = row.positionId || props.patientInfo.orgId; prescriptionList.value[rowIndex.value].locationId = finalLocationId;