242 检验项目设置-》检验项目:费用套餐/下级医技类型字段两列无数据
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
<where>
|
||||
T1.delete_flag = '0'
|
||||
<if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
|
||||
@@ -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
|
||||
<where>
|
||||
T1.delete_flag = '0'
|
||||
AND T2.instance_table = 'wor_activity_definition'
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -267,7 +267,9 @@
|
||||
<el-table-column label="费用套餐" min-width="120" align="center">
|
||||
<template #default="{ row }">
|
||||
<template v-if="editingRowId === row.id">
|
||||
<el-select v-model="row.package" placeholder="选择费用套餐" size="small" style="width: 100%;" filterable clearable @change="updateAmountFromPackage(row)" @visible-change="(visible) => { if (visible && feePackages.length === 0) getFeePackages() }">
|
||||
<el-select v-model="row.feePackageId" placeholder="选择费用套餐" size="small" style="width: 100%;" filterable clearable
|
||||
@change="(val) => { const pkg = feePackages.find(p => p.id === val); row.package = pkg ? pkg.packageName : ''; updateAmountFromPackage(row); }"
|
||||
@visible-change="(visible) => { if (visible && feePackages.length === 0) getFeePackages() }">
|
||||
<el-option label="选择费用套餐" value="" />
|
||||
<el-option
|
||||
v-for="pkg in feePackages"
|
||||
@@ -278,7 +280,7 @@
|
||||
</el-select>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ row.package }}
|
||||
{{ row.package || '-' }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user