Fix Bug #456: 门诊医生站:诊疗类医嘱保存后类型变更为"检查"且签发成功后状态未更新
根因:前端setValue中将row.categoryCode(文本值如"检查")赋给categoryEnum(Integer字段), 导致后端Jackson反序列化失败,category_enum存储异常。 修复:将row.categoryCode改为row.activityType(数值1=检验,2=检查,3=护理,4=手术,5=其他)。
This commit is contained in:
@@ -3410,7 +3410,7 @@ function setValue(row) {
|
|||||||
// 🔧 Bug Fix #456: 诊疗类医嘱(adviceType=3)不应将categoryCode赋值给categoryEnum,
|
// 🔧 Bug Fix #456: 诊疗类医嘱(adviceType=3)不应将categoryCode赋值给categoryEnum,
|
||||||
// 否则保存后SQL查询会根据category_enum=2(检查目录)将类型误判为"检查"
|
// 否则保存后SQL查询会根据category_enum=2(检查目录)将类型误判为"检查"
|
||||||
if (row.adviceType != 3) {
|
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].skinTestFlag = row.skinTestFlag;
|
||||||
prescriptionList.value[rowIndex.value].definitionId = row.chargeItemDefinitionId;
|
prescriptionList.value[rowIndex.value].definitionId = row.chargeItemDefinitionId;
|
||||||
@@ -3482,7 +3482,7 @@ function setValue(row) {
|
|||||||
// 🔧 Bug Fix: 设置耗材的minUnitQuantity,避免保存时null错误
|
// 🔧 Bug Fix: 设置耗材的minUnitQuantity,避免保存时null错误
|
||||||
prescriptionList.value[rowIndex.value].minUnitQuantity = row.quantity || 1;
|
prescriptionList.value[rowIndex.value].minUnitQuantity = row.quantity || 1;
|
||||||
// 🔧 Bug Fix: 设置耗材的categoryEnum,避免数据库约束错误
|
// 🔧 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 || '';
|
prescriptionList.value[rowIndex.value].positionName = row.positionName || '';
|
||||||
// 🔧 Bug Fix: 使用 positionId,如果为空则使用患者信息中的 orgId
|
// 🔧 Bug Fix: 使用 positionId,如果为空则使用患者信息中的 orgId
|
||||||
console.log('设置耗材locationId:', {
|
console.log('设置耗材locationId:', {
|
||||||
@@ -3504,7 +3504,7 @@ function setValue(row) {
|
|||||||
// 🔧 Bug Fix: 设置耗材的minUnitQuantity,避免保存时null错误
|
// 🔧 Bug Fix: 设置耗材的minUnitQuantity,避免保存时null错误
|
||||||
prescriptionList.value[rowIndex.value].minUnitQuantity = row.quantity || 1;
|
prescriptionList.value[rowIndex.value].minUnitQuantity = row.quantity || 1;
|
||||||
// 🔧 Bug Fix: 设置耗材的categoryEnum,避免数据库约束错误
|
// 🔧 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 || '';
|
prescriptionList.value[rowIndex.value].positionName = row.positionName || '';
|
||||||
const finalLocationId = row.positionId || props.patientInfo.orgId;
|
const finalLocationId = row.positionId || props.patientInfo.orgId;
|
||||||
prescriptionList.value[rowIndex.value].locationId = finalLocationId;
|
prescriptionList.value[rowIndex.value].locationId = finalLocationId;
|
||||||
|
|||||||
Reference in New Issue
Block a user