From 68c0c098c8a928ae72b76938701c0fe20688e0d9 Mon Sep 17 00:00:00 2001 From: duzhongxu <15039018447@163.com> Date: Thu, 19 Mar 2026 15:54:53 +0800 Subject: [PATCH] =?UTF-8?q?242=20=E6=A3=80=E9=AA=8C=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE-=E3=80=8B=E6=A3=80=E9=AA=8C=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=EF=BC=9A=E8=B4=B9=E7=94=A8=E5=A5=97=E9=A4=90/?= =?UTF-8?q?=E4=B8=8B=E7=BA=A7=E5=8C=BB=E6=8A=80=E7=B1=BB=E5=9E=8B=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E4=B8=A4=E5=88=97=E6=97=A0=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/DiagnosisTreatmentDto.java | 14 ++++++++++ .../dto/DiagnosisTreatmentUpDto.java | 10 ++++++- .../ActivityDefinitionManageMapper.xml | 28 +++++++++++++++++-- .../workflow/domain/ActivityDefinition.java | 8 +++++- .../views/maintainSystem/Inspection/index.vue | 26 ++++++++++------- 5 files changed, 72 insertions(+), 14 deletions(-) diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DiagnosisTreatmentDto.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DiagnosisTreatmentDto.java index bcac163a..3d5e9549 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DiagnosisTreatmentDto.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DiagnosisTreatmentDto.java @@ -139,4 +139,18 @@ public class DiagnosisTreatmentDto { /** 检验类型名称(用于前端 testType 字段) */ private String testType; + + /** 费用套餐ID(关联 inspection_basic_information) */ + @JsonSerialize(using = ToStringSerializer.class) + private Long feePackageId; + + /** 费用套餐名称(JOIN inspection_basic_information.package_name) */ + private String packageName; + + /** 下级医技类型ID(关联 inspection_type 子类) */ + @JsonSerialize(using = ToStringSerializer.class) + private Long subItemId; + + /** 下级医技类型名称(JOIN inspection_type.name) */ + private String subItemName; } diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DiagnosisTreatmentUpDto.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DiagnosisTreatmentUpDto.java index 92f77c38..7151dd3a 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DiagnosisTreatmentUpDto.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DiagnosisTreatmentUpDto.java @@ -129,7 +129,15 @@ public class DiagnosisTreatmentUpDto { /** 服务范围 */ private String serviceRange; - /** 检验类型ID */ + /** 检验类型ID(关联 inspection_type 大类,parent_id 为空) */ @JsonSerialize(using = ToStringSerializer.class) private Long inspectionTypeId; + + /** 费用套餐ID(关联 inspection_basic_information) */ + @JsonSerialize(using = ToStringSerializer.class) + private Long feePackageId; + + /** 下级医技类型ID(关联 inspection_type 子类,parent_id 不为空) */ + @JsonSerialize(using = ToStringSerializer.class) + private Long subItemId; } diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/datadictionary/ActivityDefinitionManageMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/datadictionary/ActivityDefinitionManageMapper.xml index c19d1f42..98b7a520 100644 --- a/openhis-server-new/openhis-application/src/main/resources/mapper/datadictionary/ActivityDefinitionManageMapper.xml +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/datadictionary/ActivityDefinitionManageMapper.xml @@ -31,12 +31,16 @@ T1.sort_order, T1.service_range, T1.inspection_type_id, + T1.fee_package_id, + T1.sub_item_id, T2.type_code as item_type_code, T2.yb_type, T2.price_code, T2.price as retail_price, T4.amount as maximum_retail_price, - T3.name as test_type + T3.name as test_type, + T5.package_name, + T6.name as sub_item_name FROM wor_activity_definition T1 /* 只JOIN必要的价格表,使用INNER JOIN避免笛卡尔积 */ INNER JOIN adm_charge_item_definition T2 @@ -50,6 +54,14 @@ LEFT JOIN adm_charge_item_def_detail T4 ON T4.definition_id = T2.id AND T4.condition_code = '4' + /* 费用套餐关联 */ + LEFT JOIN inspection_basic_information T5 + ON T1.fee_package_id = T5.basic_information_id + AND T5.del_flag = false + /* 下级医技类型关联(inspection_type 子类) */ + LEFT JOIN inspection_type T6 + ON T1.sub_item_id = T6.id + AND T6.valid_flag = 1 T1.delete_flag = '0' @@ -105,11 +117,23 @@ T1.sort_order, T1.service_range, T1.inspection_type_id, - T3.name as test_type + T1.fee_package_id, + T1.sub_item_id, + T3.name as test_type, + T6.package_name, + T7.name as sub_item_name FROM wor_activity_definition T1 LEFT JOIN adm_charge_item_definition T2 ON T1.id = T2.instance_id /* 检验类型关联 */ LEFT JOIN inspection_type T3 ON T1.inspection_type_id = T3.id AND T3.valid_flag = 1 + /* 费用套餐关联 */ + LEFT JOIN inspection_basic_information T6 + ON T1.fee_package_id = T6.basic_information_id + AND T6.del_flag = false + /* 下级医技类型关联(inspection_type 子类) */ + LEFT JOIN inspection_type T7 + ON T1.sub_item_id = T7.id + AND T7.valid_flag = 1 T1.delete_flag = '0' AND T2.instance_table = 'wor_activity_definition' diff --git a/openhis-server-new/openhis-domain/src/main/java/com/openhis/workflow/domain/ActivityDefinition.java b/openhis-server-new/openhis-domain/src/main/java/com/openhis/workflow/domain/ActivityDefinition.java index a70ec378..952e9018 100644 --- a/openhis-server-new/openhis-domain/src/main/java/com/openhis/workflow/domain/ActivityDefinition.java +++ b/openhis-server-new/openhis-domain/src/main/java/com/openhis/workflow/domain/ActivityDefinition.java @@ -90,6 +90,12 @@ public class ActivityDefinition extends HisBaseEntity { /** 服务范围 */ private String serviceRange; - /** 检验类型ID(关联 inspection_type 表) */ + /** 检验类型ID(关联 inspection_type 表,parent_id 为空的大类) */ private Long inspectionTypeId; + + /** 费用套餐ID(关联 inspection_basic_information 表) */ + private Long feePackageId; + + /** 下级医技类型ID(关联 inspection_type 表,parent_id 不为空的子类) */ + private Long subItemId; } \ No newline at end of file diff --git a/openhis-ui-vue3/src/views/maintainSystem/Inspection/index.vue b/openhis-ui-vue3/src/views/maintainSystem/Inspection/index.vue index daace2f4..b9946031 100644 --- a/openhis-ui-vue3/src/views/maintainSystem/Inspection/index.vue +++ b/openhis-ui-vue3/src/views/maintainSystem/Inspection/index.vue @@ -267,7 +267,9 @@ @@ -1289,14 +1291,16 @@ const loadObservationItems = async (resetPage = false) => { id: item.id, code: item.busNo || '', name: item.name || '', - testType: item.inspectionTypeId_dictText || item.testType || '', // 优先使用字典翻译字段 - inspectionTypeId: item.inspectionTypeId || null, // 检验类型ID - package: '', + testType: item.inspectionTypeId_dictText || item.testType || '', + inspectionTypeId: item.inspectionTypeId || null, + package: item.packageName || '', + feePackageId: item.feePackageId || null, sampleType: item.specimenCode || '', amount: parseFloat(item.retailPrice || 0), sortOrder: item.sortOrder || null, serviceRange: item.serviceRange || '全部', - sub医技Type: '', + subItemName: item.subItemName || '', + subItemId: item.subItemId || null, remark: item.descriptionText || '', status: true })); @@ -1888,8 +1892,8 @@ const editItem = (item) => { }; const updateAmountFromPackage = (item) => { - if (item.package) { - const selectedPackage = feePackages.value.find(pkg => pkg.id === item.package); + if (item.feePackageId) { + const selectedPackage = feePackages.value.find(pkg => pkg.id === item.feePackageId); if (selectedPackage) { // 套餐总金额 = 套餐金额 + 服务费 const packageAmount = parseFloat(selectedPackage.packageAmount || 0); @@ -1949,7 +1953,9 @@ const saveItem = async (item) => { busNo: item.code.trim(), name: item.name.trim(), categoryCode: inspectionCategoryCode.value, - inspectionTypeId: item.inspectionTypeId || null, // 检验类型ID + inspectionTypeId: item.inspectionTypeId || null, + feePackageId: item.feePackageId || null, + subItemId: item.subItemId || null, specimenCode: item.sampleType, retailPrice: item.amount, descriptionText: item.remark, @@ -2035,7 +2041,7 @@ const exportTable = () => { item.amount, item.sortOrder || 999999, `"${item.serviceRange || '全部'}"`, - `"${item.sub医技Type || '-'}"`, + `"${item.subItemName || '-'}"`, `"${item.remark || '-'}"` ].join(',')) ].join('\n');