{"name": "杆塔总基数", "query": "从【架空输电线路本体工程/基础工程】及其子孙项目划分中查找编码中包含【YX2-1~7】的所有【定额】的【数量】之和", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n \n def expand_code_range(code_range):\n if '~' not in code_range:\n return code_range\n prefix, range_part = code_range.split('-')\n start, end = map(int, range_part.split('~'))\n return '/'.join([f\"{prefix}-{i}\" for i in range(start, end + 1)])\n \n expanded_codes = expand_code_range('YX2-1~7')\n \n result_dict = project.get_quantities_node_by_parent_and_code(\n parent_path='架空输电线路本体工程/基础工程',\n quantity_type='定额',\n code=expanded_codes\n )\n \n status = result_dict.get('status', False)\n if not status:\n return result_dict\n \n data = result_dict.get('data', [])\n if not isinstance(data, list):\n data = [data]\n \n total_quantity = 0.0\n for item in data:\n if isinstance(item, dict) and '数量' in item:\n try:\n quantity = float(item['数量'])\n total_quantity += quantity\n except (ValueError, TypeError):\n continue\n \n return {\n 'code': 200,\n 'message': 'Ok',\n 'status': True,\n 'data': {total_quantity}\n }"} {"name": "角钢塔_塔材量", "query": "从【架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立】及其子孙项目划分中查找名称中包含【角钢】的所有【主材】的【数量】之和", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_quantities_node_by_parent_and_name(\n parent_path='架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立',\n quantity_type='主材',\n partial_name='角钢'\n )\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n data = result_dict.get('data', [])\n if not status:\n return {'code': 201, 'message': message, 'status': False, 'data': 0}\n total_quantity = 0.0\n for item in data:\n if isinstance(item, Material) and '数量' in item.__dict__:\n try:\n total_quantity += float(item.数量)\n except (ValueError, TypeError):\n continue\n return {'code': 200, 'message': 'Ok', 'status': True, 'data': total_quantity}"} {"name": "角钢塔_其中:高强钢塔材量", "query": "从【架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立】及其子孙项目划分中查找名称中包含【角钢、高强】的所有【主材】的【数量】之和", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n path = \"架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立\"\n result_dict = project.get_quantities_node_by_parent_and_name(path, \"主材\", \"角钢、高强\")\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n data = result_dict.get('data', [])\n if not status:\n return {'code': 201, 'message': message, 'status': False, 'data': 0}\n total = 0.0\n for item in data:\n if isinstance(item, dict) and item.get('类型') == '主材' and '数量' in item:\n try:\n total += float(item['数量'])\n except (ValueError, TypeError):\n continue\n return {'code': 200, 'message': 'Ok', 'status': True, 'data': total}"} {"name": "角钢塔_塔材装材费_元", "query": "从【架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立】及其子孙项目划分中查找名称中包含【角钢】的所有【主材】的【单价】之和", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n parent_path = \"架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立\"\n quantity_type = \"主材\"\n partial_name = \"角钢\"\n \n result_dict = project.get_quantities_node_by_parent_and_name(parent_path, quantity_type, partial_name)\n status = result_dict.get('status', False)\n data = result_dict.get('data', [])\n \n if not status:\n return {'code': 201, 'message': '查询失败: ' + result_dict.get('message', ''), 'status': False, 'data': []}\n \n total_price = 0.0\n for item in data:\n if isinstance(item, Material) and hasattr(item, '单价含税'):\n try:\n price = float(item.单价含税)\n total_price += price\n except (ValueError, TypeError):\n continue\n \n return {'code': 200, 'message': 'Ok', 'status': True, 'data': total_price}"} {"name": "角钢塔_其中:高强钢塔材费用_元", "query": "从【架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立】及其子孙项目划分中查找名称中包含【角钢、高强】的所有【主材】的【单价】之和", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n path = '架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立'\n result_dict = project.get_quantities_node_by_parent_and_name(path, '主材', '角钢、高强')\n status = result_dict.get('status', False)\n data = result_dict.get('data', [])\n if not status:\n return {'code': 201, 'message': '查询失败: ' + result_dict.get('message', ''), 'status': False, 'data': []}\n \n total_price = 0.0\n for item in data:\n if isinstance(item, Material) and '单价含税' in item.__dict__:\n try:\n price = float(item.单价含税)\n total_price += price\n except (ValueError, TypeError):\n continue\n \n return {'code': 200, 'message': 'Ok', 'status': True, 'data': total_price}"} {"name": "钢管塔_塔材量", "query": "从【架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立】及其子孙项目划分中查找名称中包含【钢管塔】的所有【主材】的【数量】之和", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_quantities_node_by_parent_and_name(\n parent_path=\"架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立\",\n quantity_type=\"主材\",\n partial_name=\"钢管塔\"\n )\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n data = result_dict.get('data', [])\n \n if not status:\n return {'code': 201, 'message': message, 'status': False, 'data': 0}\n \n total_quantity = 0\n for item in data:\n if isinstance(item, dict) and '数量' in item:\n try:\n total_quantity += float(item['数量'])\n except (ValueError, TypeError):\n continue\n \n return {'code': 200, 'message': 'Ok', 'status': True, 'data': total_quantity}"} {"name": "钢管塔_钢管价格_元", "query": "从【架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立】及其子孙项目划分中查找名称中包含【钢管塔】的所有【主材】的【单价】之和", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_quantities_node_by_parent_and_name(\n parent_path='架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立',\n quantity_type='主材',\n partial_name='钢管塔'\n )\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', '')\n data = result_dict.get('data', [])\n if not status:\n return {'status': False, 'message': message, 'code': code, 'data': []}\n \n total_price = 0.0\n for item in data:\n if isinstance(item, Material) and '单价含税' in item.__dict__:\n try:\n price = float(item.单价含税)\n total_price += price\n except (ValueError, TypeError):\n continue\n \n return {'status': True, 'message': 'Ok', 'code': 200, 'data': total_price}"} {"name": "钢管杆_塔材量", "query": "从【架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立】及其子孙项目划分中查找名称中包含【钢管杆】的所有【主材】的【数量】之和", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_quantities_node_by_parent_and_name(\n parent_path='架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立',\n quantity_type='主材',\n partial_name='钢管杆'\n )\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n data = result_dict.get('data', [])\n if not status:\n return {'code': 201, 'message': message, 'status': False, 'data': []}\n \n total_quantity = 0.0\n for item in data:\n if isinstance(item, dict) and item.get('类型') == '主材' and '钢管杆' in item.get('name', ''):\n try:\n quantity = float(item.get('数量', 0))\n total_quantity += quantity\n except (ValueError, TypeError):\n continue\n \n return {'code': 200, 'message': 'Ok', 'status': True, 'data': total_quantity}"} {"name": "钢管杆_钢管价格_元", "query": "从【架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立】及其子孙项目划分中查找名称中包含【钢管杆】的所有【主材】的【单价】之和", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_quantities_node_by_parent_and_name(\n parent_path='架空输电线路本体工程/杆塔工程/杆塔组立/铁塔、钢管杆组立',\n quantity_type='主材',\n partial_name='钢管杆'\n )\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n data = result_dict.get('data', [])\n if not status:\n return {'code': 201, 'message': message, 'status': False, 'data': []}\n \n total_price = 0.0\n for item in data:\n if isinstance(item, Material) and '钢管杆' in item.name:\n try:\n price = float(item.单价含税) if item.单价含税 else 0.0\n total_price += price\n except (ValueError, AttributeError):\n continue\n \n return {'code': 200, 'message': 'Ok', 'status': True, 'data': total_price}"} {"name": "导线及线材_分裂数", "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']】的所有【定额】的【参数】之和", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n parent_path = \"架空输电线路本体工程/架线工程\"\n quantity_type = \"定额\"\n codes = ['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']\n code_str = '/'.join(codes)\n result_dict = project.get_quantities_node_by_parent_and_code(parent_path, quantity_type, code_str)\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n data = result_dict.get('data', [])\n if status:\n total = 0.0\n for item in data:\n if isinstance(item, dict) and '参数' in item:\n try:\n total += float(item['参数'])\n except (ValueError, TypeError):\n pass\n return {'code': 200, 'message': 'Ok', 'status': True, 'data': total}\n else:\n return {'code': 201, 'message': message, 'status': False, 'data': 0.0}"} {"name": "导线及线材_其中:节能导线量", "query": "从【架空输电线路本体工程/架线工程/导地线架设@@架空输电线路本体工程/架线工程/导地线跨越架设】及其子孙项目划分中查找名称中包含【高导电率】的所有【主材】的【数量】之和", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n total_quantity = 0.0\n \n paths = [\n \"架空输电线路本体工程/架线工程/导地线架设\",\n \"架空输电线路本体工程/架线工程/导地线跨越架设\"\n ]\n \n for path in paths:\n result = project.get_quantities_node_by_parent_and_name(\n parent_path=path,\n quantity_type=\"主材\",\n partial_name=\"高导电率\"\n )\n \n if not result.get('status', False):\n continue\n \n materials = result.get('data', [])\n if not isinstance(materials, list):\n materials = [materials]\n \n for material in materials:\n if not isinstance(material, dict):\n continue\n if material.get('类型') != '主材':\n continue\n if '高导电率' not in material.get('name', ''):\n continue\n \n try:\n quantity = float(material.get('数量', 0))\n total_quantity += quantity\n except (ValueError, TypeError):\n continue\n \n return {\n 'code': 200,\n 'message': 'Ok',\n 'status': True,\n 'data': total_quantity\n }"} {"name": "导线及线材_导线装材费_元", "query": "从【架空输电线路本体工程/架线工程/导地线架设@@架空输电线路本体工程/架线工程/导地线跨越架设】及其子孙项目划分中查找名称中包含【线】的所有【主材】的【单价】之和", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n total_price = 0.0\n \n paths = [\n \"架空输电线路本体工程/架线工程/导地线架设\",\n \"架空输电线路本体工程/架线工程/导地线跨越架设\"\n ]\n \n for path in paths:\n quantities_result = project.get_quantities_node_by_parent_and_name(path, \"主材\", \"线\")\n if not quantities_result.get('status', False):\n continue\n \n materials = quantities_result.get('data', [])\n for material in materials:\n if not isinstance(material, dict):\n continue\n \n price_str = material.get('单价含税', '0')\n try:\n price = float(price_str)\n total_price += price\n except ValueError:\n continue\n \n return {\n 'code': 200,\n 'message': 'Ok',\n 'status': True,\n 'data': total_price\n }"} {"name": "导线及线材_其中:节能导线费用_元", "query": "从【架空输电线路本体工程/架线工程/导地线架设@@架空输电线路本体工程/架线工程/导地线跨越架设】及其子孙项目划分中查找名称中包含【高导电率】的所有【主材】的【单价】之和", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n total_price = 0.0\n \n paths = [\n \"架空输电线路本体工程/架线工程/导地线架设\",\n \"架空输电线路本体工程/架线工程/导地线跨越架设\"\n ]\n \n for path in paths:\n quantities_result = project.get_quantities_node_by_parent_and_name(\n parent_path=path,\n quantity_type=\"主材\",\n partial_name=\"高导电率\"\n )\n \n if not quantities_result.get('status', False):\n continue\n \n materials = quantities_result.get('data', [])\n if not isinstance(materials, list):\n materials = [materials]\n \n for material in materials:\n if not isinstance(material, dict):\n continue\n \n price_str = material.get('单价含税', '0')\n try:\n price = float(price_str)\n total_price += price\n except ValueError:\n continue\n \n return {\n 'code': 200 if total_price > 0 else 201,\n 'message': 'Ok' if total_price > 0 else 'No matching materials found',\n 'status': total_price > 0,\n 'data': total_price\n }"} {"name": "导线及线材_导线类型", "query": "从【架空输电线路本体工程/架线工程/导地线架设@@架空输电线路本体工程/架线工程/导地线跨越架设@@架空输电线路本体工程/架线工程/其他架线工程】及其子孙项目划分中查找名称中包含【['钢芯铝绞线', '铝包钢芯铝绞线', '中强度铝合金绞线', '铝合金芯铝绞线', '铝合金芯高导电率铝绞线', '钢芯高导电率铝绞线', '特高强度钢芯铝合金绞线', '扩径导线', '耐热导线', '碳纤维导线']】的所有【主材】的【参数】之和", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n parent_paths = [\n \"架空输电线路本体工程/架线工程/导地线架设\",\n \"架空输电线路本体工程/架线工程/导地线跨越架设\",\n \"架空输电线路本体工程/架线工程/其他架线工程\"\n ]\n material_names = [\n '钢芯铝绞线', '铝包钢芯铝绞线', '中强度铝合金绞线', '铝合金芯铝绞线', \n '铝合金芯高导电率铝绞线', '钢芯高导电率铝绞线', '特高强度钢芯铝合金绞线', \n '扩径导线', '耐热导线', '碳纤维导线'\n ]\n total_params = 0.0\n \n for parent_path in parent_paths:\n for material_name in material_names:\n result_dict = project.get_quantities_node_by_parent_and_name(\n parent_path=parent_path,\n quantity_type='主材',\n partial_name=material_name\n )\n if not result_dict.get('status', False):\n continue\n \n materials = result_dict.get('data', [])\n if not isinstance(materials, list):\n materials = [materials]\n \n for material in materials:\n if not isinstance(material, dict):\n continue\n if '参数' in material:\n try:\n param_value = float(material['参数'])\n total_params += param_value\n except (ValueError, TypeError):\n pass\n \n return {\n 'code': 200,\n 'message': 'Ok',\n 'status': True,\n 'data': total_params\n }"} {"name": "基础钢材量", "query": "从【架空输电线路本体工程/基础工程/基础砌筑】及其子孙项目划分中查找名称中包含【圆钢】的所有【主材】的【数量】之和", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n base_path = \"架空输电线路本体工程/基础工程/基础砌筑\"\n \n result = project.get_quantities_node_by_parent_and_name(\n parent_path=base_path,\n quantity_type=\"主材\",\n partial_name=\"圆钢\"\n )\n \n if not result.get('status', False):\n return {\n 'code': 201,\n 'message': f\"查询失败: {result.get('message', '未知错误')}\",\n 'status': False,\n 'data': []\n }\n \n materials = result.get('data', [])\n total_quantity = 0.0\n \n for material in materials:\n if isinstance(material, dict) and material.get('类型') == '主材' and '圆钢' in material.get('name', ''):\n try:\n quantity = float(material.get('数量', 0))\n total_quantity += quantity\n except (ValueError, TypeError):\n continue\n \n return {\n 'code': 200,\n 'message': 'Ok',\n 'status': True,\n 'data': {\n 'total_quantity': total_quantity,\n 'unit': '根据具体主材单位确定'\n }\n }"} {"name": "基础钢材价格", "query": "从【架空输电线路本体工程/基础工程/基础砌筑】及其子孙项目划分中查找名称中包含【圆钢】的所有【主材】的【单价】之和", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n base_path = \"架空输电线路本体工程/基础工程/基础砌筑\"\n total_price = 0.0\n \n def process_division(path):\n nonlocal total_price\n quantities_result = project.get_quantities_node_by_parent_and_name(path, \"主材\", \"圆钢\")\n if quantities_result.get('status'):\n materials = quantities_result.get('data', [])\n for material in materials:\n if isinstance(material, dict):\n material_obj = Material()\n material_obj.__dict__.update(material)\n if \"单价含税\" in material and material[\"单价含税\"]:\n try:\n total_price += float(material[\"单价含税\"])\n except (ValueError, TypeError):\n pass\n \n children_result = project.get_division_node_by_parent_and_name(path, \"\")\n if children_result.get('status'):\n children = children_result.get('data', [])\n for child in children:\n if isinstance(child, dict) and \"path\" in child:\n process_division(child[\"path\"])\n \n process_division(base_path)\n \n return {\n 'code': 200,\n 'message': 'Ok',\n 'status': True,\n 'data': total_price\n }"} {"name": "本体费用合计_元", "query": "从【工程费用】中获取【架空输电线路本体工程.合计费】的属性", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_fee_schedule_on_Engineering_Cost_table(\"工程费用表\", \"架空输电线路本体工程.合计费\", \"amount\")\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', '')\n data = result_dict.get('data', {})\n if status:\n return result_dict\n else:\n return result_dict"} {"name": "本体工程人工费_本体_元", "query": "从【架空输电线路本体工程】项目划分中获取名称属于【人工费】的费用", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_division_node_by_parent_and_name('架空输电线路本体工程', '人工费')\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', '')\n data = result_dict.get('data', [])\n if status:\n return result_dict\n else:\n return result_dict"} {"name": "本体工程人工费_调试_元", "query": "从【架空输电线路本体工程】项目划分中获取名称属于【人工费】的费用", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_division_node_by_parent_and_name('架空输电线路本体工程', '人工费')\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', '')\n data = result_dict.get('data', [])\n if status:\n return result_dict\n else:\n return result_dict"} {"name": "本体工程机械费_本体_元", "query": "从【架空输电线路本体工程】项目划分中获取名称属于【施工机械使用费】的费用", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_division_node_by_parent_and_name('架空输电线路本体工程', '施工机械使用费')\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', '')\n data = result_dict.get('data', [])\n if status:\n return result_dict\n else:\n return result_dict"} {"name": "本体工程机械费_调试_元", "query": "从【架空输电线路本体工程】项目划分中获取名称属于【施工机械使用费】的费用", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_division_node_by_parent_and_name('架空输电线路本体工程', '施工机械使用费')\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', '')\n data = result_dict.get('data', [])\n if status:\n return result_dict\n else:\n return result_dict"} {"name": "基础工程费用_元", "query": "从【架空输电线路本体工程/基础工程】项目划分中获取名称属于【合计】的费用", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_division_node_by_parent_and_name('架空输电线路本体工程/基础工程', '合计')\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', '')\n data = result_dict.get('data', [])\n if status:\n return result_dict\n else:\n return result_dict"} {"name": "杆塔工程费用_元", "query": "从【架空输电线路本体工程/杆塔工程】项目划分中获取名称属于【合计】的费用", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_division_node_by_parent_and_name('架空输电线路本体工程/杆塔工程', '合计')\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', '')\n data = result_dict.get('data', [])\n if status:\n return result_dict\n else:\n return result_dict"} {"name": "接地工程费用_元", "query": "从【架空输电线路本体工程/接地工程】项目划分中获取名称属于【合计】的费用", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_division_node_by_parent_and_name('架空输电线路本体工程/接地工程', '合计')\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', '')\n data = result_dict.get('data', [])\n if status:\n return result_dict\n else:\n return result_dict"} {"name": "架线工程费用_元", "query": "从【架空输电线路本体工程/架线工程】项目划分中获取名称属于【合计】的费用", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_division_node_by_parent_and_name('架空输电线路本体工程/架线工程', '合计')\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', '')\n data = result_dict.get('data', [])\n if status:\n return result_dict\n else:\n return result_dict"} {"name": "附件工程费用_元", "query": "从【架空输电线路本体工程/附件安装工程】项目划分中获取名称属于【合计】的费用", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_division_node_by_parent_and_name('架空输电线路本体工程/附件安装工程', '合计')\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', '')\n data = result_dict.get('data', [])\n if status:\n return result_dict\n else:\n return result_dict"} {"name": "辅助工程费用_元", "query": "从【架空输电线路本体工程/辅助工程】项目划分中获取名称属于【合计】的费用", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_division_node_by_parent_and_name('架空输电线路本体工程/辅助工程', '合计')\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', '')\n data = result_dict.get('data', [])\n if status:\n return result_dict\n else:\n return result_dict"} {"name": "辅助工程费用_调试_元", "query": "从【架空输电线路本体工程/辅助工程】项目划分中获取名称属于【合计】的费用", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_division_node_by_parent_and_name(\"架空输电线路本体工程/辅助工程\", \"合计\")\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', '')\n data = result_dict.get('data', [])\n if status:\n return result_dict\n else:\n return result_dict"} {"name": "辅助设施工程_元", "query": "从【工程费用】中获取【辅助设施工程.合计费】的属性", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_fee_schedule_on_Engineering_Cost_table(\"工程费用\", \"辅助设施工程.合计费\", \"合计费\")\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', '')\n data = result_dict.get('data', {})\n if status:\n return result_dict\n else:\n return result_dict"} {"name": "其他费用合计_元", "query": "从【工程费用】中获取【其他费用.合计费】的属性", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_fee_schedule_on_Engineering_Cost_table(\"工程费用表\", \"其他费用.合计费\", \"合计费\")\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', '')\n data = result_dict.get('data', {})\n if status:\n return result_dict\n else:\n return result_dict"} {"name": "建场费合计_元", "query": "从【其他费用】中获取【建设场地征用及清理费】的属性", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_fee_schedule_on_other_expense_table('其他费用表', '建设场地征用及清理费', 'amount')\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', '')\n data = result_dict.get('data', {})\n if status:\n return result_dict\n else:\n return result_dict"} {"name": "项目建设管理费合计_元", "query": "从【其他费用】中获取【项目建设管理费】的属性", "code": "根据用户问题和上下文信息,我们需要从\"其他费用\"中获取\"项目建设管理费\"的属性。根据上下文信息,\"其他费用\"是一个FeeScheduleItem类型,而\"项目建设管理费\"是一个Fee类型,且其父节点是\"其他费用\"。\n\n最匹配的方法是使用`get_fee_schedule_on_other_expense_table`方法,因为:\n1. \"其他费用\"对应的是其他费用表\n2. 我们需要获取的是费用属性\n\n以下是生成的Python代码:\n\n```python\ndef project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_fee_schedule_on_other_expense_table(\n table_name=\"其他费用表\",\n fee_name=\"项目建设管理费\",\n fee_attribute=\"*\" # 获取所有属性\n )\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('data', '')\n data = result_dict.get('data', {})\n if status:\n return result_dict\n else:\n return result_dict\n```"} {"name": "其中:工程监理费_元", "query": "从【其他费用】中获取【工程监理费】的属性", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_fee_schedule_on_other_expense_table('其他费用表', '工程监理费', 'amount')\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', '')\n data = result_dict.get('data', {})\n if status:\n return result_dict\n else:\n return result_dict"} {"name": "项目建设技术服务费合计_元", "query": "从【其他费用】中获取【项目建设技术服务费】的属性", "code": "根据用户问题和上下文信息,我们需要从\"其他费用\"中获取\"项目建设技术服务费\"的属性。根据上下文信息,\"项目建设技术服务费\"是\"其他费用\"的子节点,类型为\"Fee\"。\n\n从工程数据访问库中,最匹配的方法是`get_fee_schedule_on_other_expense_table`,因为它专门用于在其他费用表中查找费用。\n\n```python\ndef project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_fee_schedule_on_other_expense_table(\n table_name=\"其他费用表\",\n fee_name=\"项目建设技术服务费\",\n fee_attribute=\"amount\"\n )\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', '')\n data = result_dict.get('data', {})\n if status:\n return result_dict\n else:\n return result_dict\n```"} {"name": "其中:项目前期工作费_元", "query": "从【其他费用】中获取【项目前期工作费】的属性", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_fee_schedule_on_other_expense_table('其他费用表', '项目前期工作费', 'amount')\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', '')\n data = result_dict.get('data', {})\n if status:\n return result_dict\n else:\n return result_dict"} {"name": "其中:勘察费_元", "query": "从【其他费用】中获取【勘察费】的属性", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_fee_schedule_on_other_expense_table(\"其他费用表\", \"勘察费\", \"amount\")\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', '')\n data = result_dict.get('data', {})\n if status:\n return result_dict\n else:\n return result_dict"} {"name": "其中:设计费_元", "query": "从【其他费用】中获取【设计费】的属性", "code": "根据用户问题和上下文信息,我们需要从\"其他费用\"表中获取\"设计费\"的属性。根据上下文信息,\"其他费用表\"是父节点,\"设计费\"是其子节点。工程数据访问库中提供了`get_fee_schedule_on_other_expense_table`方法专门用于在其他费用表中查找费用。\n\ndef project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_fee_schedule_on_other_expense_table(table_name=\"其他费用表\", fee_name=\"设计费\", fee_attribute=None)\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', 201)\n data = result_dict.get('data', {})\n if status:\n return result_dict\n else:\n return result_dict"} {"name": "其中:工程建设检测费_元", "query": "从【其他费用】中获取【工程建设检测费】的属性", "code": "根据用户问题和上下文信息,我们需要从\"其他费用\"中获取\"工程建设检测费\"的属性。根据上下文信息,\"工程建设检测费\"是一个Fee类型节点,其父节点是\"其他费用\"(FeeScheduleItem类型)。因此,我们可以使用`get_fee_schedule_on_other_expense_table`方法来获取该费用的属性。\n\ndef project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_fee_schedule_on_other_expense_table(\n table_name=\"其他费用\",\n fee_name=\"工程建设检测费\",\n fee_attribute=\"*\"\n )\n status = result_dict.get('status', False)\n if not status:\n return result_dict\n return result_dict"} {"name": "生产准备费_元", "query": "从【其他费用】中获取【生产准备费】的属性", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_fee_schedule_on_other_expense_table('其他费用表', '生产准备费', 'amount')\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', '')\n data = result_dict.get('data', {})\n if status:\n return result_dict\n else:\n return result_dict"} {"name": "其中:安全文明施工费_线路_元", "query": "从【架空输电线路本体工程】项目划分中获取名称属于【安全文明施工费】的费用", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_division_node_by_parent_and_name('架空输电线路本体工程', '安全文明施工费')\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', '')\n data = result_dict.get('data', [])\n if status:\n return result_dict\n else:\n return result_dict"} {"name": "其中:安全文明施工费_调试_元", "query": "从【架空输电线路本体工程】项目划分中获取名称属于【安全文明施工费】的费用", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_division_node_by_parent_and_name(\"架空输电线路本体工程\", \"安全文明施工费\")\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', '')\n data = result_dict.get('data', [])\n if status:\n return result_dict\n else:\n return result_dict"} {"name": "基本预备费_元", "query": "从【工程费用】中获取【基本预备费.合计费】的属性", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_fee_schedule_on_Engineering_Cost_table('工程费用表', '基本预备费.合计费', '合计费')\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', '')\n data = result_dict.get('data', {})\n if status:\n return result_dict\n else:\n return result_dict"} {"name": "静态投资_元", "query": "从【工程费用】中获取【工程静态投资(一~七项合计).合计费】的属性", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_fee_schedule_on_Engineering_Cost_table(\"工程费用表\", \"工程静态投资(一~七项合计).合计费\", \"合计费\")\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', '')\n data = result_dict.get('data', {})\n if status:\n return result_dict\n else:\n return result_dict"} {"name": "建设期利息_元", "query": "从【工程费用】中获取【建设期贷款利息.合计费】的属性", "code": "根据用户问题和上下文信息,我们需要从工程费用表中获取\"建设期贷款利息.合计费\"的属性。根据上下文信息,这是一个三级结构:工程费用表 -> 建设期贷款利息 -> 合计费。\n\n最匹配的方法是`get_fee_schedule_on_Engineering_Cost_table`,因为它专门用于在工程费用表中查找费用。\n\n```python\ndef project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_fee_schedule_on_Engineering_Cost_table(\n table_name=\"工程费用表\",\n fee_name=\"建设期贷款利息.合计费\",\n fee_attribute=\"合计费\"\n )\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('data', '')\n data = result_dict.get('data', [])\n if status:\n return result_dict\n else:\n return result_dict\n```"} {"name": "动态投资_元", "query": "从【工程费用】中获取【工程动态投资(一~八项合计).合计费】的属性", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_fee_schedule_on_Engineering_Cost_table(\n table_name=\"工程费用表\",\n fee_name=\"工程动态投资(一~八项合计).合计费\",\n fee_attribute=\"合计费\"\n )\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', '')\n data = result_dict.get('data', {})\n if status:\n return result_dict\n else:\n return result_dict"} {"name": "增值税抵扣税额_元", "query": "从【工程费用】中获取【其中:可抵扣增值税额.合计费】的属性", "code": "def project_get_calculate_function():\n project = ProjectBuilder.build()\n result_dict = project.get_fee_schedule_on_Engineering_Cost_table(\"工程费用表\", \"其中:可抵扣增值税额.合计费\", \"合计费\")\n status = result_dict.get('status', False)\n message = result_dict.get('message', '')\n code = result_dict.get('code', '')\n data = result_dict.get('data', {})\n if status:\n return result_dict\n else:\n return result_dict"}