杆塔总基数

query: 返回项目划分【架空输电线路本体工程/基础工程】下编码包含【YX2-1~7】的所有【定额】的【数量】之和

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()

    def expand_code_range(code_range):
        if '~' not in code_range:
            return code_range
        prefix, range_part = code_range.split('-')
        start, end = map(int, range_part.split('~'))
        return '/'.join([f"{prefix}-{i}" for i in range(start, end + 1)])

    expanded_codes = expand_code_range('YX2-1~7')

    result_dict = project.get_quantities_node_by_parent_and_code(
        parent_path='架空输电线路本体工程/基础工程',
        quantity_type='定额',
        code=expanded_codes
    )

    status = result_dict.get('status', False)
    if not status:
        return result_dict

    data = result_dict.get('data', [])
    if not isinstance(data, list):
        data = [data]

    total_quantity = 0.0
    for item in data:
        if isinstance(item, dict) and '数量' in item:
            try:
                quantity = float(item['数量'])
                total_quantity += quantity
            except (ValueError, TypeError):
                continue

    return {
        'code': 200,
        'message': 'Ok',
        'status': True,
        'data': {'total_quantity': total_quantity}
    }


query: 返回项目划分【架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立】及名称包含【角钢】的所有【主材】的【数量】之和

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    division_path = "架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立"
    result = project.get_quantities_node_by_parent_and_name(division_path, "主材", "角钢")
    if not result.get('status', False):
        return result

    total_quantity = 0.0
    for material in result.get('data', []):
        if isinstance(material, dict) and material.get('类型') == '主材' and '角钢' in material.get('name', ''):
            try:
                quantity = float(material.get('数量', 0))
                total_quantity += quantity
            except (ValueError, TypeError):
                continue

    return {
        'code': 200,
        'message': 'Ok',
        'status': True,
        'data': total_quantity
    }


name: 角钢塔_其中：高强钢塔材量

query: 返回项目划分【架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立】及名称包含【角钢、高强】的所有【主材】的【数量】之和

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    division_path = "架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立"
    result = project.get_division_item_by_path(division_path)
    if not result.get('status', False):
        return result

    parent_path = division_path
    quantity_type = "主材"
    partial_name = "角钢、高强"
    result = project.get_quantities_node_by_parent_and_name(parent_path, quantity_type, partial_name)
    if not result.get('status', False):
        return result

    materials = result.get('data', [])
    total_quantity = 0.0
    for material in materials:
        if isinstance(material, Material):
            try:
                quantity = float(material.数量) if material.数量 else 0.0
                total_quantity += quantity
            except (ValueError, TypeError):
                continue

    return {
        'code': 200,
        'message': 'Ok',
        'status': True,
        'data': total_quantity
    }


query: 返回项目划分【架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立】及名称包含【角钢】的所有【主材】的【单价】之和

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    division_path = "架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立"
    result = project.get_division_item_by_path(division_path)
    if not result.get('status', False):
        return result

    division_data = result.get('data', {})
    if not division_data:
        return {'code': 201, 'message': '项目划分节点不存在', 'status': False, 'data': []}

    parent_path = division_path
    quantity_type = "主材"
    partial_name = "角钢"
    result = project.get_quantities_node_by_parent_and_name(parent_path, quantity_type, partial_name)
    if not result.get('status', False):
        return result

    materials = result.get('data', [])
    if not materials:
        return {'code': 201, 'message': '未找到匹配的主材', 'status': False, 'data': []}

    total_price = 0.0
    for material in materials:
        if isinstance(material, dict):
            price_str = material.get('单价含税', '0')
        else:
            price_str = getattr(material, '单价含税', '0')
        try:
            price = float(price_str) if price_str else 0.0
            total_price += price
        except ValueError:
            continue

    return {'code': 200, 'message': 'Ok', 'status': True, 'data': total_price}


name: 角钢塔_其中：高强钢塔材费用_元

query: 返回项目划分【架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立】及名称包含【角钢、高强】的所有【主材】的【单价】之和

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    division_path = "架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立"
    result = project.get_quantities_node_by_parent_and_name(division_path, "主材", "角钢、高强")
    if not result.get('status', False):
        return result

    total_price = 0.0
    for material in result.get('data', []):
        if isinstance(material, Material):
            try:
                price = float(material.单价含税) if material.单价含税 else 0.0
                total_price += price
            except (ValueError, TypeError):
                continue

    return {
        'code': 200,
        'message': 'Ok',
        'status': True,
        'data': total_price
    }


query: 返回项目划分【架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立】及名称包含【钢管塔】的所有【主材】的【数量】之和

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    division_path = "架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立"
    result = project.get_division_item_by_path(division_path)
    if not result.get('status', False):
        return result

    parent_path = division_path
    quantity_type = "主材"
    partial_name = "钢管塔"
    result = project.get_quantities_node_by_parent_and_name(parent_path, quantity_type, partial_name)
    if not result.get('status', False):
        return result

    materials = result.get('data', [])
    total_quantity = 0.0
    for material in materials:
        if isinstance(material, dict) and material.get('类型') == '1' and '钢管塔' in material.get('name', ''):
            try:
                quantity = float(material.get('数量', 0))
                total_quantity += quantity
            except (ValueError, TypeError):
                continue

    return {
        'code': 200,
        'message': 'Ok',
        'status': True,
        'data': total_quantity
    }


query: 返回项目划分【架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立】及名称包含【钢管塔】的所有【主材】的【单价】之和

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    path = "架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立"
    result = project.get_quantities_node_by_parent_and_name(path, "主材", "钢管塔")
    if not result.get('status', False):
        return result

    total_price = 0.0
    for material in result.get('data', []):
        if isinstance(material, Material) and "钢管塔" in material.name:
            try:
                price = float(material.单价含税) if material.单价含税 else 0.0
                total_price += price
            except (ValueError, TypeError):
                continue

    return {
        'code': 200,
        'message': 'Ok',
        'status': True,
        'data': total_price
    }


query: 返回项目划分【架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立】及名称包含【钢管杆】的所有【主材】的【数量】之和

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    division_path = "架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立"
    result = project.get_division_item_by_path(division_path)
    if not result.get('status', False):
        return result

    division_data = result.get('data', {})
    if not division_data:
        return {'code': 201, 'message': '未找到指定项目划分', 'status': False, 'data': []}

    parent_path = division_path
    quantity_type = "主材"
    partial_name = "钢管杆"
    result = project.get_quantities_node_by_parent_and_name(parent_path, quantity_type, partial_name)
    if not result.get('status', False):
        return result

    materials = result.get('data', [])
    if not materials:
        return {'code': 201, 'message': '未找到包含"钢管杆"的主材', 'status': False, 'data': []}

    total_quantity = 0.0
    for material in materials:
        if isinstance(material, dict):
            quantity_str = material.get('数量', '0')
        else:
            quantity_str = getattr(material, '数量', '0')
        try:
            quantity = float(quantity_str)
            total_quantity += quantity
        except ValueError:
            continue

    return {'code': 200, 'message': 'Ok', 'status': True, 'data': total_quantity}


query: 返回项目划分【架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立】及名称包含【钢管杆】的所有【主材】的【单价】之和

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    division_path = "架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立"
    result = project.get_quantities_node_by_parent_and_name(division_path, "主材", "钢管杆")
    if not result.get('status', False):
        return result

    total_price = 0.0
    materials = result.get('data', [])
    for material in materials:
        if isinstance(material, Material) and "单价" in material.__dict__:
            try:
                price = float(material.单价)
                total_price += price
            except (ValueError, TypeError):
                continue

    return {
        'code': 200,
        'message': 'Ok',
        'status': True,
        'data': total_price
    }


query: 返回项目划分【架空输电线路本体工程/架线工程】下编码包含【['YX5-67', 'YX5-68', 'YX5-69', 'YX5-78', 'YX5-79', 'YX5-59', 'YX5-60', 'YX5-61', 'YX5-62', 'YX5-63', 'YX5-64', 'YX5-65', 'YX5-66', 'YX5-74', 'YX5-75', 'YX5-76', 'YX5-77', 'YX5-52', 'YX5-53', 'YX5-54', 'YX5-55', 'YX5-56', 'YX5-57', 'YX5-58', 'YX5-70', 'YX5-71', 'YX5-72', 'YX5-73', 'YX5-14', 'YX5-15', 'YX5-16', 'YX5-17', 'YX5-43', 'YX5-44', 'YX5-45', 'YX5-46', 'YX5-47', 'YX5-48', 'YX5-49', 'YX5-50', 'YX5-51', 'YX5-10', 'YX5-11', 'YX5-12', 'YX5-13', 'YX5-38', 'YX5-39', 'YX5-40', 'YX5-41', 'YX5-42', 'YX5-8', 'YX5-9']】的所有【定额】的【参数】之和


name: 导线及线材_其中：节能导线量

query: 返回项目划分【架空输电线路本体工程/架线工程/导地线架设@@架空输电线路本体工程/架线工程/导地线跨越架设】及名称包含【高导电率】的所有【主材】的【数量】之和

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    total_quantity = 0.0

    division_paths = [
        "架空输电线路本体工程/架线工程/导地线架设",
        "架空输电线路本体工程/架线工程/导地线跨越架设"
    ]

    for path in division_paths:
        quantities_result = project.get_quantities_node_by_parent_and_name(
            parent_path=path,
            quantity_type="主材",
            partial_name="高导电率"
        )

        if not quantities_result.get('status', False):
            return quantities_result

        materials = quantities_result.get('data', [])
        for material in materials:
            if isinstance(material, Material) and "高导电率" in material.name:
                try:
                    quantity = float(material.数量) if material.数量 else 0.0
                    total_quantity += quantity
                except (ValueError, TypeError):
                    continue

    return {
        'code': 200,
        'message': 'Ok',
        'status': True,
        'data': total_quantity
    }


name: 导线及线材_导线装材费_元

query: 返回项目划分【架空输电线路本体工程/架线工程/导地线架设@@架空输电线路本体工程/架线工程/导地线跨越架设】及名称包含【线】的所有【主材】的【单价】之和

code:
```python
def project_get_calculate_function():
    project = ProjectBuilder.build()
    total_price = 0.0

    division_paths = [
        "架空输电线路本体工程/架线工程/导地线架设",
        "架空输电线路本体工程/架线工程/导地线跨越架设"
    ]

    for path in division_paths:
        quantities_result = project.get_quantities_node_by_parent_and_name(
            parent_path=path,
            quantity_type="主材",
            partial_name="线"
        )

        if not quantities_result.get('status', False):
            return quantities_result

        materials = quantities_result.get('data', [])
        for material in materials:
            if isinstance(material, Material) and "线" in material.name:
                try:
                    price = float(material.单价含税) if material.单价含税 else 0.0
                    total_price += price
                except (ValueError, TypeError):
                    continue

    return {
        'code': 200,
        'message': 'Ok',
        'status': True,
        'data': total_price
    }
```


name: 导线及线材_其中：节能导线费用_元

query: 返回项目划分【架空输电线路本体工程/架线工程/导地线架设@@架空输电线路本体工程/架线工程/导地线跨越架设】及名称包含【高导电率】的所有【主材】的【单价】之和

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    total_price = 0.0

    division_paths = [
        "架空输电线路本体工程/架线工程/导地线架设",
        "架空输电线路本体工程/架线工程/导地线跨越架设"
    ]

    for path in division_paths:
        quantities_result = project.get_quantities_node_by_parent_and_name(
            parent_path=path,
            quantity_type="主材",
            partial_name="高导电率"
        )

        if not quantities_result.get('status', False):
            continue

        materials = quantities_result.get('data', [])
        for material in materials:
            if isinstance(material, Material) and "高导电率" in material.name:
                try:
                    price = float(material.单价含税) if material.单价含税 else 0.0
                    total_price += price
                except (ValueError, AttributeError):
                    continue

    return {
        'code': 200,
        'message': 'Ok',
        'status': True,
        'data': total_price
    }


query: 返回项目划分【架空输电线路本体工程/架线工程/导地线架设@@架空输电线路本体工程/架线工程/导地线跨越架设@@架空输电线路本体工程/架线工程/其他架线工程】及名称包含【['钢芯铝绞线', '铝包钢芯铝绞线', '中强度铝合金绞线', '铝合金芯铝绞线', '铝合金芯高导电率铝绞线', '钢芯高导电率铝绞线', '特高强度钢芯铝合金绞线', '扩径导线', '耐热导线', '碳纤维导线']】的所有【主材】的【参数】之和

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    division_paths = [
        "架空输电线路本体工程/架线工程/导地线架设",
        "架空输电线路本体工程/架线工程/导地线跨越架设",
        "架空输电线路本体工程/架线工程/其他架线工程"
    ]
    material_names = [
        '钢芯铝绞线', '铝包钢芯铝绞线', '中强度铝合金绞线', '铝合金芯铝绞线',
        '铝合金芯高导电率铝绞线', '钢芯高导电率铝绞线', '特高强度钢芯铝合金绞线',
        '扩径导线', '耐热导线', '碳纤维导线'
    ]

    total_params = 0.0

    for path in division_paths:
        result = project.get_quantities_node_by_parent_and_name(path, "主材", "")
        if not result.get('status', False):
            continue

        materials = result.get('data', [])
        for material in materials:
            if isinstance(material, dict):
                name = material.get('name', '')
                if name in material_names:
                    params = float(material.get('参数', 0.0))
                    total_params += params

    return {
        'code': 200,
        'message': 'Ok',
        'status': True,
        'data': total_params
    }


基础钢材量

query: 返回项目划分【架空输电线路本体工程/基础工程/基础砌筑】及名称包含【圆钢】的所有【主材】的【数量】之和

code:
根据用户问题和上下文信息，我将生成对应的Python代码：

```python
def project_get_calculate_function():
    project = ProjectBuilder.build()

    division_path = "架空输电线路本体工程/基础工程/基础砌筑"
    quantity_type = "主材"
    partial_name = "圆钢"

    result = project.get_quantities_node_by_parent_and_name(division_path, quantity_type, partial_name)
    if not result.get('status', False):
        return result

    materials = result.get('data', [])
    if not isinstance(materials, list):
        materials = [materials]

    total_quantity = 0.0
    for material in materials:
        if not isinstance(material, dict):
            continue
        quantity_str = material.get('数量', '0')
        try:
            quantity = float(quantity_str)
            total_quantity += quantity
        except (ValueError, TypeError):
            continue

    return {
        'code': 200,
        'message': 'Ok',
        'status': True,
        'data': {
            'total_quantity': total_quantity,
            'unit': '个' if materials else '',
            'material_count': len(materials)
        }
    }
```


基础钢材价格

query: 返回项目划分【架空输电线路本体工程/基础工程/基础砌筑】及名称包含【圆钢】的所有【主材】的【单价】之和

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    division_path = "架空输电线路本体工程/基础工程/基础砌筑"
    result = project.get_quantities_node_by_parent_and_name(division_path, "主材", "圆钢")
    if not result.get('status', False):
        return result

    materials = result.get('data', [])
    total_price = 0.0

    for material in materials:
        if isinstance(material, Material) and "圆钢" in material.name:
            try:
                price = float(material.单价含税) if material.单价含税 else 0.0
                total_price += price
            except (ValueError, AttributeError):
                continue

    return {
        'code': 200,
        'message': 'Ok',
        'status': True,
        'data': total_price
    }


query: 从【工程费用】中获取【架空输电线路本体工程】的【合计费】的值

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_schedule_on_Engineering_Cost_table("工程费用表", "架空输电线路本体工程", "合计费")
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return result_dict
    else:
        return result_dict


name: 本体工程人工费_本体_元

query: 返回项目划分【架空输电线路本体工程】下取费名称等于【人工费】的费用

code:
根据用户问题和上下文信息，我们需要获取项目划分"架空输电线路本体工程"下取费名称为"人工费"的费用。根据工程数据访问库，最匹配的方法是`get_fee_table_by_project_division`。

```python
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_table_by_project_division(
        project_division_path="架空输电线路本体工程",
        fee_name="人工费"
    )
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return result_dict
    else:
        return result_dict
```


name: 本体工程人工费_调试_元

query: 返回项目划分【架空输电线路本体工程】下取费名称等于【人工费】的费用

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_table_by_project_division("架空输电线路本体工程", "人工费")
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return result_dict
    else:
        return result_dict


name: 本体工程机械费_本体_元

query: 返回项目划分【架空输电线路本体工程】下取费名称等于【施工机械使用费】的费用

code:
根据用户问题和上下文信息，我将生成对应的Python代码：

```python
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_table_by_project_division(
        project_division_path="架空输电线路本体工程",
        fee_name="施工机械使用费"
    )
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return result_dict
    else:
        return result_dict
```


name: 本体工程机械费_调试_元

query: 返回项目划分【架空输电线路本体工程】下取费名称等于【施工机械使用费】的费用

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_table_by_project_division("架空输电线路本体工程", "施工机械使用费")
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return result_dict
    else:
        return result_dict


query: 返回项目划分【架空输电线路本体工程/基础工程】下取费名称等于【合计】的费用

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_table_by_project_division("架空输电线路本体工程/基础工程", "合计")
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return result_dict
    else:
        return result_dict


query: 返回项目划分【架空输电线路本体工程/杆塔工程】下取费名称等于【合计】的费用

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_table_by_project_division("架空输电线路本体工程/杆塔工程", "合计")
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return result_dict
    else:
        return result_dict


query: 返回项目划分【架空输电线路本体工程/接地工程】下取费名称等于【合计】的费用

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_table_by_project_division("架空输电线路本体工程/接地工程", "合计")
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return result_dict
    else:
        return result_dict


query: 返回项目划分【架空输电线路本体工程/架线工程】下取费名称等于【合计】的费用

code:
根据用户问题和上下文信息，我们需要使用`get_fee_table_by_project_division`方法来获取项目划分路径下取费名称为"合计"的费用。以下是生成的Python代码：

```python
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_table_by_project_division("架空输电线路本体工程/架线工程", "合计")
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return result_dict
    else:
        return result_dict
```


query: 返回项目划分【架空输电线路本体工程/附件安装工程】下取费名称等于【合计】的费用

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_table_by_project_division("架空输电线路本体工程/附件安装工程", "合计")
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return result_dict
    else:
        return result_dict


query: 返回项目划分【架空输电线路本体工程/辅助工程】下取费名称等于【合计】的费用

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_table_by_project_division("架空输电线路本体工程/辅助工程", "合计")
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return result_dict
    else:
        return result_dict


query: 返回项目划分【架空输电线路本体工程/辅助工程】下取费名称等于【合计】的费用

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_table_by_project_division("架空输电线路本体工程/辅助工程", "合计")
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return result_dict
    else:
        return result_dict


query: 从【工程费用】中获取【辅助设施工程】的【合计费】的值

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_schedule_on_Engineering_Cost_table("工程费用", "辅助设施工程", "合计费")
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return {'status': True, 'code': code, 'message': message, 'data': data}
    else:
        return {'status': False, 'code': code, 'message': message, 'data': data}


query: 从【工程费用】中获取【其他费用】的【合计费】的值

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_schedule_on_Engineering_Cost_table("工程费用表", "其他费用", "合计费")
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return result_dict
    else:
        return result_dict


query: 从【其他费用】中获取【建设场地征用及清理费】的值

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_schedule_on_other_expense_table(
        table_name="其他费用表",
        fee_name="建设场地征用及清理费",
        fee_attribute="amount"
    )
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return result_dict
    else:
        return result_dict


query: 从【其他费用】中获取【项目建设管理费】的值

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_schedule_on_other_expense_table('其他费用表', '项目建设管理费', 'amount')
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return {'status': True, 'data': data, 'message': message, 'code': code}
    else:
        return {'status': False, 'data': {}, 'message': message, 'code': code}


query: 从【其他费用】中获取【工程监理费】的值

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_schedule_on_other_expense_table('其他费用表', '工程监理费', 'amount')
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return {'status': True, 'data': data}
    else:
        return {'status': False, 'message': message, 'code': code}


name: 项目建设技术服务费合计_元

query: 从【其他费用】中获取【项目建设技术服务费】的值

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_schedule_on_other_expense_table('其他费用表', '项目建设技术服务费', 'amount')
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return result_dict
    else:
        return result_dict


name: 其中：项目前期工作费_元

query: 从【其他费用】中获取【项目前期工作费】的值

code:
根据用户问题和上下文信息，我们需要从"其他费用"中获取"项目前期工作费"的值。根据上下文信息，这涉及到"其他费用表"和"项目前期工作费"两个节点，且"项目前期工作费"是"其他费用表"的子节点。

最匹配的工程数据访问库函数是`get_fee_schedule_on_other_expense_table`，因为它专门用于在其他费用表中查找费用。

```python
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_schedule_on_other_expense_table(
        table_name="其他费用表",
        fee_name="项目前期工作费",
        fee_attribute="amount"
    )
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return result_dict
    else:
        return result_dict
```


query: 从【其他费用】中获取【勘察费】的值

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_schedule_on_other_expense_table('其他费用表', '勘察费', 'amount')
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return {'status': True, 'data': data}
    else:
        return {'status': False, 'message': message, 'code': code}


query: 从【其他费用】中获取【设计费】的值

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_schedule_on_other_expense_table('其他费用表', '设计费', 'amount')
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return result_dict
    else:
        return result_dict


name: 其中：工程建设检测费_元

query: 从【其他费用】中获取【工程建设检测费】的值

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_schedule_on_other_expense_table('其他费用表', '工程建设检测费', 'amount')
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return {'status': True, 'data': data}
    else:
        return {'status': False, 'message': message, 'code': code}


query: 从【其他费用】中获取【生产准备费】的值

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_schedule_on_other_expense_table('其他费用表', '生产准备费', 'amount')
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return {'status': True, 'code': code, 'message': message, 'data': data}
    else:
        return {'status': False, 'code': code, 'message': message, 'data': data}


name: 其中：安全文明施工费_线路_元

query: 返回项目划分【架空输电线路本体工程】下取费名称等于【安全文明施工费】的费用

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_table_by_project_division("架空输电线路本体工程", "安全文明施工费")
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return result_dict
    else:
        return result_dict


name: 其中：安全文明施工费_调试_元

query: 返回项目划分【架空输电线路本体工程】下取费名称等于【安全文明施工费】的费用

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_table_by_project_division("架空输电线路本体工程", "安全文明施工费")
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return result_dict
    else:
        return result_dict


query: 从【工程费用】中获取【基本预备费】的【合计费】的值

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_schedule_on_Engineering_Cost_table("工程费用表", "基本预备费", "合计费")
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return result_dict
    else:
        return result_dict


query: 从【工程费用】中获取【工程静态投资（一～七项合计）】的【合计费】的值

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_schedule_on_Engineering_Cost_table('工程费用表', '工程静态投资（一～七项合计）', '合计费')
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return {'status': True, 'code': code, 'message': message, 'data': data}
    else:
        return {'status': False, 'code': code, 'message': message, 'data': data}


query: 从【工程费用】中获取【建设期贷款利息】的【合计费】的值

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_schedule_on_Engineering_Cost_table('工程费用表', '建设期贷款利息', '合计费')
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return {'status': True, 'code': code, 'message': message, 'data': data}
    else:
        return {'status': False, 'code': code, 'message': message, 'data': {}}


query: 从【工程费用】中获取【工程动态投资（一～八项合计）】的【合计费】的值

code:
def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_schedule_on_Engineering_Cost_table("工程费用表", "工程动态投资（一～八项合计）", "合计费")
    status = result_dict.get('status', False)
    message = result_dict.get('message', '')
    code = result_dict.get('code', '')
    data = result_dict.get('data', {})
    if status:
        return result_dict
    else:
        return result_dict


query: 从【工程费用】中获取【其中：可抵扣增值税额】的【合计费】的值

code:
根据用户问题和上下文信息，我们需要从工程费用表中获取"其中：可抵扣增值税额"的"合计费"值。根据上下文信息，这是一个三级嵌套的费用结构：工程费用 → 其中：可抵扣增值税额 → 合计费。

def project_get_calculate_function():
    project = ProjectBuilder.build()
    result_dict = project.get_fee_schedule_on_Engineering_Cost_table(
        table_name="工程费用表",
        fee_name="其中：可抵扣增值税额/合计费",
        fee_attribute="合计费"
    )
    status = result_dict.get('status', False)
    if not status:
        raise Exception(f"获取费用失败: {result_dict.get('message', '未知错误')}")
    return result_dict