修改增加完整工程json
This commit is contained in:
@@ -2,8 +2,8 @@ import json
|
||||
import os
|
||||
import sys
|
||||
from typing import Dict, List, Any, Optional, Tuple, Set
|
||||
from expressioncalculator import ExpressionCalculator
|
||||
from bcl_utils import (
|
||||
from equipment_calculation.expressioncalculator import ExpressionCalculator
|
||||
from equipment_calculation.bcl_utils import (
|
||||
ZjQuantityBCLContext,
|
||||
ZjProjectBCLContext,
|
||||
ZjBillBCLContext,
|
||||
@@ -16,7 +16,7 @@ from bcl_utils import (
|
||||
create_list_from_node,
|
||||
create_node_from_type,
|
||||
)
|
||||
from item_acquisition import (
|
||||
from equipment_calculation.item_acquisition import (
|
||||
get_cost_table_children,
|
||||
get_quantity_nodes,
|
||||
get_bill_cost_table,
|
||||
@@ -104,7 +104,7 @@ def process_DXdata(json_data):
|
||||
# 在create_list_from_node函数后添加一个包装函数
|
||||
def create_list_from_node_with_quantity(node, quantity=None):
|
||||
"""创建清单对象并设置数量"""
|
||||
from bcl_utils import create_list_from_node
|
||||
from equipment_calculation.bcl_utils import create_list_from_node
|
||||
|
||||
bill_obj = create_list_from_node(node)
|
||||
|
||||
@@ -499,7 +499,7 @@ def calculate_all_fees(
|
||||
print(f"设置清单对象数量: {bill_obj.quantity}")
|
||||
|
||||
# 创建工程量对象
|
||||
from bcl_utils import create_node_from_type
|
||||
from equipment_calculation.bcl_utils import create_node_from_type
|
||||
|
||||
project_obj = create_node_from_type(project_node)
|
||||
|
||||
@@ -517,7 +517,7 @@ def calculate_all_fees(
|
||||
context = BCLDataSourceContext([QuantityItem], bill_context)
|
||||
else:
|
||||
# 非清单工程 - 工程信息 -> 工程量节点
|
||||
from bcl_utils import create_node_from_type
|
||||
from equipment_calculation.bcl_utils import create_node_from_type
|
||||
|
||||
project_obj = create_node_from_type(project_node)
|
||||
|
||||
@@ -729,7 +729,7 @@ def calculate_quantity_fees(
|
||||
"""
|
||||
# 如果没有提供计算策略,使用默认策略
|
||||
if calculation_strategy is None:
|
||||
from calculation_strategy import DefaultCalculationStrategy
|
||||
from equipment_calculation.calculation_strategy import DefaultCalculationStrategy
|
||||
|
||||
calculation_strategy = DefaultCalculationStrategy()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user